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

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

Issue 14855015: Report StaticWarningCode.NEW_WITH_NON_TYPE and CompileTimeErrorCode.CONST_WITH_NON_TYPE (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments 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/StaticWarningCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
index cf959df898b60125b8e762debb75e814dddc5e24..910c56353eba1631d506c98299a70077fe7321b8 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
@@ -223,17 +223,6 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
- public void fail_newWithNonType() throws Exception {
- Source source = addSource(createSource(//
- "var A = 0;",
- "void f() {",
- " A a = new A();",
- "}"));
- resolve(source);
- assertErrors(StaticWarningCode.NEW_WITH_NON_TYPE);
- verify(source);
- }
-
public void fail_newWithUndefinedConstructor() throws Exception {
Source source = addSource(createSource(//
"class A {",
@@ -563,6 +552,17 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_newWithNonType() throws Exception {
+ Source source = addSource(createSource(//
+ "var A = 0;",
+ "void f() {",
+ " A a = new A();",
+ "}"));
+ resolve(source);
+ assertErrors(StaticWarningCode.NEW_WITH_NON_TYPE);
+ verify(source);
+ }
+
public void test_nonVoidReturnForOperator() throws Exception {
Source source = addSource(createSource(//
"class A {",

Powered by Google App Engine
This is Rietveld 408576698