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

Unified Diff: tests/compiler/dart2js/cpa_inference_test.dart

Issue 11415115: Handle null in augmentField (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/cpa_inference_test.dart
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index a8db3d513305e96e2cd3c225c143ef7157e2eaf3..f5610a2cf510609e30c51b94144e6e466da6fc39 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -361,13 +361,15 @@ testGetters() {
var foo = a.x;
var bar = a.y;
var baz = a.z;
- foo; bar; baz;
+ var qux = null.x;
+ foo; bar; baz; qux;
}
""";
AnalysisResult result = analyze(source);
result.checkNodeHasType('foo', [result.int]);
result.checkNodeHasType('bar', [result.int]);
result.checkNodeHasType('baz', [result.int]);
+ result.checkNodeHasType('qux', []);
}
testSetters() {
@@ -383,6 +385,7 @@ testSetters() {
var a = new A(42, 42);
a.x = 'abc';
a.y = true;
+ null.x = 42; // should be ignored
}
""";
AnalysisResult result = analyze(source);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698