Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/resolver/TestTypeProvider.java

Issue 261403004: In constant evaluation, properly handle redirecting factory constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/resolver/TestTypeProvider.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/resolver/TestTypeProvider.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/resolver/TestTypeProvider.java
index 3b480b9c8ce18d37f4bcc54ea49c11881ea4e6e7..c020061e7801d4920e76a36aa1de73a5e37c8d38 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/resolver/TestTypeProvider.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/resolver/TestTypeProvider.java
@@ -18,6 +18,7 @@ import com.google.dart.engine.element.FieldElement;
import com.google.dart.engine.element.MethodElement;
import com.google.dart.engine.element.PropertyAccessorElement;
import com.google.dart.engine.internal.element.ClassElementImpl;
+import com.google.dart.engine.internal.element.ConstructorElementImpl;
import com.google.dart.engine.internal.type.BottomTypeImpl;
import com.google.dart.engine.internal.type.DynamicTypeImpl;
import com.google.dart.engine.internal.type.FunctionTypeImpl;
@@ -326,7 +327,15 @@ public class TestTypeProvider implements TypeProvider {
@Override
public InterfaceType getSymbolType() {
if (symbolType == null) {
- symbolType = classElement("Symbol").getType();
+ ClassElementImpl symbolClass = classElement("Symbol");
+ ConstructorElementImpl constructor = constructorElement(
+ symbolClass,
+ null,
+ true,
+ getStringType());
+ constructor.setFactory(true);
+ symbolClass.setConstructors(new ConstructorElement[] {constructor});
+ symbolType = symbolClass.getType();
}
return symbolType;
}

Powered by Google App Engine
This is Rietveld 408576698