| 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/common_elements.dart'; | 9 import 'package:compiler/src/common_elements.dart'; |
| 10 import 'package:compiler/src/elements/resolution_types.dart'; | 10 import 'package:compiler/src/elements/resolution_types.dart'; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 final Compiler compiler; | 75 final Compiler compiler; |
| 76 final ResolvedAst resolvedAst; | 76 final ResolvedAst resolvedAst; |
| 77 | 77 |
| 78 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst) | 78 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst) |
| 79 : this.resolvedAst = resolvedAst, | 79 : this.resolvedAst = resolvedAst, |
| 80 super(resolvedAst.elements); | 80 super(resolvedAst.elements); |
| 81 | 81 |
| 82 ClosedWorld get world => | 82 ClosedWorld get world => |
| 83 compiler.resolutionWorldBuilder.closedWorldForTesting; | 83 compiler.resolutionWorldBuilder.closedWorldForTesting; |
| 84 | 84 |
| 85 CommonElements get commonElements => compiler.commonElements; | 85 CommonElements get commonElements => compiler.resolution.commonElements; |
| 86 | 86 |
| 87 DiagnosticReporter get reporter => compiler.reporter; | 87 DiagnosticReporter get reporter => compiler.reporter; |
| 88 | 88 |
| 89 ResolutionInterfaceType get thisType => | 89 ResolutionInterfaceType get thisType => |
| 90 resolvedAst.element.enclosingClass.thisType; | 90 resolvedAst.element.enclosingClass.thisType; |
| 91 | 91 |
| 92 /// Returns `true` if there exists no common subtype of [left] and [right]. | 92 /// Returns `true` if there exists no common subtype of [left] and [right]. |
| 93 bool hasEmptyIntersection(ResolutionDartType left, ResolutionDartType right) { | 93 bool hasEmptyIntersection(ResolutionDartType left, ResolutionDartType right) { |
| 94 if (left == right) return false; | 94 if (left == right) return false; |
| 95 if (left == null || right == null) return false; | 95 if (left == null || right == null) return false; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 ClassElement findClass(ResolutionDartType type) => type.accept(this, null); | 430 ClassElement findClass(ResolutionDartType type) => type.accept(this, null); |
| 431 | 431 |
| 432 @override | 432 @override |
| 433 ClassElement visitType(ResolutionDartType type, _) => null; | 433 ClassElement visitType(ResolutionDartType type, _) => null; |
| 434 | 434 |
| 435 @override | 435 @override |
| 436 ClassElement visitInterfaceType(ResolutionInterfaceType type, _) { | 436 ClassElement visitInterfaceType(ResolutionInterfaceType type, _) { |
| 437 return type.element; | 437 return type.element; |
| 438 } | 438 } |
| 439 } | 439 } |
| OLD | NEW |