| Index: tests/language/const_constructor_nonconst_field_test.dart
|
| diff --git a/tests/language/regress_12561_test.dart b/tests/language/const_constructor_nonconst_field_test.dart
|
| similarity index 64%
|
| copy from tests/language/regress_12561_test.dart
|
| copy to tests/language/const_constructor_nonconst_field_test.dart
|
| index 21acb0e51951407b03c3d35581944ac4029cb09f..9571a408a13a3cdf66626af502d090e26e512d3c 100644
|
| --- a/tests/language/regress_12561_test.dart
|
| +++ b/tests/language/const_constructor_nonconst_field_test.dart
|
| @@ -4,12 +4,14 @@
|
|
|
| import "package:expect/expect.dart";
|
|
|
| -class C {
|
| - noSuchMethod(int x, int y) => x + y;
|
| +class A {
|
| + final int i = f(); /// 01: compile-time error
|
| + final int j = 1;
|
| + const A();
|
| +}
|
| +int f() {
|
| + return 3;
|
| }
|
| -
|
| main() {
|
| - Expect.throws(() => new C().foo, (e) => e is Error);
|
| + Expect.equals(const A().j, 1);
|
| }
|
| -
|
| -
|
|
|