Renamed method and got rid of some usages.
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ public class BuiltinsDeserializationTest extends KotlinTestWithEnvironment {
|
||||
}
|
||||
|
||||
public void testBuiltIns() throws Exception {
|
||||
Collection<DeclarationDescriptor> allDescriptors = KotlinBuiltIns.getInstance().getBuiltInsScope().getAllDescriptors();
|
||||
Collection<DeclarationDescriptor> allDescriptors = KotlinBuiltIns.getInstance().getBuiltInsPackageScope().getAllDescriptors();
|
||||
PackageFragmentDescriptor actualPackage = getDeserializedDescriptorsAsPackage(allDescriptors);
|
||||
|
||||
RecursiveDescriptorComparator.Configuration configuration = RecursiveDescriptorComparator.RECURSIVE.withRenderer(
|
||||
|
||||
@@ -254,7 +254,7 @@ public abstract class ExpectedResolveData {
|
||||
|
||||
JetType actualType = bindingContext.get(BindingContext.TYPE, typeReference);
|
||||
assertNotNull("Type " + name + " not resolved for reference " + name, actualType);
|
||||
ClassifierDescriptor expectedClass = builtIns.getBuiltInsScope().getClassifier(Name.identifier(name.substring(STANDARD_PREFIX.length())));
|
||||
ClassifierDescriptor expectedClass = builtIns.getBuiltInClassByName(Name.identifier(name.substring(STANDARD_PREFIX.length())));
|
||||
assertNotNull("Expected class not found: " + name);
|
||||
assertSame("Type resolution mismatch: ", expectedClass.getTypeConstructor(), actualType.getConstructor());
|
||||
continue;
|
||||
@@ -311,7 +311,7 @@ public abstract class ExpectedResolveData {
|
||||
TypeConstructor expectedTypeConstructor;
|
||||
if (typeName.startsWith(STANDARD_PREFIX)) {
|
||||
String name = typeName.substring(STANDARD_PREFIX.length());
|
||||
ClassifierDescriptor expectedClass = builtIns.getBuiltInsScope().getClassifier(Name.identifier(name));
|
||||
ClassifierDescriptor expectedClass = builtIns.getBuiltInClassByName(Name.identifier(name));
|
||||
|
||||
assertNotNull("Expected class not found: " + typeName, expectedClass);
|
||||
expectedTypeConstructor = expectedClass.getTypeConstructor();
|
||||
|
||||
@@ -69,7 +69,7 @@ public class JetDefaultModalityModifiersTest extends JetLiteFixture {
|
||||
InjectorForTests injector = new InjectorForTests(getProject(), root);
|
||||
KotlinBuiltIns builtIns = injector.getKotlinBuiltIns();
|
||||
descriptorResolver = injector.getDescriptorResolver();
|
||||
scope = createScope(builtIns.getBuiltInsScope());
|
||||
scope = createScope(builtIns.getBuiltInsPackageScope());
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
|
||||
@@ -182,7 +182,7 @@ public class JetOverloadTest extends JetLiteFixture {
|
||||
|
||||
private FunctionDescriptor makeFunction(String funDecl) {
|
||||
JetNamedFunction function = JetPsiFactory.createFunction(getProject(), funDecl);
|
||||
return descriptorResolver.resolveFunctionDescriptor(root, builtIns.getBuiltInsScope(), function,
|
||||
return descriptorResolver.resolveFunctionDescriptor(root, builtIns.getBuiltInsPackageScope(), function,
|
||||
JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class JetOverridingTest extends JetLiteFixture {
|
||||
|
||||
private FunctionDescriptor makeFunction(String funDecl) {
|
||||
JetNamedFunction function = JetPsiFactory.createFunction(getProject(), funDecl);
|
||||
return descriptorResolver.resolveFunctionDescriptor(root, builtIns.getBuiltInsScope(), function,
|
||||
return descriptorResolver.resolveFunctionDescriptor(root, builtIns.getBuiltInsPackageScope(), function,
|
||||
JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class TypeSubstitutorTest extends KotlinTestWithEnvironment {
|
||||
topLevelDeclarations,
|
||||
typeParameters,
|
||||
contextClass.getDefaultType().getMemberScope(),
|
||||
KotlinBuiltIns.getInstance().getBuiltInsScope());
|
||||
KotlinBuiltIns.getInstance().getBuiltInsPackageScope());
|
||||
}
|
||||
|
||||
private void doTest(@Nullable String expectedTypeStr, String initialTypeStr, Pair<String, String>... substitutionStrs) {
|
||||
|
||||
@@ -198,7 +198,7 @@ public class TypeUnifierTest extends JetLiteFixture {
|
||||
}
|
||||
|
||||
private TypeProjection makeType(String typeStr) {
|
||||
return makeTypeProjection(builtIns.getBuiltInsScope(), typeStr);
|
||||
return makeTypeProjection(builtIns.getBuiltInsPackageScope(), typeStr);
|
||||
}
|
||||
|
||||
private TypeProjection makeTypeProjection(JetScope scope, String typeStr) {
|
||||
|
||||
Reference in New Issue
Block a user