Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: tests/language_strong/nullaware_opt_test.dart

Issue 2977943002: fix #30138, synethic nodes causing crash generating source maps (Closed)
Patch Set: fix Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/language_strong/nullaware_opt_test.dart
diff --git a/tests/language_strong/nullaware_opt_test.dart b/tests/language_strong/nullaware_opt_test.dart
index 1a3ef0990e38baede3c055ac64edd0db96f746fc..0436e8b2aac64106d1412e233176264a36566ad2 100644
--- a/tests/language_strong/nullaware_opt_test.dart
+++ b/tests/language_strong/nullaware_opt_test.dart
@@ -68,9 +68,22 @@ test2() {
c?.m(bomb());
}
+class Bar {
+ String s;
+}
+
+class Foo {
+ Bar _bar;
+ String str;
+
+ Foo(this._bar) : str = _bar?.s;
+}
+
main() {
for (int i = 0; i < 10; i++) {
test();
test2();
}
+
+ Expect.equals(null, new Foo(new Bar()).str);
}

Powered by Google App Engine
This is Rietveld 408576698