Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt
T
Svetlana Isakova c739632c57 report 'ambiguity' on reference, not on the whole expression
as other type inference errors
2013-09-03 13:09:15 +04:00

21 lines
233 B
Kotlin

package c
trait B {
fun bar() {}
}
class C() {
fun bar() {
}
}
fun test(a : Any?) {
if (a is B) {
if (a is C) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>();
}
}
}
fun Any?.bar() {}