K2 Scripting: fix locality of script declarations
the script declarations are considered public, at least because they can be reused from another script then used with the `importedScripts` configuration property. It also improves the compatibility with K1 scripting.
This commit is contained in:
committed by
Space Team
parent
020a590df7
commit
1d88c307ea
@@ -247,7 +247,7 @@ public class KtNamedFunction extends KtTypeParameterListOwnerStub<KotlinFunction
|
||||
@Override
|
||||
public boolean isLocal() {
|
||||
PsiElement parent = getParent();
|
||||
return !(parent instanceof KtFile || parent instanceof KtClassBody);
|
||||
return !(parent instanceof KtFile || parent instanceof KtClassBody || parent.getParent() instanceof KtScript);
|
||||
}
|
||||
|
||||
public boolean isAnonymous() {
|
||||
|
||||
Reference in New Issue
Block a user