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

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

Issue 2211053002: fix #26962, invoking a known lambda is not a dynamic invoke (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix comment Created 4 years, 4 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/task/strong/checker.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 741659a2822bad3484d6af9030708eb1b282277d..32000e99686c3ced31ac7b2e5660275db7477a37 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -3906,10 +3906,9 @@ class C {
}
void test_unsafeBlockClosureInference_closureCall() {
- // Note: this is a DYNAMIC_INVOKE due to dartbug.com/26962.
+ // Regression test for https://github.com/dart-lang/sdk/issues/26962
var mainUnit = checkFile('''
-var v = /*info:DYNAMIC_INVOKE*/((x) => 1.0)(
- /*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
+var v = ((x) => 1.0)(/*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
''');
var v = mainUnit.topLevelVariables[0];
expect(v.name, 'v');
@@ -4075,11 +4074,9 @@ var v = f(/*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
}
void test_unsafeBlockClosureInference_functionCall_noTypeParam_viaExpr() {
- // TODO(paulberry): why is the call to f() considered a DYNAMIC_INVOKE?
var mainUnit = checkFile('''
double f(x) => 1.0;
-var v = /*info:DYNAMIC_INVOKE*/(f)(
- /*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
+var v = (f)(/*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
''');
var v = mainUnit.topLevelVariables[0];
expect(v.name, 'v');
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698