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

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

Issue 2935553002: fix checking of dsend generic type bounds (Closed)
Patch Set: merged 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// This library defines runtime operations on objects used by the code 5 /// This library defines runtime operations on objects used by the code
6 /// generator. 6 /// generator.
7 part of dart._runtime; 7 part of dart._runtime;
8 8
9 class InvocationImpl extends Invocation { 9 class InvocationImpl extends Invocation {
10 final Symbol memberName; 10 final Symbol memberName;
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 let formalCount = $ftype.formalCount; 297 let formalCount = $ftype.formalCount;
298 298
299 if ($typeArgs == null) { 299 if ($typeArgs == null) {
300 $typeArgs = $ftype.instantiateDefaultBounds(); 300 $typeArgs = $ftype.instantiateDefaultBounds();
301 } else if ($typeArgs.length != formalCount) { 301 } else if ($typeArgs.length != formalCount) {
302 // TODO(jmesserly): is this the right error? 302 // TODO(jmesserly): is this the right error?
303 $throwStrongModeError( 303 $throwStrongModeError(
304 'incorrect number of arguments to generic function ' + 304 'incorrect number of arguments to generic function ' +
305 $typeName($ftype) + ', got <' + $typeArgs + '> expected ' + 305 $typeName($ftype) + ', got <' + $typeArgs + '> expected ' +
306 formalCount + '.'); 306 formalCount + '.');
307 } else {
308 $ftype.checkBounds($typeArgs);
307 } 309 }
308 $ftype = $ftype.instantiate($typeArgs); 310 $ftype = $ftype.instantiate($typeArgs);
309 } else if ($typeArgs != null) { 311 } else if ($typeArgs != null) {
310 $throwStrongModeError( 312 $throwStrongModeError(
311 'got type arguments to non-generic function ' + $typeName($ftype) + 313 'got type arguments to non-generic function ' + $typeName($ftype) +
312 ', got <' + $typeArgs + '> expected none.'); 314 ', got <' + $typeArgs + '> expected none.');
313 } 315 }
314 316
315 if ($_checkApply($ftype, $args)) { 317 if ($_checkApply($ftype, $args)) {
316 if ($typeArgs != null) { 318 if ($typeArgs != null) {
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 JS('', '# = "+" + #', name, name); 1012 JS('', '# = "+" + #', name, name);
1011 } 1013 }
1012 return name; 1014 return name;
1013 } 1015 }
1014 1016
1015 /// Emulates the implicit "loadLibrary" function provided by a deferred library. 1017 /// Emulates the implicit "loadLibrary" function provided by a deferred library.
1016 /// 1018 ///
1017 /// Libraries are not actually deferred in DDC, so this just returns a future 1019 /// Libraries are not actually deferred in DDC, so this just returns a future
1018 /// that completes immediately. 1020 /// that completes immediately.
1019 Future loadLibrary() => new Future.value(); 1021 Future loadLibrary() => new Future.value();
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/browser/language_tests.js ('k') | pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698