[NI] Improve CST algorithm to handle non-fixed variables

#KT-32456 Fixed
 #KT-32423 Fixed
 #KT-32818 Fixed
 #KT-33197 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-08-28 01:23:18 +03:00
parent ba6648d535
commit ca8da22569
41 changed files with 605 additions and 81 deletions
@@ -10183,6 +10183,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/cstFromNullableChildAndNonParameterizedType.kt");
}
@TestMetadata("cstWithTypeContainingNonFixedVariable.kt")
public void testCstWithTypeContainingNonFixedVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/cstWithTypeContainingNonFixedVariable.kt");
}
@TestMetadata("dontCaptureTypeVariable.kt")
public void testDontCaptureTypeVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/dontCaptureTypeVariable.kt");
@@ -10213,6 +10218,16 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt31969.kt");
}
@TestMetadata("kt32818.kt")
public void testKt32818() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.kt");
}
@TestMetadata("kt33197.kt")
public void testKt33197() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt33197.kt");
}
@TestMetadata("kt3372toCollection.kt")
public void testKt3372toCollection() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt3372toCollection.kt");
@@ -10238,6 +10253,16 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt");
}
@TestMetadata("nonFixedVariableInsideFlexibleType.kt")
public void testNonFixedVariableInsideFlexibleType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nonFixedVariableInsideFlexibleType.kt");
}
@TestMetadata("outProjectedTypeToOutProjected.kt")
public void testOutProjectedTypeToOutProjected() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/outProjectedTypeToOutProjected.kt");
}
@TestMetadata("postponedCompletionWithExactAnnotation.kt")
public void testPostponedCompletionWithExactAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/postponedCompletionWithExactAnnotation.kt");
@@ -10178,6 +10178,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/cstFromNullableChildAndNonParameterizedType.kt");
}
@TestMetadata("cstWithTypeContainingNonFixedVariable.kt")
public void testCstWithTypeContainingNonFixedVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/cstWithTypeContainingNonFixedVariable.kt");
}
@TestMetadata("dontCaptureTypeVariable.kt")
public void testDontCaptureTypeVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/dontCaptureTypeVariable.kt");
@@ -10208,6 +10213,16 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt31969.kt");
}
@TestMetadata("kt32818.kt")
public void testKt32818() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.kt");
}
@TestMetadata("kt33197.kt")
public void testKt33197() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt33197.kt");
}
@TestMetadata("kt3372toCollection.kt")
public void testKt3372toCollection() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt3372toCollection.kt");
@@ -10233,6 +10248,16 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt");
}
@TestMetadata("nonFixedVariableInsideFlexibleType.kt")
public void testNonFixedVariableInsideFlexibleType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nonFixedVariableInsideFlexibleType.kt");
}
@TestMetadata("outProjectedTypeToOutProjected.kt")
public void testOutProjectedTypeToOutProjected() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/outProjectedTypeToOutProjected.kt");
}
@TestMetadata("postponedCompletionWithExactAnnotation.kt")
public void testPostponedCompletionWithExactAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/commonSystem/postponedCompletionWithExactAnnotation.kt");
@@ -10334,6 +10334,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("genericElvisWithMoreSpecificLHS.kt")
public void testGenericElvisWithMoreSpecificLHS() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericElvisWithMoreSpecificLHS.kt");
}
@TestMetadata("genericElvisWithNullLHS.kt")
public void testGenericElvisWithNullLHS() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericElvisWithNullLHS.kt");
}
@TestMetadata("genericNull.kt")
public void testGenericNull() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericNull.kt");
@@ -10334,6 +10334,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("genericElvisWithMoreSpecificLHS.kt")
public void testGenericElvisWithMoreSpecificLHS() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericElvisWithMoreSpecificLHS.kt");
}
@TestMetadata("genericElvisWithNullLHS.kt")
public void testGenericElvisWithNullLHS() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericElvisWithNullLHS.kt");
}
@TestMetadata("genericNull.kt")
public void testGenericNull() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericNull.kt");
@@ -9214,6 +9214,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
}
@TestMetadata("genericElvisWithMoreSpecificLHS.kt")
public void testGenericElvisWithMoreSpecificLHS() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericElvisWithMoreSpecificLHS.kt");
}
@TestMetadata("genericElvisWithNullLHS.kt")
public void testGenericElvisWithNullLHS() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericElvisWithNullLHS.kt");
}
@TestMetadata("genericNull.kt")
public void testGenericNull() throws Exception {
runTest("compiler/testData/codegen/box/elvis/genericNull.kt");