Make single-file classes tolerant to having many main()'s
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
package pkg
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
println("A.main Ok")
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package pkg
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
println("B.main Ok")
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlinc] Compiling [[TestData]] => [[Temp]/hello.jar]
|
||||
[java] A.main Ok
|
||||
[java] B.main Ok
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -0,0 +1,23 @@
|
||||
<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 output="${temp}/hello.jar">
|
||||
<src path="${test.data}"/>
|
||||
</kotlinc>
|
||||
|
||||
<java classname="pkg.AKt" fork="true">
|
||||
<classpath>
|
||||
<pathelement location="${temp}/hello.jar"/>
|
||||
<pathelement location="${kotlin.runtime.jar}"/>
|
||||
</classpath>
|
||||
</java>
|
||||
|
||||
<java classname="pkg.BKt" fork="true">
|
||||
<classpath>
|
||||
<pathelement location="${temp}/hello.jar"/>
|
||||
<pathelement location="${kotlin.runtime.jar}"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
</project>
|
||||
Reference in New Issue
Block a user