Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt6508.kt
T
Andrey Breslav 42113b5e58 Filtering error types and accounting for platform types when computing intersections
KT-6508 Build impossible because of NoSuchElementException

 #KT-6508 Fixed
2014-12-29 14:13:14 +03:00

24 lines
419 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_EXPRESSION
// FILE: foo/View.java
package foo;
public class View {}
// FILE: foo/TextView.java
package foo;
public class TextView extends View {}
// FILE: k.kt
import foo.View
//import foo.TextView
fun String.gah(view:View ?) {
if (view is <!UNRESOLVED_REFERENCE!>TextView<!>)
<!DEBUG_INFO_SMARTCAST!>view<!>
else <!UNRESOLVED_REFERENCE!>TextView<!>() as foo.TextView
}