OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 dart2js.kernel.equivalence; | 5 library dart2js.kernel.equivalence; |
6 | 6 |
7 import 'package:compiler/src/common/backend_api.dart'; | 7 import 'package:compiler/src/common/backend_api.dart'; |
8 import 'package:compiler/src/common/resolution.dart'; | 8 import 'package:compiler/src/common/resolution.dart'; |
9 import 'package:compiler/src/common/work.dart'; | 9 import 'package:compiler/src/common/work.dart'; |
10 import 'package:compiler/src/constants/expressions.dart'; | 10 import 'package:compiler/src/constants/expressions.dart'; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 247 } |
248 | 248 |
249 /// Visitor the performers unaliasing of all typedefs nested within a | 249 /// Visitor the performers unaliasing of all typedefs nested within a |
250 /// [ResolutionDartType]. | 250 /// [ResolutionDartType]. |
251 class Unaliaser | 251 class Unaliaser |
252 extends BaseResolutionDartTypeVisitor<dynamic, ResolutionDartType> { | 252 extends BaseResolutionDartTypeVisitor<dynamic, ResolutionDartType> { |
253 const Unaliaser(); | 253 const Unaliaser(); |
254 | 254 |
255 @override | 255 @override |
256 ResolutionDartType visit(ResolutionDartType type, [_]) => | 256 ResolutionDartType visit(ResolutionDartType type, [_]) => |
| 257 // ignore: ARGUMENT_TYPE_NOT_ASSIGNABLE |
257 type.accept(this, null); | 258 type.accept(this, null); |
258 | 259 |
259 @override | 260 @override |
260 ResolutionDartType visitType(ResolutionDartType type, _) => type; | 261 ResolutionDartType visitType(ResolutionDartType type, _) => type; |
261 | 262 |
262 List<ResolutionDartType> visitList(List<ResolutionDartType> types) => | 263 List<ResolutionDartType> visitList(List<ResolutionDartType> types) => |
263 types.map(visit).toList(); | 264 types.map(visit).toList(); |
264 | 265 |
265 @override | 266 @override |
266 ResolutionDartType visitInterfaceType(ResolutionInterfaceType type, _) { | 267 ResolutionDartType visitInterfaceType(ResolutionInterfaceType type, _) { |
(...skipping 30 matching lines...) Expand all Loading... |
297 for (ConstructorElement constructor in element.constructors) { | 298 for (ConstructorElement constructor in element.constructors) { |
298 if (!constructor.isRedirectingFactory) { | 299 if (!constructor.isRedirectingFactory) { |
299 return true; | 300 return true; |
300 } | 301 } |
301 } | 302 } |
302 // The class cannot itself be instantiated. | 303 // The class cannot itself be instantiated. |
303 return false; | 304 return false; |
304 } | 305 } |
305 return true; | 306 return true; |
306 } | 307 } |
OLD | NEW |