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

Unified Diff: pkg/front_end/testcases/inference/list_literals.dart

Issue 2874033003: Set MethodInvocation.interfaceTarget during type inference. (Closed)
Patch Set: Created 3 years, 7 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
Index: pkg/front_end/testcases/inference/list_literals.dart
diff --git a/pkg/front_end/testcases/inference/list_literals.dart b/pkg/front_end/testcases/inference/list_literals.dart
index 5754154749a790be5fcbc740352df7523afdcc1c..8217164370ff5fa71cb7e549f9454fb87eae4ba2 100644
--- a/pkg/front_end/testcases/inference/list_literals.dart
+++ b/pkg/front_end/testcases/inference/list_literals.dart
@@ -7,16 +7,19 @@ library test;
test1() {
var /*@type=List<int>*/ x = /*@typeArgs=int*/ [1, 2, 3];
- /*@promotedType=none*/ x.add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
- /*@promotedType=none*/ x.add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0);
- /*@promotedType=none*/ x.add(4);
+ /*@promotedType=none*/ x
+ . /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
+ /*@promotedType=none*/ x
+ . /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0);
+ /*@promotedType=none*/ x. /*@target=List::add*/ add(4);
List<num> y = /*@promotedType=none*/ x;
}
test2() {
var /*@type=List<num>*/ x = /*@typeArgs=num*/ [1, 2.0, 3];
- /*@promotedType=none*/ x.add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
- /*@promotedType=none*/ x.add(4.0);
+ /*@promotedType=none*/ x
+ . /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
+ /*@promotedType=none*/ x. /*@target=List::add*/ add(4.0);
List<int> y = /*info:ASSIGNMENT_CAST*/ /*@promotedType=none*/ x;
}

Powered by Google App Engine
This is Rietveld 408576698