[FE 1.0] Don't throw empty intersection exception, return empty intersection type instead

This commit is contained in:
Victor Petukhov
2022-07-01 14:01:09 +02:00
committed by teamcity
parent a798fe0b18
commit 5b5da025f4
7 changed files with 91 additions and 1 deletions
@@ -0,0 +1,22 @@
// WITH_STDLIB
// FILE: Test.java
public interface Test<K> implements I<String> {}
// FILE: Test2.java
public interface Test2<K, M>
// FILE: Test3.java
public interface Test3<K> {}
// FILE: I.java
public interface I<K> {}
// FILE: main.kt
fun main(z: I<String>) {
z <!UNCHECKED_CAST!>as Test<Test2<Int, *>><!>
z <!USELESS_CAST!>as Test<Test2<Int, <!UNRESOLVED_REFERENCE!>Foo<!>>><!>
z <!USELESS_CAST!>as Test<<!UNRESOLVED_REFERENCE!>Foo<!>><!>
z as <!UNRESOLVED_REFERENCE!>Any2<!>
println(z)
}