Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/annotations/resolveWithLowPriorityAnnotation.kt
T
Ilya Matveev 1b553ebfaf backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00

20 lines
422 B
Kotlin

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