| Index: tests/language/dead_field_access_test.dart
|
| diff --git a/tests/language/regress_21998_1_test.dart b/tests/language/dead_field_access_test.dart
|
| similarity index 61%
|
| copy from tests/language/regress_21998_1_test.dart
|
| copy to tests/language/dead_field_access_test.dart
|
| index 3237f3396629f6fd11270e1adc290bec78713958..e3fc11b6c5f33af074b45ea57a53194aadb20daa 100644
|
| --- a/tests/language/regress_21998_1_test.dart
|
| +++ b/tests/language/dead_field_access_test.dart
|
| @@ -2,17 +2,19 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -import 'dart:math' as Math;
|
| import 'package:expect/expect.dart';
|
|
|
| -main() {
|
| - Expect.equals(4, new C().m());
|
| +class Foo {
|
| + var field = 10;
|
| }
|
|
|
| -class C {
|
| - max(a) => a;
|
| +@NoInline()
|
| +getField(x) {
|
| + x.field;
|
| + return 34;
|
| +}
|
|
|
| - m() {
|
| - return max(Math.max(2, 4));
|
| - }
|
| -}
|
| +main() {
|
| + Expect.equals(34, getField(new Foo()));
|
| + Expect.throws(() => getField(null));
|
| +}
|
|
|