FIR: Fix type alias case for callable reference resolution type
This commit is contained in:
committed by
TeamCityServer
parent
a29dfb3b48
commit
37b5237e97
+6
@@ -32926,6 +32926,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("pairReference.kt")
|
||||||
|
public void testPairReference() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/pairReference.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
||||||
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
||||||
|
|||||||
+6
@@ -32926,6 +32926,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("pairReference.kt")
|
||||||
|
public void testPairReference() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/pairReference.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
||||||
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
||||||
|
|||||||
+6
@@ -32926,6 +32926,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("pairReference.kt")
|
||||||
|
public void testPairReference() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/pairReference.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
||||||
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
||||||
|
|||||||
+3
-3
@@ -144,12 +144,12 @@ class FirDoubleColonExpressionResolver(private val session: FirSession) {
|
|||||||
val resolvedExpression = expression as? FirResolvedQualifier
|
val resolvedExpression = expression as? FirResolvedQualifier
|
||||||
?: return null
|
?: return null
|
||||||
|
|
||||||
val firClass = resolvedExpression.expandedRegularClassIfAny()
|
val firClassLikeDeclaration = resolvedExpression.symbol?.fir
|
||||||
?: return null
|
?: return null
|
||||||
|
|
||||||
val type = ConeClassLikeTypeImpl(
|
val type = ConeClassLikeTypeImpl(
|
||||||
firClass.symbol.toLookupTag(),
|
firClassLikeDeclaration.symbol.toLookupTag(),
|
||||||
Array(firClass.typeParameters.size) { index ->
|
Array(firClassLikeDeclaration.typeParameters.size) { index ->
|
||||||
val typeArgument = expression.typeArguments.getOrNull(index)
|
val typeArgument = expression.typeArguments.getOrNull(index)
|
||||||
if (typeArgument == null) ConeStarProjection
|
if (typeArgument == null) ConeStarProjection
|
||||||
else when (typeArgument) {
|
else when (typeArgument) {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
typealias MPair<K> = Pair<K, Int>
|
||||||
|
typealias TextWithOffset = MPair<String>
|
||||||
|
|
||||||
|
fun foo(c: Collection<TextWithOffset>) {
|
||||||
|
val a1 = c.map(TextWithOffset::first)
|
||||||
|
a1[0].length
|
||||||
|
|
||||||
|
val a2 = c.map(MPair<String>::first)
|
||||||
|
a2[0].length
|
||||||
|
|
||||||
|
val a3 = c.map(Pair<String, Int>::first)
|
||||||
|
a3[0].length
|
||||||
|
}
|
||||||
Generated
+6
@@ -33022,6 +33022,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("pairReference.kt")
|
||||||
|
public void testPairReference() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/pairReference.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
@TestMetadata("PropertyDelegateWithPrivateSet.kt")
|
||||||
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
public void testPropertyDelegateWithPrivateSet() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user