Refactoring FileScope into a chain of ImportingScope's (all compiler tests pass)

This commit is contained in:
Valentin Kipyatkov
2015-10-23 21:02:41 +03:00
parent 712e294eac
commit 9eeb051bd4
44 changed files with 266 additions and 258 deletions
@@ -137,7 +137,7 @@ public class JetExpectedResolveDataUtil {
emptyModule.initialize(PackageFragmentProvider.Empty.INSTANCE$);
ExpressionTypingContext context = ExpressionTypingContext.newContext(
new BindingTraceContext(), ScopeUtilsKt.memberScopeAsFileScope(classDescriptor.getDefaultType().getMemberScope()),
new BindingTraceContext(), ScopeUtilsKt.memberScopeAsImportingScope(classDescriptor.getDefaultType().getMemberScope()),
DataFlowInfo.EMPTY, TypeUtils.NO_EXPECTED_TYPE);
OverloadResolutionResults<FunctionDescriptor> functions = container.getFakeCallResolver().resolveFakeCall(
@@ -171,7 +171,7 @@ public class JetOverloadTest extends JetLiteFixture {
private FunctionDescriptor makeFunction(String funDecl) {
KtNamedFunction function = KtPsiFactoryKt.KtPsiFactory(getProject()).createFunction(funDecl);
ImportingScope scope = ScopeUtilsKt.memberScopeAsFileScope(JvmPlatform.INSTANCE$.getBuiltIns().getBuiltInsPackageScope());
ImportingScope scope = ScopeUtilsKt.memberScopeAsImportingScope(JvmPlatform.INSTANCE$.getBuiltIns().getBuiltInsPackageScope());
return functionDescriptorResolver.resolveFunctionDescriptor(root, scope, function, JetTestUtils.DUMMY_TRACE, DataFlowInfo.EMPTY);
}
}