Files
kotlin-fork/compiler/testData/ir/irText/declarations/mainFunctionManglingInJvm.kt
T
Sergej Jaskiewicz e8aa05928d [FIR2IR] Unconditionally disable linkViaSignatures on JVM
It was an experimental compilation mode that we don't need anymore.

KT-64809
2024-01-19 13:35:59 +00:00

33 lines
553 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// ^^^ Only JVM allows `main` functions in the same package but in different files.
// FIR_IDENTICAL
// WITH_STDLIB
// SEPARATE_SIGNATURE_DUMP_FOR_K2
// ^ The main function has a different mangled name when it's computed from its K1 descriptor in K/JVM.
// FILE: a.kt
fun main() {
println("main() in a.kt")
}
// FILE: b.kt
fun main() {
println("main() in b.kt")
}
// FILE: c.kt
package foo
fun main() {
println("foo.main() in c.kt")
}
// FILE: d.kt
package foo
fun main() {
println("foo.main() in d.kt")
}