| OLD | NEW |
| 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 library related_types; | 5 library related_types; |
| 6 | 6 |
| 7 import 'package:compiler/src/commandline_options.dart'; | 7 import 'package:compiler/src/commandline_options.dart'; |
| 8 import 'package:compiler/src/compiler.dart'; | 8 import 'package:compiler/src/compiler.dart'; |
| 9 import 'package:compiler/src/core_types.dart'; | 9 import 'package:compiler/src/core_types.dart'; |
| 10 import 'package:compiler/src/dart_types.dart'; | 10 import 'package:compiler/src/dart_types.dart'; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 class RelatedTypesChecker extends TraversalVisitor<DartType, dynamic> { | 72 class RelatedTypesChecker extends TraversalVisitor<DartType, dynamic> { |
| 73 final Compiler compiler; | 73 final Compiler compiler; |
| 74 final ResolvedAst resolvedAst; | 74 final ResolvedAst resolvedAst; |
| 75 | 75 |
| 76 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst) | 76 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst) |
| 77 : this.resolvedAst = resolvedAst, | 77 : this.resolvedAst = resolvedAst, |
| 78 super(resolvedAst.elements); | 78 super(resolvedAst.elements); |
| 79 | 79 |
| 80 ClassWorld get world => compiler.closedWorld; | 80 ClosedWorld get world => compiler.closedWorld; |
| 81 | 81 |
| 82 CoreClasses get coreClasses => compiler.coreClasses; | 82 CoreClasses get coreClasses => compiler.coreClasses; |
| 83 | 83 |
| 84 CoreTypes get coreTypes => compiler.coreTypes; | 84 CoreTypes get coreTypes => compiler.coreTypes; |
| 85 | 85 |
| 86 DiagnosticReporter get reporter => compiler.reporter; | 86 DiagnosticReporter get reporter => compiler.reporter; |
| 87 | 87 |
| 88 InterfaceType get thisType => resolvedAst.element.enclosingClass.thisType; | 88 InterfaceType get thisType => resolvedAst.element.enclosingClass.thisType; |
| 89 | 89 |
| 90 /// Returns `true` if there exists no common subtype of [left] and [right]. | 90 /// Returns `true` if there exists no common subtype of [left] and [right]. |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 ClassElement findClass(DartType type) => type.accept(this, null); | 411 ClassElement findClass(DartType type) => type.accept(this, null); |
| 412 | 412 |
| 413 @override | 413 @override |
| 414 ClassElement visitType(DartType type, _) => null; | 414 ClassElement visitType(DartType type, _) => null; |
| 415 | 415 |
| 416 @override | 416 @override |
| 417 ClassElement visitInterfaceType(InterfaceType type, _) { | 417 ClassElement visitInterfaceType(InterfaceType type, _) { |
| 418 return type.element; | 418 return type.element; |
| 419 } | 419 } |
| 420 } | 420 } |
| OLD | NEW |