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

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

Issue 25605002: 'const' instance creation with incompatible argument types is statis warning. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/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 83f8a34235a2d94dd0f738a3cc44decc2b283ced..d604698bbc2ebd89e8661536777122881fadabbe 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
@@ -147,32 +147,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
- public void test_argumentTypeNotAssignable_const() throws Exception {
- Source source = addSource(createSource(//
- "class A {",
- " const A(String p);",
- "}",
- "main() {",
- " const A(42);",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
- verify(source);
- }
-
- public void test_argumentTypeNotAssignable_const_super() throws Exception {
- Source source = addSource(createSource(//
- "class A {",
- " const A(String p);",
- "}",
- "class B extends A {",
- " const B() : super(42);",
- "}"));
- resolve(source);
- assertErrors(source, CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
- verify(source);
- }
-
public void test_builtInIdentifierAsType() throws Exception {
Source source = addSource(createSource(//
"f() {",
@@ -2515,7 +2489,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
assertErrors(
source,
CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
- CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
verify(source);
}
@@ -2529,7 +2503,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
assertErrors(
source,
CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
- CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
verify(source);
}
@@ -3538,7 +3512,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
assertErrors(
source,
CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
- CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
verify(source);
reset();
}
@@ -3553,7 +3527,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
assertErrors(
source,
CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
- CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
verify(source);
reset();
}

Powered by Google App Engine
This is Rietveld 408576698