Skip to content

Commit 9807b83

Browse files
Markzipancommit-bot@chromium.org
authored andcommitted
[dartdevc] Restricting late hot restart tests to static and top-level fields.
Change-Id: I1f9dc8c18ff17d2a09d69e4afb235cb4b57036bc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148687 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Mark Zhou <[email protected]>
1 parent fef83c9 commit 9807b83

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

tests/compiler/dartdevc_native/hot_restart_late_test.dart

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,32 @@
99
import 'package:expect/expect.dart';
1010
import 'dart:_runtime' as dart;
1111

12+
late double l;
13+
1214
class Lates {
13-
late String s;
15+
static late String s;
1416
}
1517

1618
main() {
17-
var l = Lates();
18-
19-
Expect.throws(() => l.s);
20-
l.s = "set";
21-
Expect.equals(l.s, "set");
19+
Expect.throws(() => Lates.s);
20+
Expect.throws(() => l);
21+
Lates.s = "set";
22+
l = 1.62;
23+
Expect.equals(Lates.s, "set");
24+
Expect.equals(l, 1.62);
2225

2326
dart.hotRestart();
2427

25-
Expect.throws(() => l.s);
26-
l.s = "set";
27-
Expect.equals(l.s, "set");
28+
Expect.throws(() => Lates.s);
29+
Expect.throws(() => l);
30+
Lates.s = "set";
31+
Expect.equals(Lates.s, "set");
32+
l = 1.62;
33+
Expect.equals(l, 1.62);
2834

2935
dart.hotRestart();
3036
dart.hotRestart();
3137

32-
Expect.throws(() => l.s);
38+
Expect.throws(() => Lates.s);
39+
Expect.throws(() => l);
3340
}

0 commit comments

Comments
 (0)