Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/functionNameMangling/functionsWithDifferentNullabilityDoNotClash.kt
T
2021-10-11 12:09:52 +03:00

20 lines
338 B
Kotlin
Vendored

// WITH_RUNTIME
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@kotlin.jvm.JvmInline
value class Id(val id: String)
fun test(id: Id) {
if (id.id != "OK") throw AssertionError()
}
fun test(id: Id?) {
if (id != null) throw AssertionError()
}
fun box(): String {
test(Id("OK"))
test(null)
return "OK"
}