Add tests on "-language-version" usage from Ant, Maven, Gradle

This commit is contained in:
Alexander Udalov
2016-05-26 15:40:36 +03:00
parent bc5202a4d7
commit 2c516f18a0
12 changed files with 164 additions and 0 deletions
@@ -0,0 +1,17 @@
OUT:
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] ^
ERR:
BUILD FAILED
[TestData]/build.xml:5: Compile failed; see the compiler error output for details.
Total time: [time]
Return code: 1
@@ -0,0 +1,9 @@
<project name="Ant Task Test" default="build">
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
<target name="build">
<kotlinc src="${test.data}/main.kt" output="${temp}/hello.jar">
<compilerarg line="-language-version 1.0"/>
</kotlinc>
</target>
</project>
@@ -0,0 +1,3 @@
sealed class Base
class Derived : Base()