| 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 428b73617ab9af9736c79e690595a2f2e8e1cffa..6d11c39a5e40cadcabd7e1750ac3ea504c58ddbf 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
|
| @@ -683,6 +683,13 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| check_constEvalTypeNum_withParameter_binary("p % ''");
|
| }
|
|
|
| + public void test_constEvalTypeNum_plus_String() throws Exception {
|
| + Source source = addSource("const C = 'a' + 'b';");
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.CONST_EVAL_TYPE_NUM);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_constFormalParameter_fieldFormalParameter() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
| @@ -2498,7 +2505,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| " const A(String p) : a = p && true;",
|
| "}"));
|
| resolve(source);
|
| - assertErrors(CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER);
|
| + assertErrors(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
|
| verify(source);
|
| }
|
|
|
| @@ -2509,7 +2516,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| " const A(String p) : a = true && p;",
|
| "}"));
|
| resolve(source);
|
| - assertErrors(CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER);
|
| + assertErrors(CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL);
|
| verify(source);
|
| }
|
|
|
| @@ -2521,7 +2528,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| "}"));
|
| resolve(source);
|
| assertErrors(
|
| - CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
|
| + CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
|
| CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
|
| verify(source);
|
| }
|
| @@ -2534,7 +2541,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| "}"));
|
| resolve(source);
|
| assertErrors(
|
| - CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
|
| + CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
|
| CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
|
| verify(source);
|
| }
|
|
|