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

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

Issue 2865403007: Get rid of promotedType=none annotations (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_6.dart
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart b/pkg/front_end/testcases/inference/future_then_conditional_6.dart
index e991a1e414dfd3a4543d9889bc2d52826fdc7ee9..eeee25fb3c029aeee68d8e14ef557573e5d3a76c 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart
@@ -16,27 +16,19 @@ class MyFuture<T> implements Future<T> {
void main() {
Future<bool> f;
- Future<int> t1 = /*@promotedType=none*/ f
- . /*@typeArgs=int*/ /*@target=Future::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=Future::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> t1 = f. /*@typeArgs=int*/ /*@target=Future::then*/ then(
+ /*@returnType=Future<int>*/ (/*@type=bool*/ x) async =>
+ x ? 2 : await new Future<int>.value(3));
+ Future<int> t2 = f. /*@typeArgs=int*/ /*@target=Future::then*/ then(
+ /*@returnType=Future<int>*/ (/*@type=bool*/ x) async {
+ return /*info:DOWN_CAST_COMPOSITE*/ await x ? 2 : new Future<int>.value(3);
});
- Future<int> t5 = /*@promotedType=none*/ f
- . /*@typeArgs=int*/ /*@target=Future::then*/ then(
- /*info:INFERRED_TYPE_CLOSURE,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=Future::then*/ then(
- /*@returnType=FutureOr<int>*/ (/*@type=bool*/ x) {
- return /*info:DOWN_CAST_COMPOSITE*/ /*@promotedType=none*/ x
- ? 2
- : new Future<int>.value(3);
+ Future<int> t5 = f. /*@typeArgs=int*/ /*@target=Future::then*/ then(
+ /*info:INFERRED_TYPE_CLOSURE,error:INVALID_CAST_FUNCTION_EXPR*/
+ /*@returnType=Object*/ (/*@type=bool*/ x) =>
+ x ? 2 : new Future<int>.value(3));
+ Future<int> t6 = f. /*@typeArgs=int*/ /*@target=Future::then*/ then(
+ /*@returnType=FutureOr<int>*/ (/*@type=bool*/ x) {
+ return /*info:DOWN_CAST_COMPOSITE*/ x ? 2 : new Future<int>.value(3);
});
}

Powered by Google App Engine
This is Rietveld 408576698