| Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| index da6980435f283b9030a549a8697df9a540c04981..c365c9f90bfd8b613736c5b44e81a4448cc81d92 100644
|
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| @@ -3251,6 +3251,19 @@ f() {
|
| // We cannot verify resolution with undefined labels
|
| }
|
|
|
| + void test_length_of_erroneous_constant() {
|
| + // Attempting to compute the length of constant that couldn't be evaluated
|
| + // (due to an error) should not crash the analyzer (see dartbug.com/23383)
|
| + Source source = addSource("const int i = (1 ? 'alpha' : 'beta').length;");
|
| + resolve(source);
|
| + assertErrors(source, [
|
| + CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
|
| + CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
|
| + StaticTypeWarningCode.NON_BOOL_CONDITION
|
| + ]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_memberWithClassName_field() {
|
| Source source = addSource(r'''
|
| class A {
|
|
|