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

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

Issue 14671018: Report CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check if name is resolved not to the enclosing ClassElement Created 7 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/resolver/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 8977b1506f9a2d175bb43d4d321ec6c6cd748219..a4670c6f35f062163e625e1817a3ef49a494220a 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -553,6 +553,16 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_invalidFactoryNameNotAClass() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " factory A() {}",
+ "}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_invalidOverrideReturnType_returnType_interface() throws Exception {
Source source = addSource("/test.dart", createSource(//
"abstract class A {",

Powered by Google App Engine
This is Rietveld 408576698