Minor. Move LockLevel to LexicalWritableScope
This commit is contained in:
+1
-1
@@ -189,7 +189,7 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
|
||||
init {
|
||||
val writableScope = WritableScopeImpl(KtScope.Empty, this, RedeclarationHandler.THROW_EXCEPTION, "runtime descriptor loader test")
|
||||
classes.forEach { writableScope.addClassifierDescriptor(it) }
|
||||
writableScope.changeLockLevel(WritableScope.LockLevel.READING)
|
||||
writableScope.changeLockLevel(LexicalWritableScope.LockLevel.READING)
|
||||
scope = ChainedScope(this, "synthetic package view for test", writableScope, *packageScopes.toTypedArray())
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,7 @@ import org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo;
|
||||
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil;
|
||||
import org.jetbrains.kotlin.resolve.lazy.ResolveSession;
|
||||
import org.jetbrains.kotlin.resolve.lazy.declarations.FileBasedDeclarationProviderFactory;
|
||||
import org.jetbrains.kotlin.resolve.scopes.KtScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.RedeclarationHandler;
|
||||
import org.jetbrains.kotlin.resolve.scopes.WritableScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.WritableScopeImpl;
|
||||
import org.jetbrains.kotlin.resolve.scopes.*;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
@@ -94,7 +91,7 @@ public class DefaultModalityModifiersTest extends KotlinLiteFixture {
|
||||
libraryScope, root, RedeclarationHandler.DO_NOTHING, "JetDefaultModalityModifiersTest");
|
||||
assert classDescriptor instanceof ClassifierDescriptor;
|
||||
scope.addClassifierDescriptor((ClassifierDescriptor) classDescriptor);
|
||||
scope.changeLockLevel(WritableScope.LockLevel.READING);
|
||||
scope.changeLockLevel(LexicalWritableScope.LockLevel.READING);
|
||||
return scope;
|
||||
}
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ public class KotlinTypeCheckerTest extends KotlinLiteFixture {
|
||||
}
|
||||
}
|
||||
scopeChain.add(module.getPackage(FqName.ROOT).getMemberScope());
|
||||
writableScope.changeLockLevel(WritableScope.LockLevel.BOTH);
|
||||
writableScope.changeLockLevel(LexicalWritableScope.LockLevel.BOTH);
|
||||
return new ChainedScope(scope.getContainingDeclaration(), "JetTypeCheckerTest.addImports scope with imports", scopeChain.toArray(new KtScope[scopeChain.size()]));
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class TypeSubstitutorTest extends KotlinTestWithEnvironment {
|
||||
for (TypeParameterDescriptor parameterDescriptor : contextClass.getTypeConstructor().getParameters()) {
|
||||
typeParameters.addClassifierDescriptor(parameterDescriptor);
|
||||
}
|
||||
typeParameters.changeLockLevel(WritableScope.LockLevel.READING);
|
||||
typeParameters.changeLockLevel(LexicalWritableScope.LockLevel.READING);
|
||||
return new ChainedScope(module,
|
||||
"TypeSubstitutorTest::getContextScope()",
|
||||
topLevelDeclarations,
|
||||
|
||||
@@ -32,10 +32,7 @@ import org.jetbrains.kotlin.psi.KtPsiFactoryKt;
|
||||
import org.jetbrains.kotlin.psi.KtTypeProjection;
|
||||
import org.jetbrains.kotlin.psi.KtTypeReference;
|
||||
import org.jetbrains.kotlin.resolve.TypeResolver;
|
||||
import org.jetbrains.kotlin.resolve.scopes.KtScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.RedeclarationHandler;
|
||||
import org.jetbrains.kotlin.resolve.scopes.WritableScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.WritableScopeImpl;
|
||||
import org.jetbrains.kotlin.resolve.scopes.*;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.KotlinLiteFixture;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
@@ -205,7 +202,7 @@ public class TypeUnifierTest extends KotlinLiteFixture {
|
||||
new WritableScopeImpl(scope, scope.getContainingDeclaration(), RedeclarationHandler.DO_NOTHING, "With X");
|
||||
withX.addClassifierDescriptor(x);
|
||||
withX.addClassifierDescriptor(y);
|
||||
withX.changeLockLevel(WritableScope.LockLevel.READING);
|
||||
withX.changeLockLevel(LexicalWritableScope.LockLevel.READING);
|
||||
|
||||
KtTypeProjection projection = KtPsiFactoryKt
|
||||
.KtPsiFactory(getProject()).createTypeArguments("<" + typeStr + ">").getArguments().get(0);
|
||||
|
||||
Reference in New Issue
Block a user