Files
kotlin-fork/compiler/testData/diagnostics/tests/classObjects/kt3866.kt
T
Alexander Udalov 838c408e68 LHS of qualified expressions are determined manually
ExpressionPosition is useless now and will be dropped

 #KT-3866 Fixed
2013-11-18 19:51:28 +04:00

22 lines
288 B
Kotlin

open class C {
}
fun C.foo() {}
open class X {
class object : C() {}
}
open class Y {
class object : C() {}
}
fun bar() {
val x = X
x.foo()
X.foo()
(X : C).foo()
(X <!USELESS_CAST_STATIC_ASSERT_IS_FINE!>as<!> C).foo()
((if (1<2) X else Y) : C).foo()
}