Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java |
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java |
index df9f062bab61a64cf624bb7fd3c53fd4706b9834..f001ed1a58d275a1456a0e7e466a2bf5164f691b 100644 |
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java |
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java |
@@ -869,6 +869,19 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase { |
verify(source); |
} |
+ public void test_constEval_newInstance_externalFactoryConstConstructor() throws Exception { |
+ // We can't evaluate "const A()" because its constructor is external. But |
+ // the code is correct--we shouldn't report an error. |
+ Source source = addSource(createSource(// |
+ "class A {", |
+ " external factory const A();", |
+ "}", |
+ "const x = const A();")); |
+ resolve(source); |
+ assertNoErrors(source); |
+ verify(source); |
+ } |
+ |
public void test_constEval_propertyExtraction_targetNotConst() throws Exception { |
Source source = addSource(createSource(// |
"class A {", |