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

Unified Diff: tests/language/nullaware_opt_test.dart

Issue 1211593004: Fix (optimizer) crashes in conditional nodes when result is not needed. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: z Created 5 years, 6 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
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/nullaware_opt_test.dart
diff --git a/tests/language/nullaware_opt_test.dart b/tests/language/nullaware_opt_test.dart
index 096c163e47cf5fc0f1c43e646f0649918aece35b..aafb7ac5a149e0899978e04f5cbad6921e695d15 100644
--- a/tests/language/nullaware_opt_test.dart
+++ b/tests/language/nullaware_opt_test.dart
@@ -57,8 +57,16 @@ test() {
var x = 5 ?? bomb();
}
+// Check that instructions without result do not crash.
+test2() {
+ var c;
+ c?.v;
+ c?.m(bomb());
+}
+
main() {
for (int i = 0; i < 10; i++) {
test();
+ test2();
}
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698