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

Unified Diff: pkg/front_end/testcases/inference/future_then_conditional.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/future_then_conditional.dart
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart b/pkg/front_end/testcases/inference/future_then_conditional.dart
index ab579123bcb32ce493b9e87a3db0906e8ccbbb68..4ff6bdbf767cdd48c600d6b7eb21fe543c6e1091 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart
@@ -16,21 +16,25 @@ class MyFuture<T> implements Future<T> {
void main() {
MyFuture<bool> f;
- Future<int> t1 = /*@promotedType=none*/ f. /*@typeArgs=int*/ then(
- /*@returnType=Future<int>*/ (/*@type=bool*/ x) async =>
- /*@promotedType=none*/ x ? 2 : await new Future<int>.value(3));
- Future<int> t2 = /*@promotedType=none*/ f. /*@typeArgs=int*/ then(
- /*@returnType=Future<int>*/ (/*@type=bool*/ x) async {
+ Future<int> t1 = /*@promotedType=none*/ f
+ . /*@typeArgs=int*/ /*@target=MyFuture::then*/ then(
+ /*@returnType=Future<int>*/ (/*@type=bool*/ x) async =>
+ /*@promotedType=none*/ x ? 2 : await new Future<int>.value(3));
+ Future<int> t2 = /*@promotedType=none*/ f
+ . /*@typeArgs=int*/ /*@target=MyFuture::then*/ then(
+ /*@returnType=Future<int>*/ (/*@type=bool*/ x) async {
return /*info:DOWN_CAST_COMPOSITE*/ await /*@promotedType=none*/ x
? 2
: new Future<int>.value(3);
});
- Future<int> t5 = /*@promotedType=none*/ f. /*@typeArgs=int*/ then(
- /*error:INVALID_CAST_FUNCTION_EXPR*/
- /*@returnType=Object*/ (/*@type=bool*/ x) =>
- /*@promotedType=none*/ x ? 2 : new Future<int>.value(3));
- Future<int> t6 = /*@promotedType=none*/ f. /*@typeArgs=int*/ then(
- /*@returnType=FutureOr<int>*/ (/*@type=bool*/ x) {
+ Future<int> t5 = /*@promotedType=none*/ f
+ . /*@typeArgs=int*/ /*@target=MyFuture::then*/ then(
+ /*error:INVALID_CAST_FUNCTION_EXPR*/
+ /*@returnType=Object*/ (/*@type=bool*/ x) =>
+ /*@promotedType=none*/ x ? 2 : new Future<int>.value(3));
+ Future<int> t6 = /*@promotedType=none*/ f
+ . /*@typeArgs=int*/ /*@target=MyFuture::then*/ then(
+ /*@returnType=FutureOr<int>*/ (/*@type=bool*/ x) {
return /*info:DOWN_CAST_COMPOSITE*/ /*@promotedType=none*/ x
? 2
: new Future<int>.value(3);
« no previous file with comments | « pkg/front_end/testcases/inference/future_then_6.dart ('k') | pkg/front_end/testcases/inference/future_then_conditional_2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698