mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
20 lines
422 B
Kotlin
Vendored
20 lines
422 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
|
@kotlin.internal.LowPriorityInOverloadResolution
|
|
fun foo(i: Int) = 1
|
|
|
|
fun foo(a: Any) = 2
|
|
|
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
|
@kotlin.internal.LowPriorityInOverloadResolution
|
|
fun bar(a: String?) = 3
|
|
|
|
fun bar(a: Any) = 4
|
|
|
|
fun box(): String {
|
|
if (foo(1) != 2) return "fail1"
|
|
if (bar(null) != 3) return "fail2"
|
|
return "OK"
|
|
}
|