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

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

Issue 2924853003: Fix implementation of fold() in analyzer's mock SDK. (Closed)
Patch Set: Created 3 years, 6 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/generic_methods_downwards_inference_fold.dart
diff --git a/pkg/front_end/testcases/inference/generic_methods_downwards_inference_fold.dart b/pkg/front_end/testcases/inference/generic_methods_downwards_inference_fold.dart
index b90360cb14879f7a81177b257213f645d00dfbf6..49edbd4ce9032d6c50908fe6ce891d3b3a3d7ece 100644
--- a/pkg/front_end/testcases/inference/generic_methods_downwards_inference_fold.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_downwards_inference_fold.dart
@@ -5,15 +5,15 @@
/*@testedFeatures=inference*/
library test;
-void main() {
+void test() {
List<int> o;
- int y = o. /*@typeArgs=int*/ /*@target=List::fold*/ fold(
+ int y = o. /*@typeArgs=int*/ /*@target=Iterable::fold*/ fold(
0,
/*@returnType=int*/ (/*@type=int*/ x,
/*@type=int*/ y) =>
x /*@target=num::+*/ + y);
var /*@type=dynamic*/ z =
- o. /*@typeArgs=dynamic*/ /*@target=List::fold*/ fold(
+ o. /*@typeArgs=dynamic*/ /*@target=Iterable::fold*/ fold(
0,
/*@returnType=dynamic*/ (/*@type=dynamic*/ x,
/*@type=int*/ y) => /*info:DYNAMIC_INVOKE*/ x + y);
@@ -22,15 +22,17 @@ void main() {
void functionExpressionInvocation() {
List<int> o;
- int y = (o. /*@target=List::fold*/ fold) /*@typeArgs=int*/ (
+ int y = (o. /*@target=Iterable::fold*/ fold) /*@typeArgs=int*/ (
0,
/*@returnType=int*/ (/*@type=int*/ x,
/*@type=int*/ y) =>
x /*@target=num::+*/ + y);
var /*@type=dynamic*/ z =
- (o. /*@target=List::fold*/ fold) /*@typeArgs=dynamic*/ (
+ (o. /*@target=Iterable::fold*/ fold) /*@typeArgs=dynamic*/ (
0,
/*@returnType=dynamic*/ (/*@type=dynamic*/ x,
/*@type=int*/ y) => /*info:DYNAMIC_INVOKE*/ x + y);
y = /*info:DYNAMIC_CAST*/ z;
}
+
+main() {}

Powered by Google App Engine
This is Rietveld 408576698