| Index: tests/language/propagate_past_constant_test.dart
|
| diff --git a/tests/language/regress_21998_1_test.dart b/tests/language/propagate_past_constant_test.dart
|
| similarity index 56%
|
| copy from tests/language/regress_21998_1_test.dart
|
| copy to tests/language/propagate_past_constant_test.dart
|
| index 3237f3396629f6fd11270e1adc290bec78713958..dcb30eb74b2f3dfb4fa894030b0d59bd150e505b 100644
|
| --- a/tests/language/regress_21998_1_test.dart
|
| +++ b/tests/language/propagate_past_constant_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());
|
| -}
|
| +foo(x) => x;
|
|
|
| -class C {
|
| - max(a) => a;
|
| +check(y) {
|
| + Expect.equals('foo', y);
|
| +}
|
|
|
| - m() {
|
| - return max(Math.max(2, 4));
|
| - }
|
| -}
|
| +main() {
|
| + var x = foo('foo');
|
| + var y = foo(x);
|
| + x = 'constant';
|
| + check(y); // 'y' should not propagate here unless reference to 'x' is rewritten
|
| + foo(x);
|
| + foo(x);
|
| +}
|
|
|