| Index: tests/language/propagate_past_constant_test.dart
|
| diff --git a/tests/language/regress_21998_2_test.dart b/tests/language/propagate_past_constant_test.dart
|
| similarity index 55%
|
| copy from tests/language/regress_21998_2_test.dart
|
| copy to tests/language/propagate_past_constant_test.dart
|
| index 53cace0ad782e5702a3f63c10369624363dd1984..03858b4b56aa238de47ad6417cc6e58a54e1cac3 100644
|
| --- a/tests/language/regress_21998_2_test.dart
|
| +++ b/tests/language/propagate_past_constant_test.dart
|
| @@ -2,18 +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';
|
| -import 'regress_21998_lib1.dart' as lib1;
|
|
|
| -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, lib1.max('a', 'b', 'cd').length));
|
| - }
|
| -}
|
| +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);
|
| +}
|
|
|