[FIR] create error type ref for parameter when one is required instead of implicit type in RawFirBuilder

Needed to avoid failure during lazy resolving of corresponding declarations in the IDE

^KTIJ-22357 fixed
This commit is contained in:
Ilya Kirillov
2022-08-08 19:45:20 +02:00
parent b27115c793
commit 107a8e4d92
26 changed files with 437 additions and 23 deletions
@@ -290,6 +290,64 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizerTe
}
}
}
@Nested
@TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType")
@TestDataPath("$PROJECT_ROOT")
public class NoParameterType {
@Test
public void testAllFilesPresentInNoParameterType() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("noParameterTypRefInCatch.kt")
public void testNoParameterTypRefInCatch() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInCatch.kt");
}
@Test
@TestMetadata("noParameterTypRefInFuncionalType.kt")
public void testNoParameterTypRefInFuncionalType() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInFuncionalType.kt");
}
@Test
@TestMetadata("noParameterTypRefInFunction.kt")
public void testNoParameterTypRefInFunction() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInFunction.kt");
}
@Test
@TestMetadata("noParameterTypRefInLambda.kt")
public void testNoParameterTypRefInLambda() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInLambda.kt");
}
@Test
@TestMetadata("noParameterTypRefInPrimaryConstructor.kt")
public void testNoParameterTypRefInPrimaryConstructor() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInPrimaryConstructor.kt");
}
@Test
@TestMetadata("noParameterTypRefInPrimaryConsturctorVal.kt")
public void testNoParameterTypRefInPrimaryConsturctorVal() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInPrimaryConsturctorVal.kt");
}
@Test
@TestMetadata("noParameterTypRefInSecondaryConstructor.kt")
public void testNoParameterTypRefInSecondaryConstructor() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInSecondaryConstructor.kt");
}
@Test
@TestMetadata("noParameterTypRefInSetter.kt")
public void testNoParameterTypRefInSetter() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInSetter.kt");
}
}
}
@Nested
@@ -290,6 +290,64 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizerTe
}
}
}
@Nested
@TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType")
@TestDataPath("$PROJECT_ROOT")
public class NoParameterType {
@Test
public void testAllFilesPresentInNoParameterType() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("noParameterTypRefInCatch.kt")
public void testNoParameterTypRefInCatch() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInCatch.kt");
}
@Test
@TestMetadata("noParameterTypRefInFuncionalType.kt")
public void testNoParameterTypRefInFuncionalType() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInFuncionalType.kt");
}
@Test
@TestMetadata("noParameterTypRefInFunction.kt")
public void testNoParameterTypRefInFunction() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInFunction.kt");
}
@Test
@TestMetadata("noParameterTypRefInLambda.kt")
public void testNoParameterTypRefInLambda() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInLambda.kt");
}
@Test
@TestMetadata("noParameterTypRefInPrimaryConstructor.kt")
public void testNoParameterTypRefInPrimaryConstructor() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInPrimaryConstructor.kt");
}
@Test
@TestMetadata("noParameterTypRefInPrimaryConsturctorVal.kt")
public void testNoParameterTypRefInPrimaryConsturctorVal() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInPrimaryConsturctorVal.kt");
}
@Test
@TestMetadata("noParameterTypRefInSecondaryConstructor.kt")
public void testNoParameterTypRefInSecondaryConstructor() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInSecondaryConstructor.kt");
}
@Test
@TestMetadata("noParameterTypRefInSetter.kt")
public void testNoParameterTypRefInSetter() throws Exception {
runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noParameterType/noParameterTypRefInSetter.kt");
}
}
}
@Nested