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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2870543005: Revert "fix #27256, track type bounds for generic functions" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Reverting - causing build to fail 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/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index b2fd6c586fbbfa009403195d6980172b0e652856..8e8a2cd130b78152f2ee78e6406ea2a16a3590eb 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -246,7 +246,9 @@ _checkAndCall(f, ftype, obj, typeArgs, args, name) => JS(
let formalCount = $ftype.formalCount;
if ($typeArgs == null) {
- $typeArgs = $ftype.instantiateDefaultBounds();
+ // TODO(jmesserly): this should use instantiate to bounds logic.
+ // See https://github.com/dart-lang/sdk/issues/27256
+ $typeArgs = Array(formalCount).fill($dynamic);
} else if ($typeArgs.length != formalCount) {
// TODO(jmesserly): is this the right error?
$throwStrongModeError(
@@ -254,6 +256,7 @@ _checkAndCall(f, ftype, obj, typeArgs, args, name) => JS(
$typeName($ftype) + ', got <' + $typeArgs + '> expected ' +
formalCount + '.');
}
+ // Instantiate the function type.
$ftype = $ftype.instantiate($typeArgs);
} else if ($typeArgs != null) {
$throwStrongModeError(

Powered by Google App Engine
This is Rietveld 408576698