Files
kotlin-fork/compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt
T
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00

20 lines
421 B
Kotlin
Vendored

// WITH_STDLIB
@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"
}