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

Unified Diff: tests/language/nullaware_opt_test.dart

Issue 1273033007: Fix ??= AST modification (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 4 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/parser.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 5446171d775930479cf74f11f49eaf5ff4a7cb35..e83757a9190cd22707809fa44eef54c36411f25d 100644
--- a/tests/language/nullaware_opt_test.dart
+++ b/tests/language/nullaware_opt_test.dart
@@ -53,6 +53,12 @@ test() {
Expect.equals(201, e.f);
var x = 5 ?? bomb();
+ Expect.equals(5, x);
+
+ var y;
+ x = y ?? 1;
+ Expect.equals(1, x);
+ Expect.equals(null, y);
}
// Check that instructions without result do not crash.
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698