Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/functionNameMangling/functionsWithDifferentNullabilityDoNotClash.kt
T
2021-12-15 17:14:22 +00:00

21 lines
338 B
Kotlin
Vendored

// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
OPTIONAL_JVM_INLINE_ANNOTATION
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"
}