Hey.
In the blog post about the M13 release:
>By default, each Kotlin source file (e.g. myFile.kt) produces a class file with the same name, capitalized and suffixed with “Kt”: MyFileKt
;
So I thought with this change I can have multiple main() functions within a single package.
src/main/kotlin/Foo.kt:
fun main(args: Array<String>) {
println(“foo”)
}
src/main/kotlin/Bar.kt:
fun main(args: Array<String>) {
println(“bar”)
}
Unfortunately IDEA complains with the error message:
Platform declaration clash: The following declarations have the same JVM signature…
My current workaround is to change the package name without moving the source file, which is very chaotic. Is there another way to have multiple main function within a single package with Kotlin?
(kotlin plugin: 0.14.37, kotlin compiler: 0.13.1513)