FIR: Properly support raw types in type parameter upper bounds
^KT-49345 Fixed
This commit is contained in:
committed by
Space Team
parent
73cffa315d
commit
7b15b28ee2
@@ -1,18 +0,0 @@
|
||||
// SKIP_TXT
|
||||
|
||||
// FILE: StubElement.java
|
||||
public interface StubElement<T extends CharSequence> {}
|
||||
|
||||
// FILE: IStubFileElementType.java
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public class IStubFileElementType<X extends StubElement> {
|
||||
public X getFoo() { return null; }
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun foo(i: IStubFileElementType<*>) {
|
||||
bar(<!ARGUMENT_TYPE_MISMATCH!>i.getFoo()<!>) // In FIR, `i.getFoo()` has a type ft<StubElement<*>, StubElement<*>?>, while in FE1.0 it's ft<StubElement<CharSequence>, StubElement<*>?>
|
||||
}
|
||||
|
||||
fun bar(w: StubElement<CharSequence>) {}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
|
||||
// FILE: StubElement.java
|
||||
@@ -12,7 +13,7 @@ public class IStubFileElementType<X extends StubElement> {
|
||||
|
||||
// FILE: main.kt
|
||||
fun foo(i: IStubFileElementType<*>) {
|
||||
bar(i.getFoo()) // In FIR, `i.getFoo()` has a type ft<StubElement<*>, StubElement<*>?>, while in FE1.0 it's ft<StubElement<CharSequence>, StubElement<*>?>
|
||||
bar(i.getFoo())
|
||||
}
|
||||
|
||||
fun bar(w: StubElement<CharSequence>) {}
|
||||
|
||||
Reference in New Issue
Block a user