| Index: tests/language/const_constructor_super2_test.dart
|
| diff --git a/tests/language/super_no_such_method3_test.dart b/tests/language/const_constructor_super2_test.dart
|
| similarity index 52%
|
| copy from tests/language/super_no_such_method3_test.dart
|
| copy to tests/language/const_constructor_super2_test.dart
|
| index 864fa787c95f822b89d4059dcedd8d1b5692c6ee..8832d2417ab5e811ad2f86bf45c31f416e2a5959 100644
|
| --- a/tests/language/super_no_such_method3_test.dart
|
| +++ b/tests/language/const_constructor_super2_test.dart
|
| @@ -4,23 +4,26 @@
|
|
|
| import 'package:expect/expect.dart';
|
|
|
| -var result;
|
| -
|
| class A {
|
| - noSuchMethod(im) {
|
| - result = 42;
|
| - }
|
| + final a;
|
| +
|
| + const A(this.a);
|
| }
|
|
|
| class B extends A {
|
| - noSuchMethod(im) {
|
| - result = 87;
|
| - }
|
| + final b;
|
|
|
| - set foo(v) => super.foo = v; /// 01: static type warning
|
| + const B(a, this.b) : super(a);
|
| }
|
|
|
| -main() {
|
| - new B().foo = 0; /// 01: continued
|
| - Expect.equals(42, result); /// 01: continued
|
| +@NoInline()
|
| +foo() => const B(1, 2);
|
| +
|
| +@NoInline()
|
| +bar() => const B(2, 2);
|
| +
|
| +void main() {
|
| + Expect.notEquals(foo(), bar());
|
| + Expect.notEquals(foo().a, bar().a);
|
| + Expect.equals(foo().b, bar().b);
|
| }
|
|
|