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:
Roman Golyshev
2023-10-17 18:23:24 +02:00
committed by teamcity
parent eb6db02649
commit 3c68b27280
7 changed files with 158 additions and 7 deletions
@@ -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 {