| Index: tests/compiler/dart2js_extra/if_null3_test.dart
|
| diff --git a/tests/language/vm/regress_23238_test.dart b/tests/compiler/dart2js_extra/if_null3_test.dart
|
| similarity index 50%
|
| copy from tests/language/vm/regress_23238_test.dart
|
| copy to tests/compiler/dart2js_extra/if_null3_test.dart
|
| index 88250b2a9a924295387efae3bf3b086624d69668..dac99e0d0272f4060e129759a3efbfc8fc037711 100644
|
| --- a/tests/language/vm/regress_23238_test.dart
|
| +++ b/tests/compiler/dart2js_extra/if_null3_test.dart
|
| @@ -2,14 +2,13 @@
|
| // 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.
|
|
|
| +/// Regression for #24135: inference was not tracking `[]??=` correctly.
|
| +library tests.compiler.dart2js_extra.if_null3_test;
|
| +
|
| import "package:expect/expect.dart";
|
|
|
| void main() {
|
| - int x = 327680;
|
| - int r = 65536;
|
| - for (var i = 0; i < 200; i++) {
|
| - Expect.equals(r, x ~/ 5);
|
| - x *= 10;
|
| - r *= 10;
|
| - }
|
| + var map;
|
| + (((map ??= {})['key1'] ??= {})['key2'] ??= {})['key3'] = 'value';
|
| + Expect.equals('{key1: {key2: {key3: value}}}', '$map');
|
| }
|
|
|