Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows vs Kotlin #82

Open
TWiStErRob opened this issue Nov 21, 2021 · 0 comments
Open

Windows vs Kotlin #82

TWiStErRob opened this issue Nov 21, 2021 · 0 comments

Comments

@TWiStErRob
Copy link
Contributor

fun main() {
	doSomething()
	doSomeThing()
}

fun f(block: () -> Unit) {
	block()
}

fun doSomething() {
	f { println("doSomething") }
}

fun doSomeThing() {
	f { println("doSomeThing") }
}

What's the output on Windows?

doSomething
doSomeThing
doSomething
doSomething
doSomeThing
doSomething
doSomeThing
doSomeThing
java.lang.NoClassDefFoundError
Expand
java.lang.NoClassDefFoundError: MainKt$doSomething$1 (wrong name: MainKt$doSomeThing$1)
	at Main.doSomething(Main.kt:11)

Encountered in Kotlin 1.4.32, verified fixed in 1.6.0 (not sure about 1.5.x)
On 1.6.0 two class files are generated: MainKt$doSomething$1 and MainKt$doSomeThing$2
On Unix this is not an issue because most file systems are case sensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant