| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java
|
| index 94f98c830da622f33b95417a9d5a1486e41d65ae..8b7c4c7e43c6527e93315b0c92f043a1d1055894 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java
|
| @@ -15,6 +15,7 @@ import com.google.dart.compiler.ast.DartFunctionTypeAlias;
|
| import com.google.dart.compiler.ast.DartNode;
|
| import com.google.dart.compiler.ast.DartStatement;
|
| import com.google.dart.compiler.ast.DartUnit;
|
| +import com.google.dart.compiler.ast.LibraryUnit;
|
| import com.google.dart.compiler.parser.DartParser;
|
| import com.google.dart.compiler.parser.DartScannerParserContext;
|
| import com.google.dart.compiler.resolver.ClassElement;
|
| @@ -23,6 +24,7 @@ import com.google.dart.compiler.resolver.Element;
|
| import com.google.dart.compiler.resolver.Elements;
|
| import com.google.dart.compiler.resolver.FunctionAliasElement;
|
| import com.google.dart.compiler.resolver.MemberBuilder;
|
| +import com.google.dart.compiler.resolver.MockLibraryUnit;
|
| import com.google.dart.compiler.resolver.ResolutionContext;
|
| import com.google.dart.compiler.resolver.Resolver;
|
| import com.google.dart.compiler.resolver.Resolver.ResolveElementsVisitor;
|
| @@ -259,7 +261,8 @@ public abstract class TypeAnalyzerTestCase extends TypeTestCase {
|
| }
|
|
|
| private Scope getMockScope(String name) {
|
| - return new Scope(name, null, new MockScope());
|
| + LibraryUnit libraryUnit = MockLibraryUnit.create();
|
| + return new Scope(name, libraryUnit.getElement(), new MockScope());
|
| }
|
|
|
| private DartParser getParser(String string) {
|
| @@ -316,6 +319,7 @@ public abstract class TypeAnalyzerTestCase extends TypeTestCase {
|
| }
|
| }
|
| Scope scope = getMockScope("<test toplevel>");
|
| + unit.setLibrary(scope.getLibrary().getLibraryUnit());
|
| SupertypeResolver supertypeResolver = new SupertypeResolver();
|
| supertypeResolver.exec(unit, context, scope, typeProvider);
|
| MemberBuilder memberBuilder = new MemberBuilder();
|
|
|