Filtering error types and accounting for platform types when computing intersections

KT-6508 Build impossible because of NoSuchElementException

 #KT-6508 Fixed
This commit is contained in:
Andrey Breslav
2014-12-25 14:45:50 +03:00
parent 2d1891c63f
commit 42113b5e58
8 changed files with 87 additions and 3 deletions
@@ -0,0 +1,24 @@
// !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
}
@@ -0,0 +1,3 @@
package
internal fun kotlin.String.gah(/*0*/ view: foo.View?): kotlin.Unit