KT-62071 [AA] Do not throw error from getScopeContextForPosition when implicitScope of receiver value is null
`implicitScope` can be `null` in case when the implicit receiver resides in a user-defined `kotlin.*` package, but the user have not yet allowed this with compiler argument directive. In this case, we don't want the IDE to crush and show exceptions - the `kotlin` package would be highlighted by the compiler diagnostics and other resolve problems, and that would be enough ^KT-62071 Fixed
This commit is contained in:
+6
@@ -100,6 +100,12 @@ public class FirStandaloneNormalAnalysisSourceModuleScopeContextForPositionTestG
|
||||
runTest("analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notEnabledKotlinPackage.kt")
|
||||
public void testNotEnabledKotlinPackage() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/notEnabledKotlinPackage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleScopeContextForPosition.kt")
|
||||
public void testSimpleScopeContextForPosition() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user