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
@@ -3,9 +3,9 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlinc] Compiling [[TestData]/main.kt] => [[Temp]/hello.jar]
|
||||
[kotlinc] [TestData]/main.kt:3:17: error: this type is sealed, so it can be inherited by only its own nested classes or objects
|
||||
[kotlinc] class Derived : Base()
|
||||
[kotlinc] ^
|
||||
[kotlinc] [TestData]/main.kt:2:5: error: members are not allowed in annotation class
|
||||
[kotlinc] class Nested
|
||||
[kotlinc] ^
|
||||
|
||||
ERR:
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<target name="build">
|
||||
<kotlinc src="${test.data}/main.kt" output="${temp}/hello.jar">
|
||||
<compilerarg line="-language-version 1.0"/>
|
||||
<compilerarg line="-language-version 1.2"/>
|
||||
</kotlinc>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sealed class Base
|
||||
|
||||
class Derived : Base()
|
||||
annotation class Outer {
|
||||
class Nested
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user