FIR IDE: fix reference resolve with invalid number of type args
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ internal object FirReferenceResolveHelper {
|
||||
|
||||
val symbol = resolvedSymbol ?: run {
|
||||
val diagnostic = (this as? FirErrorTypeRef)?.diagnostic
|
||||
(diagnostic as? ConeUnmatchedTypeArgumentsError)?.type
|
||||
(diagnostic as? ConeUnmatchedTypeArgumentsError)?.symbol
|
||||
}
|
||||
|
||||
return symbol?.fir?.buildSymbol(symbolBuilder)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package foo
|
||||
class CC<T>
|
||||
class DD<T, T2>
|
||||
|
||||
val v1 = D<caret>D<C<caret>C>
|
||||
val v1 = D<caret>D<CC>
|
||||
|
||||
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package foo
|
||||
|
||||
class CC<T>
|
||||
class DD<T, T2>
|
||||
|
||||
val v1 = DD<C<caret>C>
|
||||
|
||||
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in foo) class CC<T>
|
||||
+6
@@ -576,6 +576,12 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest
|
||||
runTest("idea/idea-frontend-fir/testData/referenceResolve/WrongNumberOfTypeArguments3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("WrongNumberOfTypeArguments4.kt")
|
||||
public void testWrongNumberOfTypeArguments4() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/testData/referenceResolve/WrongNumberOfTypeArguments4.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("WrongNumberOfTypeArgumentsInSupertype.kt")
|
||||
public void testWrongNumberOfTypeArgumentsInSupertype() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user