[FIR] Don't capture flexible types that only have projections in one bound
This fixes a false positive NEW_INFERENCE_ERROR. See the code comment for the rationale. #KT-63982 Fixed
This commit is contained in:
committed by
Space Team
parent
eaa93b2582
commit
476a0b6783
@@ -0,0 +1,19 @@
|
||||
// ISSUE: KT-63982
|
||||
// FIR_IDENTICAL
|
||||
// DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
|
||||
|
||||
// FILE: StubBasedPsiElement.java
|
||||
public interface StubBasedPsiElement<Stub extends StubElement> extends PsiElement {
|
||||
Stub getStub();
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
interface PsiElement
|
||||
interface JSCallExpression: PsiElement
|
||||
interface StubElement<T : PsiElement>
|
||||
|
||||
fun test(child: PsiElement) {
|
||||
if (child is JSCallExpression) {
|
||||
val callStub = if (child is StubBasedPsiElement<*>) child.stub else null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user