[Analysis API] Fix exceptions around type parameters being treated as callables
- `toResolvedCallableSymbol`: cast defensively because the resolved symbol might not be a callable symbol. - `toKtCallInfo`: Check that the resolved symbol is actually callable. ^KTIJ-23003 fixed
This commit is contained in:
committed by
teamcity
parent
170c19d293
commit
c5e5140c08
+6
@@ -898,6 +898,12 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCallTestGenerated ext
|
||||
public void testGetterAssignment() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/getterAssignment.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterAsValue.kt")
|
||||
public void testTypeParameterAsValue() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/typeParameterAsValue.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -127,6 +127,12 @@ public class FirStandaloneNormalAnalysisSourceModuleAnalysisApiImportOptimizerTe
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedTypeHiddenByTypeParameter_invalidAsArgument.kt")
|
||||
public void testUnusedTypeHiddenByTypeParameter_invalidAsArgument() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unusedTypeHiddenByTypeParameter_invalidAsArgument.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("usedConstructor_invalidArguments.kt")
|
||||
public void testUsedConstructor_invalidArguments() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user