diff --git a/compiler/testData/cli/js/simple2js.kt b/compiler/testData/cli/js/simple2js.kt index 7de943c30d9..78e3db2779f 100644 --- a/compiler/testData/cli/js/simple2js.kt +++ b/compiler/testData/cli/js/simple2js.kt @@ -1 +1 @@ -fun main(args: Array) {} \ No newline at end of file +fun main() {} \ No newline at end of file diff --git a/compiler/testData/cli/js/withLib.kt b/compiler/testData/cli/js/withLib.kt index 2c8fbaadc4c..2ef0edf83f5 100644 --- a/compiler/testData/cli/js/withLib.kt +++ b/compiler/testData/cli/js/withLib.kt @@ -1,7 +1,7 @@ import kotlin.Pair import library.sample.* -fun main(args: Array) { +fun main() { val p = Pair(10, 20) val x = pairAdd(p) println("x=$x") diff --git a/compiler/testData/cli/jvm/jvm8Target.kt b/compiler/testData/cli/jvm/jvm8Target.kt index 9c8ea32d77a..11007910864 100644 --- a/compiler/testData/cli/jvm/jvm8Target.kt +++ b/compiler/testData/cli/jvm/jvm8Target.kt @@ -2,6 +2,6 @@ interface A { fun test() = "OK" } -fun main(args: Array) { +fun main() { println(object : A {}.test()) } \ No newline at end of file diff --git a/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out b/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out index decdb206bce..e5685cfb624 100644 --- a/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out +++ b/compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.out @@ -1,10 +1,7 @@ warning: unable to find kotlin-stdlib.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home' warning: unable to find kotlin-script-runtime.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home' warning: unable to find kotlin-reflect.jar in the Kotlin home directory. Pass either '-no-reflect' or '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home' -compiler/testData/cli/jvm/simple.kt:1:16: error: unresolved reference: Array -fun main(args: Array) = println("hello world") - ^ -compiler/testData/cli/jvm/simple.kt:1:33: error: unresolved reference: println -fun main(args: Array) = println("hello world") - ^ +compiler/testData/cli/jvm/simple.kt:1:14: error: unresolved reference: println +fun main() = println("hello world") + ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/kt22304_2.kt b/compiler/testData/cli/jvm/kt22304_2.kt index 85256b281fd..ce72ea657ed 100644 --- a/compiler/testData/cli/jvm/kt22304_2.kt +++ b/compiler/testData/cli/jvm/kt22304_2.kt @@ -2,7 +2,7 @@ package beforeTest //package name should be less than imported one import test.* -fun main(args: Array) { +fun main() { "O".switchMapOnce { "K".switchMapOnce { diff --git a/compiler/testData/cli/jvm/simple.kt b/compiler/testData/cli/jvm/simple.kt index 9b7592664fb..0d62c46ac1b 100644 --- a/compiler/testData/cli/jvm/simple.kt +++ b/compiler/testData/cli/jvm/simple.kt @@ -1 +1 @@ -fun main(args: Array) = println("hello world") +fun main() = println("hello world") diff --git a/compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt b/compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt index 61c51aeb0b9..0fed060eb7d 100644 --- a/compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt +++ b/compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt @@ -3,7 +3,8 @@ fun box(): String { return "OK" } -fun main(args: Array) { +fun main(args: Array) { + args.size D.foo(array()) } diff --git a/compiler/testData/integration/ant/js/additionalArguments/hello.kt b/compiler/testData/integration/ant/js/additionalArguments/hello.kt index 7f2fc04541b..c0c7780a920 100644 --- a/compiler/testData/integration/ant/js/additionalArguments/hello.kt +++ b/compiler/testData/integration/ant/js/additionalArguments/hello.kt @@ -4,7 +4,7 @@ inline fun foo(f: () -> Unit) = f() var ok = "Fail" -fun main(args : Array) { +fun main() { foo { ok = "OK" } diff --git a/compiler/testData/integration/ant/js/simpleWithMain/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithMain/root1/foo.kt index e374b249313..ae38953291a 100644 --- a/compiler/testData/integration/ant/js/simpleWithMain/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithMain/root1/foo.kt @@ -2,7 +2,7 @@ package foo var ok = "FAIL" -fun main(args: Array) { +fun main() { ok = "OK" } diff --git a/compiler/testData/integration/ant/js/simpleWithMainFQArgs/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithMainFQArgs/root1/foo.kt index 84c3a8a43ee..5585b13a4b0 100644 --- a/compiler/testData/integration/ant/js/simpleWithMainFQArgs/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithMainFQArgs/root1/foo.kt @@ -3,6 +3,7 @@ package foo var ok = "FAIL" fun main(args: kotlin.Array) { + args.size ok = "OK" } diff --git a/compiler/testData/integration/ant/js/simpleWithStdlib/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithStdlib/root1/foo.kt index 9c26449e6f4..7f2587a693c 100644 --- a/compiler/testData/integration/ant/js/simpleWithStdlib/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithStdlib/root1/foo.kt @@ -4,7 +4,7 @@ var ok = "FAIL" val hello = Pair("Hello", "World") -fun main(args: Array) { +fun main() { ok = "OK" println(hello.first + " " + hello.second) } diff --git a/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib/root1/foo.kt index 743fab365aa..7f2473a4c68 100644 --- a/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib/root1/foo.kt @@ -5,7 +5,7 @@ import kotlin.js.Date var ok = "FAIL" -fun main(args: Array) { +fun main() { val x = ClassA().value if (x == 100) { ok = "OK" diff --git a/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLibModuleKind/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLibModuleKind/root1/foo.kt index 743fab365aa..7f2473a4c68 100644 --- a/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLibModuleKind/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLibModuleKind/root1/foo.kt @@ -5,7 +5,7 @@ import kotlin.js.Date var ok = "FAIL" -fun main(args: Array) { +fun main() { val x = ClassA().value if (x == 100) { ok = "OK" diff --git a/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFilesWithTwoModulesAsLibrary/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFilesWithTwoModulesAsLibrary/root1/foo.kt index 043ee06b6c7..b6bb2e2d46e 100644 --- a/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFilesWithTwoModulesAsLibrary/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithStdlibAndJsFilesWithTwoModulesAsLibrary/root1/foo.kt @@ -5,7 +5,7 @@ import kotlin.js.Date var ok = "FAIL" -fun main(args: Array) { +fun main() { val x = ClassA().value if (x == 100 && Date().extFun() == "Date.extFun" && ClassA().extFun() == "ClassA.extFun") { ok = "OK" diff --git a/compiler/testData/integration/ant/js/simpleWithStdlibAndTwoJsFilesAsLibraries/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithStdlibAndTwoJsFilesAsLibraries/root1/foo.kt index 043ee06b6c7..b6bb2e2d46e 100644 --- a/compiler/testData/integration/ant/js/simpleWithStdlibAndTwoJsFilesAsLibraries/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithStdlibAndTwoJsFilesAsLibraries/root1/foo.kt @@ -5,7 +5,7 @@ import kotlin.js.Date var ok = "FAIL" -fun main(args: Array) { +fun main() { val x = ClassA().value if (x == 100 && Date().extFun() == "Date.extFun" && ClassA().extFun() == "ClassA.extFun") { ok = "OK" diff --git a/compiler/testData/integration/ant/js/simpleWithVarargMain/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithVarargMain/root1/foo.kt index e9b5d129049..a3f5e1d5c8c 100644 --- a/compiler/testData/integration/ant/js/simpleWithVarargMain/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithVarargMain/root1/foo.kt @@ -3,6 +3,7 @@ package foo var ok = "FAIL" fun main(vararg args: kotlin.String) { + args.size ok = "OK" } diff --git a/compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/root1/foo.kt index c2ddea45024..7f768caf014 100644 --- a/compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/root1/foo.kt @@ -4,7 +4,7 @@ import library.sample.* var ok = "FAIL" -fun main(args: Array) { +fun main() { val x = ClassA().value if (x == 100) { ok = "OK" diff --git a/compiler/testData/integration/ant/js/simpleWithoutStdlibAndJsFileAsAnotherLib/root1/foo.kt b/compiler/testData/integration/ant/js/simpleWithoutStdlibAndJsFileAsAnotherLib/root1/foo.kt index c2ddea45024..7f768caf014 100644 --- a/compiler/testData/integration/ant/js/simpleWithoutStdlibAndJsFileAsAnotherLib/root1/foo.kt +++ b/compiler/testData/integration/ant/js/simpleWithoutStdlibAndJsFileAsAnotherLib/root1/foo.kt @@ -4,7 +4,7 @@ import library.sample.* var ok = "FAIL" -fun main(args: Array) { +fun main() { val x = ClassA().value if (x == 100) { ok = "OK" diff --git a/compiler/testData/integration/ant/jvm/additionalArguments/hello.kt b/compiler/testData/integration/ant/jvm/additionalArguments/hello.kt index dea9cf93f9d..303c21bb168 100644 --- a/compiler/testData/integration/ant/jvm/additionalArguments/hello.kt +++ b/compiler/testData/integration/ant/jvm/additionalArguments/hello.kt @@ -1,6 +1,6 @@ package hello -fun main(args : Array) { +fun main() { for (s in listOf("a")) { println("Hello, $s!") } diff --git a/compiler/testData/integration/ant/jvm/helloWorld/hello.kt b/compiler/testData/integration/ant/jvm/helloWorld/hello.kt index 3ec4e92d7e8..21844c2c3c3 100644 --- a/compiler/testData/integration/ant/jvm/helloWorld/hello.kt +++ b/compiler/testData/integration/ant/jvm/helloWorld/hello.kt @@ -1,6 +1,6 @@ package hello -fun main(args : Array) { +fun main() { for (s in arrayListOf("a")) println("Hello, $s!") diff --git a/compiler/testData/integration/ant/jvm/internalMembers/module2.kt b/compiler/testData/integration/ant/jvm/internalMembers/module2.kt index 0692e9f68bc..708e1261fe2 100644 --- a/compiler/testData/integration/ant/jvm/internalMembers/module2.kt +++ b/compiler/testData/integration/ant/jvm/internalMembers/module2.kt @@ -21,7 +21,7 @@ public fun invokeOnB(b: B) = b.z + b.test() public fun invokeOnC(c: C) = c.z + c.test() -fun main(args: Array) { +fun main() { val b = B() println(invokeOnA(b)) println(invokeOnB(b)) diff --git a/compiler/testData/integration/ant/jvm/jvmClasspath/hello.kt b/compiler/testData/integration/ant/jvm/jvmClasspath/hello.kt index 85d73c1bbd3..8ff946bcfef 100644 --- a/compiler/testData/integration/ant/jvm/jvmClasspath/hello.kt +++ b/compiler/testData/integration/ant/jvm/jvmClasspath/hello.kt @@ -6,7 +6,7 @@ import javax.crypto.Cipher import com.sun.crypto.provider.SunJCE import sun.nio.ByteBuffered -fun main(args : Array) { +fun main() { val a = Big5() // charsets.jar val c = DNSNameService() // dnsns.jar val e : Cipher? = null // jce.jar diff --git a/compiler/testData/integration/ant/jvm/kt11995/test.kt b/compiler/testData/integration/ant/jvm/kt11995/test.kt index bf70284213b..eac08ba515d 100644 --- a/compiler/testData/integration/ant/jvm/kt11995/test.kt +++ b/compiler/testData/integration/ant/jvm/kt11995/test.kt @@ -4,6 +4,6 @@ fun foo(a: Any) = foo(1) fun foo(i: Int) = "foo(Int)" -fun main(args: Array) { +fun main() { println(foo("")) } \ No newline at end of file diff --git a/compiler/testData/integration/ant/jvm/mainInFiles/a.kt b/compiler/testData/integration/ant/jvm/mainInFiles/a.kt index 486f8f21eac..906a32e8f70 100644 --- a/compiler/testData/integration/ant/jvm/mainInFiles/a.kt +++ b/compiler/testData/integration/ant/jvm/mainInFiles/a.kt @@ -1,5 +1,5 @@ package pkg -fun main(args : Array) { +fun main() { println("A.main Ok") } diff --git a/compiler/testData/integration/ant/jvm/mainInFiles/b.kt b/compiler/testData/integration/ant/jvm/mainInFiles/b.kt index 35572138f55..dfd49099887 100644 --- a/compiler/testData/integration/ant/jvm/mainInFiles/b.kt +++ b/compiler/testData/integration/ant/jvm/mainInFiles/b.kt @@ -1,5 +1,5 @@ package pkg -fun main(args : Array) { +fun main() { println("B.main Ok") } diff --git a/compiler/testData/integration/ant/jvm/manySourceRoots/root1/hello.kt b/compiler/testData/integration/ant/jvm/manySourceRoots/root1/hello.kt index 0fce73d03ce..cb1c0a9c308 100644 --- a/compiler/testData/integration/ant/jvm/manySourceRoots/root1/hello.kt +++ b/compiler/testData/integration/ant/jvm/manySourceRoots/root1/hello.kt @@ -1,6 +1,6 @@ package hello -fun main(args : Array) { +fun main() { for (s in arrayListOf("a")) println("Hello, $s!") foo() diff --git a/compiler/testData/integration/ant/jvm/moduleName/hello.kt b/compiler/testData/integration/ant/jvm/moduleName/hello.kt index dfc8315b01c..f7d6bff79de 100644 --- a/compiler/testData/integration/ant/jvm/moduleName/hello.kt +++ b/compiler/testData/integration/ant/jvm/moduleName/hello.kt @@ -1,6 +1,6 @@ package hello -fun main(args : Array) { +fun main() { val systemClassLoader = ClassLoader.getSystemClassLoader() val moduleName = "META-INF/test.kotlin_module" val resourceAsStream = systemClassLoader.getResourceAsStream(moduleName) diff --git a/compiler/testData/integration/ant/jvm/moduleNameDefault/hello.kt b/compiler/testData/integration/ant/jvm/moduleNameDefault/hello.kt index a161a0b029c..232c42955b6 100644 --- a/compiler/testData/integration/ant/jvm/moduleNameDefault/hello.kt +++ b/compiler/testData/integration/ant/jvm/moduleNameDefault/hello.kt @@ -1,6 +1,6 @@ package hello -fun main(args : Array) { +fun main() { val systemClassLoader = ClassLoader.getSystemClassLoader() val moduleName = "META-INF/build.kotlin_module" val resourceAsStream = systemClassLoader.getResourceAsStream(moduleName) diff --git a/compiler/testData/integration/ant/jvm/moduleNameWithKotlin/hello.kt b/compiler/testData/integration/ant/jvm/moduleNameWithKotlin/hello.kt index 1e1f84467c0..cee19076024 100644 --- a/compiler/testData/integration/ant/jvm/moduleNameWithKotlin/hello.kt +++ b/compiler/testData/integration/ant/jvm/moduleNameWithKotlin/hello.kt @@ -1,6 +1,6 @@ package hello -fun main(args: Array) { +fun main() { val systemClassLoader = ClassLoader.getSystemClassLoader() val moduleFile = "META-INF/build.kotlin_module" val resourceAsStream = systemClassLoader.getResourceAsStream(moduleFile) diff --git a/compiler/testData/integration/ant/jvm/overloadResolutionOnCollectionLiteral/literals.kt b/compiler/testData/integration/ant/jvm/overloadResolutionOnCollectionLiteral/literals.kt index 7010f455a21..3625a4d2c2c 100644 --- a/compiler/testData/integration/ant/jvm/overloadResolutionOnCollectionLiteral/literals.kt +++ b/compiler/testData/integration/ant/jvm/overloadResolutionOnCollectionLiteral/literals.kt @@ -9,7 +9,7 @@ fun foo() {} @AnnInt(intArrayOf(1, 2)) fun bar() {} -fun main(args: Array) { +fun main() { foo() bar() } \ No newline at end of file diff --git a/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt b/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt index 3aa467c4ea8..99b33acb705 100644 --- a/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt +++ b/compiler/testData/integration/ant/jvm/suppressWarnings/hello.kt @@ -8,6 +8,6 @@ interface T { abstract fun foo() } -fun main(args : Array) { +fun main() { println("Hi!") } diff --git a/compiler/testData/integration/ant/jvm/twoStdlibForCollectionLiterals/literals.kt b/compiler/testData/integration/ant/jvm/twoStdlibForCollectionLiterals/literals.kt index 7010f455a21..3625a4d2c2c 100644 --- a/compiler/testData/integration/ant/jvm/twoStdlibForCollectionLiterals/literals.kt +++ b/compiler/testData/integration/ant/jvm/twoStdlibForCollectionLiterals/literals.kt @@ -9,7 +9,7 @@ fun foo() {} @AnnInt(intArrayOf(1, 2)) fun bar() {} -fun main(args: Array) { +fun main() { foo() bar() } \ No newline at end of file diff --git a/compiler/testData/integration/ant/jvm/valWithInvoke/test.kt b/compiler/testData/integration/ant/jvm/valWithInvoke/test.kt index 17f64e3f7f4..24b7cc42be7 100644 --- a/compiler/testData/integration/ant/jvm/valWithInvoke/test.kt +++ b/compiler/testData/integration/ant/jvm/valWithInvoke/test.kt @@ -5,6 +5,6 @@ val foo: Int = 6 operator fun Int.invoke() = this -fun main(args: Array) { +fun main() { println(foo()) } \ No newline at end of file diff --git a/compiler/testData/integration/ant/jvm/verbose/hello.kt b/compiler/testData/integration/ant/jvm/verbose/hello.kt index 30d773783e7..1caa88fc116 100644 --- a/compiler/testData/integration/ant/jvm/verbose/hello.kt +++ b/compiler/testData/integration/ant/jvm/verbose/hello.kt @@ -1,5 +1,5 @@ package hello -fun main(args : Array) { +fun main() { println("Hi!") } diff --git a/compiler/testData/integration/ant/jvm/version/hello.kt b/compiler/testData/integration/ant/jvm/version/hello.kt index f04b2b73595..2234912f1f1 100644 --- a/compiler/testData/integration/ant/jvm/version/hello.kt +++ b/compiler/testData/integration/ant/jvm/version/hello.kt @@ -1,5 +1,5 @@ package hello -fun main(args : Array) { +fun main() { println("Yo!") } diff --git a/compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/hello.kt b/compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/hello.kt index 6c9ab7fe60a..5424ad5cbf2 100644 --- a/compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/hello.kt +++ b/compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/hello.kt @@ -1,5 +1,5 @@ package hello -fun main(args: Array) { +fun main() { println("Hello!") } diff --git a/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/literals.kt b/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/literals.kt index 7010f455a21..3625a4d2c2c 100644 --- a/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/literals.kt +++ b/compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/literals.kt @@ -9,7 +9,7 @@ fun foo() {} @AnnInt(intArrayOf(1, 2)) fun bar() {} -fun main(args: Array) { +fun main() { foo() bar() } \ No newline at end of file diff --git a/compiler/testData/integration/smoke/compilationFailed/hello.kt b/compiler/testData/integration/smoke/compilationFailed/hello.kt index 139b0ddc047..61a8d5ca92d 100644 --- a/compiler/testData/integration/smoke/compilationFailed/hello.kt +++ b/compiler/testData/integration/smoke/compilationFailed/hello.kt @@ -1,5 +1,5 @@ package Hello -fun main(args : Array) { +fun main() { a } diff --git a/compiler/testData/integration/smoke/helloApp/hello.kt b/compiler/testData/integration/smoke/helloApp/hello.kt index 9098e3b590a..54674a02472 100644 --- a/compiler/testData/integration/smoke/helloApp/hello.kt +++ b/compiler/testData/integration/smoke/helloApp/hello.kt @@ -1,5 +1,5 @@ package Hello -fun main(args : Array) { +fun main() { System.out.println("Hello!") } diff --git a/compiler/testData/integration/smoke/helloAppFQMain/hello.kt b/compiler/testData/integration/smoke/helloAppFQMain/hello.kt index dd83e3c3de8..b6b68d62f4d 100644 --- a/compiler/testData/integration/smoke/helloAppFQMain/hello.kt +++ b/compiler/testData/integration/smoke/helloAppFQMain/hello.kt @@ -1,5 +1,6 @@ package Hello fun main(args: kotlin.Array) { + args.size System.out.println("Hello from fully qualified main!") } diff --git a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMain/hello.kt b/compiler/testData/integration/smoke/helloAppOldAndParameterlessMain/hello.kt index 3625851a795..b5c9eb3b90e 100644 --- a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMain/hello.kt +++ b/compiler/testData/integration/smoke/helloAppOldAndParameterlessMain/hello.kt @@ -1,6 +1,7 @@ package Hello fun main(args: Array) { + args.size System.out.println("Hello!") } diff --git a/compiler/testData/integration/smoke/helloAppVarargMain/hello.kt b/compiler/testData/integration/smoke/helloAppVarargMain/hello.kt index 414877a7dba..0382047311b 100644 --- a/compiler/testData/integration/smoke/helloAppVarargMain/hello.kt +++ b/compiler/testData/integration/smoke/helloAppVarargMain/hello.kt @@ -1,5 +1,6 @@ package Hello fun main(vararg args: kotlin.String) { + args.size System.out.println("Hello from vararg main!") } diff --git a/compiler/testData/integration/smoke/inlineOnly/inlineOnly.kt b/compiler/testData/integration/smoke/inlineOnly/inlineOnly.kt index 399fed593d1..76345c3c0db 100644 --- a/compiler/testData/integration/smoke/inlineOnly/inlineOnly.kt +++ b/compiler/testData/integration/smoke/inlineOnly/inlineOnly.kt @@ -1,5 +1,5 @@ package InlineOnly -fun main(args : Array) { - error("my error") +fun main(args: Array) { + error("my error: ${args.size}") } diff --git a/compiler/testData/integration/smoke/inlineOnly/inlineOnly.run.expected b/compiler/testData/integration/smoke/inlineOnly/inlineOnly.run.expected index cad7d6cd4a9..06ebfd1b2a5 100644 --- a/compiler/testData/integration/smoke/inlineOnly/inlineOnly.run.expected +++ b/compiler/testData/integration/smoke/inlineOnly/inlineOnly.run.expected @@ -1,6 +1,6 @@ ERR: -Exception in thread "main" java.lang.IllegalStateException: my error +Exception in thread "main" java.lang.IllegalStateException: my error: 0 at InlineOnly.InlineOnlyKt.main(inlineOnly.kt:4) Return code: 1 diff --git a/compiler/testData/launcher/emptyMain.kt b/compiler/testData/launcher/emptyMain.kt index 64a3a94b727..ffc121c8070 100644 --- a/compiler/testData/launcher/emptyMain.kt +++ b/compiler/testData/launcher/emptyMain.kt @@ -1,4 +1,4 @@ package test -fun main(args: Array) { +fun main() { } diff --git a/compiler/testData/launcher/helloWorld.kt b/compiler/testData/launcher/helloWorld.kt index aa5490220d0..1cbd68a2668 100644 --- a/compiler/testData/launcher/helloWorld.kt +++ b/compiler/testData/launcher/helloWorld.kt @@ -1,5 +1,5 @@ package test -fun main(args: Array) { +fun main() { println("Hello!") } diff --git a/compiler/testData/launcher/reflectionUsage.kt b/compiler/testData/launcher/reflectionUsage.kt index 3e0e0c26f35..1cb741e4a76 100644 --- a/compiler/testData/launcher/reflectionUsage.kt +++ b/compiler/testData/launcher/reflectionUsage.kt @@ -1,6 +1,6 @@ class Foo(val bar: String?) -fun main(args: Array) { +fun main() { try { if (Foo::bar.returnType.isMarkedNullable) { print("Foo#bar is nullable") diff --git a/compiler/testData/multiplatform/simple/common.kt b/compiler/testData/multiplatform/simple/common.kt index e844ba29e69..e679d02330f 100644 --- a/compiler/testData/multiplatform/simple/common.kt +++ b/compiler/testData/multiplatform/simple/common.kt @@ -2,7 +2,7 @@ expect class Printer() { fun print(message: String) } -fun main(args: Array) { +fun main() { val printer = Printer() printer.print("Hello, world!") } diff --git a/compiler/tests/org/jetbrains/kotlin/integration/CompilerFileLimitTest.kt b/compiler/tests/org/jetbrains/kotlin/integration/CompilerFileLimitTest.kt index 9cf04703f18..e0ab8ef20e2 100644 --- a/compiler/tests/org/jetbrains/kotlin/integration/CompilerFileLimitTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/integration/CompilerFileLimitTest.kt @@ -47,7 +47,7 @@ class CompilerFileLimitTest : CompilerSmokeTestBase() { appendln("// kotlin rules ... and stuff") } } - appendln("fun main(args: Array)") + appendln("fun main()") appendln("{") appendln("\tval result = Class5().foo() + Class$size().foo()") appendln("\tprintln(result)") @@ -81,7 +81,7 @@ class CompilerFileLimitTest : CompilerSmokeTestBase() { return buildString { append("package usesLarge\n\n") append("import large.Large\n\n") - appendln("fun main(args: Array)") + appendln("fun main()") appendln("{") appendln("\tval result = Large.Class0().foo() + Large.Class$size().foo()") appendln("\tprintln(result)") diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/use-test-extension/src/main/kotlin/main.kt b/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/use-test-extension/src/main/kotlin/main.kt index 9f35c803aa1..d3d8e47c068 100644 --- a/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/use-test-extension/src/main/kotlin/main.kt +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/use-test-extension/src/main/kotlin/main.kt @@ -1,5 +1,5 @@ package org.jetbrains.kotlin.test -fun main(args: Array) { +fun main() { println("OK") } diff --git a/libraries/tools/kotlin-maven-plugin/src/it/simple/src/main/kotlin/yo.kt b/libraries/tools/kotlin-maven-plugin/src/it/simple/src/main/kotlin/yo.kt index 174d4dd3644..e97bc7ec751 100644 --- a/libraries/tools/kotlin-maven-plugin/src/it/simple/src/main/kotlin/yo.kt +++ b/libraries/tools/kotlin-maven-plugin/src/it/simple/src/main/kotlin/yo.kt @@ -1,2 +1,2 @@ -fun main(vararg args: String) { +fun main() { } \ No newline at end of file