Chromium Code Reviews

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java

Issue 9250017: Allow classes shadowed by type variables to be referenced in static context (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: oops, left bad test in. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
index ae21284252ebf7fcb5cff4f1d3db36b1af0b4a6f..3d3e65f7dbe5f17be2509842b7cd2048108de3f9 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -63,8 +63,9 @@ abstract class ResolverTestCase extends TestCase {
static Scope resolve(DartUnit unit, TestCompilerContext context) {
LibraryUnit libraryUnit = MockLibraryUnit.create(unit);
+
// Prepare for running phases.
- Scope scope = new Scope("library", libraryUnit.getElement());
+ Scope scope = libraryUnit.getElement().getScope();
CoreTypeProvider typeProvider = setupTypeProvider(unit, context, scope);
// Run phases as in compiler.
new SupertypeResolver().exec(unit, context, scope, typeProvider);
@@ -77,7 +78,7 @@ abstract class ResolverTestCase extends TestCase {
static Scope resolveCompileTimeConst(DartUnit unit, TestCompilerContext context) {
LibraryUnit libraryUnit = MockLibraryUnit.create(unit);
// Prepare for running phases.
- Scope scope = new Scope("library", libraryUnit.getElement());
+ Scope scope = libraryUnit.getElement().getScope();
CoreTypeProvider typeProvider = setupTypeProvider(unit, context, scope);
// Run phases as in compiler.
new SupertypeResolver().exec(unit, context, scope, typeProvider);
@@ -140,7 +141,6 @@ abstract class ResolverTestCase extends TestCase {
private final InterfaceType defaultListType;
private final ClassElement objectElement;
-
{
ClassElement dynamicElement = Elements.classNamed("Dynamic");
dynamicType = Types.interfaceType(dynamicElement, Collections.<Type>emptyList());
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine