[FE 1.0] Don't check star projections in PrivateInlineFunctionsReturningAnonymousObjectsChecker
^KT-56692 Fixed
This commit is contained in:
committed by
Space Team
parent
2a022ca9e0
commit
cbc8b74e89
+6
@@ -17912,6 +17912,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("recursiveTypeInPrivateInlineFunction.kt")
|
||||||
|
public void testRecursiveTypeInPrivateInlineFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inline/recursiveTypeInPrivateInlineFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("returnedAnonymousObjects.kt")
|
@TestMetadata("returnedAnonymousObjects.kt")
|
||||||
public void testReturnedAnonymousObjects() throws Exception {
|
public void testReturnedAnonymousObjects() throws Exception {
|
||||||
|
|||||||
+6
@@ -17912,6 +17912,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("recursiveTypeInPrivateInlineFunction.kt")
|
||||||
|
public void testRecursiveTypeInPrivateInlineFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inline/recursiveTypeInPrivateInlineFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("returnedAnonymousObjects.kt")
|
@TestMetadata("returnedAnonymousObjects.kt")
|
||||||
public void testReturnedAnonymousObjects() throws Exception {
|
public void testReturnedAnonymousObjects() throws Exception {
|
||||||
|
|||||||
+6
@@ -17918,6 +17918,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("recursiveTypeInPrivateInlineFunction.kt")
|
||||||
|
public void testRecursiveTypeInPrivateInlineFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inline/recursiveTypeInPrivateInlineFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("returnedAnonymousObjects.kt")
|
@TestMetadata("returnedAnonymousObjects.kt")
|
||||||
public void testReturnedAnonymousObjects() throws Exception {
|
public void testReturnedAnonymousObjects() throws Exception {
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ object PrivateInlineFunctionsReturningAnonymousObjectsChecker : DeclarationCheck
|
|||||||
private fun checkTypeAndArguments(type: KotlinType, reportOn: PsiElement, context: DeclarationCheckerContext) {
|
private fun checkTypeAndArguments(type: KotlinType, reportOn: PsiElement, context: DeclarationCheckerContext) {
|
||||||
checkType(type, reportOn, context)
|
checkType(type, reportOn, context)
|
||||||
for (argument in type.arguments) {
|
for (argument in type.arguments) {
|
||||||
|
if (argument.isStarProjection) continue
|
||||||
checkTypeAndArguments(argument.type, reportOn, context)
|
checkTypeAndArguments(argument.type, reportOn, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-56692
|
||||||
|
|
||||||
|
private <!NOTHING_TO_INLINE!>inline<!> fun check(inf: Self<*>) = inf
|
||||||
|
class Self<T : Self<T>>
|
||||||
Generated
+6
@@ -17918,6 +17918,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inline/recursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("recursiveTypeInPrivateInlineFunction.kt")
|
||||||
|
public void testRecursiveTypeInPrivateInlineFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inline/recursiveTypeInPrivateInlineFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("returnedAnonymousObjects.kt")
|
@TestMetadata("returnedAnonymousObjects.kt")
|
||||||
public void testReturnedAnonymousObjects() throws Exception {
|
public void testReturnedAnonymousObjects() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user