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

Side by Side Diff: pkg/compiler/lib/src/dart_types.dart

Issue 2439573003: Experiment with new function-type syntax.
Patch Set: Change a few more typedefs. Created 4 years, 2 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library dart_types; 5 library dart_types;
6 6
7 import 'dart:math' show min; 7 import 'dart:math' show min;
8 8
9 import 'common/resolution.dart' show Resolution; 9 import 'common/resolution.dart' show Resolution;
10 import 'common.dart'; 10 import 'common.dart';
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 bool invalidCallableType(DartType callType, DartType s) { 1273 bool invalidCallableType(DartType callType, DartType s) {
1274 return !isSubtype(callType, s); 1274 return !isSubtype(callType, s);
1275 } 1275 }
1276 } 1276 }
1277 1277
1278 /** 1278 /**
1279 * Callback used to check whether the [typeArgument] of [type] is a valid 1279 * Callback used to check whether the [typeArgument] of [type] is a valid
1280 * substitute for the bound of [typeVariable]. [bound] holds the bound against 1280 * substitute for the bound of [typeVariable]. [bound] holds the bound against
1281 * which [typeArgument] should be checked. 1281 * which [typeArgument] should be checked.
1282 */ 1282 */
1283 typedef void CheckTypeVariableBound(GenericType type, DartType typeArgument, 1283 typedef CheckTypeVariableBound = (GenericType type, DartType typeArgument,
1284 TypeVariableType typeVariable, DartType bound); 1284 TypeVariableType typeVariable, DartType bound) -> void;
1285 1285
1286 /// Basic interface for the Dart type system. 1286 /// Basic interface for the Dart type system.
1287 abstract class DartTypes { 1287 abstract class DartTypes {
1288 /// The types defined in 'dart:core'. 1288 /// The types defined in 'dart:core'.
1289 CoreTypes get coreTypes; 1289 CoreTypes get coreTypes;
1290 1290
1291 /// Returns `true` if [t] is a subtype of [s]. 1291 /// Returns `true` if [t] is a subtype of [s].
1292 bool isSubtype(DartType t, DartType s); 1292 bool isSubtype(DartType t, DartType s);
1293 1293
1294 /// Returns `true` if [t] might be a subtype of [s] for some values of 1294 /// Returns `true` if [t] might be a subtype of [s] for some values of
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 sb.write(', '); 2019 sb.write(', ');
2020 } 2020 }
2021 namedParameterTypes[index].accept(this, namedParameters[index]); 2021 namedParameterTypes[index].accept(this, namedParameters[index]);
2022 needsComma = true; 2022 needsComma = true;
2023 } 2023 }
2024 sb.write('}'); 2024 sb.write('}');
2025 } 2025 }
2026 sb.write(')'); 2026 sb.write(')');
2027 } 2027 }
2028 } 2028 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698