Support "-Xno-check-impl" argument, check only real declarations

Use "-Xno-check-impl" to suppress checking whether the platform declaration
implementation has the "impl" modifier.

Do not check presence of fake overrides from platform class in the impl class,
otherwise there would be a lot of errors about the fact that
equals/hashCode/toString are not marked with the "impl" modifier
This commit is contained in:
Alexander Udalov
2016-11-25 17:10:46 +03:00
parent bbafb7c013
commit 204873edf2
12 changed files with 70 additions and 15 deletions
+1
View File
@@ -4,6 +4,7 @@ where advanced options include:
-Xrepeat <count> Repeat compilation (for performance analysis)
-Xplugin <path> Load plugins from the given classpath
-Xmulti-platform Enable experimental language support for multi-platform projects
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
Advanced options are non-standard and may be changed or removed without any notice.
OK
+1
View File
@@ -17,6 +17,7 @@ where advanced options include:
-Xrepeat <count> Repeat compilation (for performance analysis)
-Xplugin <path> Load plugins from the given classpath
-Xmulti-platform Enable experimental language support for multi-platform projects
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
Advanced options are non-standard and may be changed or removed without any notice.
OK
@@ -0,0 +1,7 @@
platform open class Base {
fun base()
}
platform class Derived : Base {
fun derived()
}
@@ -0,0 +1,7 @@
impl open class Base {
impl fun base() {}
}
impl class Derived : Base() {
impl fun derived() {}
}
@@ -0,0 +1,7 @@
-- Common --
Exit code: OK
Output:
-- JVM --
Exit code: OK
Output:
+1 -1
View File
@@ -1,5 +1,5 @@
impl class Printer {
fun print(message: String) {
impl fun print(message: String) {
println("JS says: " + message)
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
impl class Printer {
fun print(message: String) {
impl fun print(message: String) {
println("JVM says: " + message)
}
}