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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java

Issue 14654013: Report CompileTimeErrorCode.INVALID_CONST_FACTORY (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Report CONST_FACTORY in parser 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/parser/ErrorParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
index d348678667c7caf38183e546db76050c28206cef..ae86bfcb37c1a3cd79ec2cd718204b66e9678071 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
@@ -241,6 +241,14 @@ public class ErrorParserTest extends ParserTestCase {
parseCompilationUnit("const class C {}", ParserErrorCode.CONST_CLASS);
}
+ public void test_constFactory() throws Exception {
+ parse(
+ "parseClassMember",
+ new Object[] {"C"},
+ "const factory C() {}",
+ ParserErrorCode.CONST_FACTORY);
+ }
+
public void test_constMethod() throws Exception {
parse("parseClassMember", new Object[] {"C"}, "const int m() {}", ParserErrorCode.CONST_METHOD);
}

Powered by Google App Engine
This is Rietveld 408576698