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

Unified Diff: test/codegen/notnull.dart

Issue 1752193002: Add a few more known non-null cases (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 10 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 | « test/codegen/expect/unittest/unittest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/notnull.dart
diff --git a/test/codegen/notnull.dart b/test/codegen/notnull.dart
index b6eca41769ee323b292fe7caa70408e844b17ccf..f16e75046f16cdf84be0dd3947ca8224120a4b4a 100644
--- a/test/codegen/notnull.dart
+++ b/test/codegen/notnull.dart
@@ -94,7 +94,7 @@ void optParams([int x, int y = 1]) {
print(x + y);
}
-void namedParams({int x, int y : 1}) {
+void namedParams({int x, int y: 1}) {
print(x + y);
}
@@ -203,6 +203,20 @@ controlFlow() {
}
}
+cascadesOnNull() {
+ dynamic x = null;
+ print((x
+ ..toString()
+ ..runtimeType)
+ .hashCode);
+
+ Object y = null;
+ print((y
+ ..toString()
+ ..runtimeType)
+ .hashCode);
+}
+
main() {
intAssignments();
doubleAssignments();
@@ -216,6 +230,7 @@ main() {
calls();
localEscapes();
controlFlow();
+ cascadesOnNull();
nullableCycle();
nonNullableCycle();
« no previous file with comments | « test/codegen/expect/unittest/unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698