| Index: compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java (revision 2324)
|
| +++ compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java (working copy)
|
| @@ -49,10 +49,10 @@
|
| this.fallThroughError = getType("FallThroughError", scope, listener);
|
| this.mapType = getType("Map", scope, listener);
|
| this.mapLiteralType = getType("LinkedHashMapImplementation", scope, listener);
|
| - this.objectArrayType = getType("ListImplementation", scope, listener);
|
| + this.objectArrayType = getType(new String[] {"ListImplementation", "GrowableObjectArray"}, scope, listener);
|
| this.objectType = getType("Object", scope, listener);
|
| this.isolateType = getType("Isolate", scope, listener);
|
| - this.stringImplementation = getType("StringImplementation", scope, listener);
|
| + this.stringImplementation = getType(new String[] {"StringImplementation", "OneByteString"}, scope, listener);
|
| iteratorType = getType("Iterator", scope, listener);
|
| }
|
|
|
| @@ -68,6 +68,23 @@
|
| return element.getType();
|
| }
|
|
|
| + private static InterfaceType getType(String[] names, Scope scope, DartCompilerListener listener) {
|
| + ClassElement element = null;
|
| + for (String name : names) {
|
| + element = (ClassElement) scope.findElement(scope.getLibrary(), name);
|
| + if (element != null)
|
| + break;
|
| + }
|
| + if (element == null) {
|
| + DartCompilationError error =
|
| + new DartCompilationError(null, Location.NONE,
|
| + ResolverErrorCode.CANNOT_BE_RESOLVED, names[0]);
|
| + listener.onError(error);
|
| + return Types.newDynamicType();
|
| + }
|
| + return element.getType();
|
| + }
|
| +
|
| @Override
|
| public InterfaceType getIntType() {
|
| return intType;
|
|
|