| Index: pkg/analyzer/test/generated/resolver_test.dart
|
| diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
|
| index 951466c9539d3ae17f7dc5b6f17722eb0ebb2432..11995f9bce290ec5e5590be0323e4069b2287359 100644
|
| --- a/pkg/analyzer/test/generated/resolver_test.dart
|
| +++ b/pkg/analyzer/test/generated/resolver_test.dart
|
| @@ -2727,6 +2727,18 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify([source]);
|
| }
|
|
|
| + void test_initializerForNonExistent_const() {
|
| + // Check that the absence of a matching field doesn't cause a
|
| + // crash during constant evaluation.
|
| + Source source = addSource(EngineTestCase.createSource([
|
| + "class A {",
|
| + " const A() : x = 'foo';",
|
| + "}",
|
| + "A a = const A();"]));
|
| + resolve(source);
|
| + assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTANT_FIELD]);
|
| + }
|
| +
|
| void test_initializerForNonExistant_initializer() {
|
| Source source = addSource(EngineTestCase.createSource(["class A {", " A() : x = 0 {}", "}"]));
|
| resolve(source);
|
|
|