Report a warning or error if an old language version or API version is used
#KT-25823 Fixed
This commit is contained in:
committed by
Ilya Gorbunov
parent
db29eadba5
commit
02a9b03007
+1
-1
@@ -2,4 +2,4 @@ $TESTDATA_DIR$/languageVersion.kt
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
-language-version
|
||||
1.0
|
||||
1.2
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
sealed class Base
|
||||
|
||||
class Derived : Base()
|
||||
annotation class Outer {
|
||||
class Nested
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/js/languageVersion.kt:5:17: error: this type is sealed, so it can be inherited by only its own nested classes or objects
|
||||
class Derived : Base()
|
||||
^
|
||||
compiler/testData/cli/js/languageVersion.kt:4:5: error: members are not allowed in annotation class
|
||||
class Nested
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
Reference in New Issue
Block a user