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

Unified Diff: pkg/analyzer/test/src/task/strong/inferred_type_test.dart

Issue 2711423002: Fix for serializing cascades with not-assignment access to properties. (Closed)
Patch Set: Created 3 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 | « pkg/analyzer/lib/src/summary/summarize_const_expr.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index 65686c5511a6f7227aec225fda3d709d1a2e82d8..b64a5b664f1e2d707e2bb793b840e0b203d37dba 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -3570,6 +3570,19 @@ var f = /*warning:UNSAFE_BLOCK_CLOSURE_INFERENCE,
expect(f.type.toString(), '() → Null');
}
+ test_inferredType_cascade() async {
+ var mainUnit = await checkFileElement('''
+class A {
+ int a;
+ List<int> b;
+ void m() {}
+}
+var v = new A()..a = 1..b.add(2)..m();
+''');
+ var v = mainUnit.topLevelVariables[0];
+ expect(v.type.toString(), 'A');
+ }
+
test_inferredType_customBinaryOp() async {
var mainUnit = await checkFileElement('''
class C {
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_const_expr.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698