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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 checkMemberElement(compiler, member); | 49 checkMemberElement(compiler, member); |
50 }); | 50 }); |
51 } else if (!element.isTypedef) { | 51 } else if (!element.isTypedef) { |
52 checkMemberElement(compiler, element); | 52 checkMemberElement(compiler, element); |
53 } | 53 } |
54 }); | 54 }); |
55 } | 55 } |
56 | 56 |
57 /// Check [member] for unrelated types. | 57 /// Check [member] for unrelated types. |
58 void checkMemberElement(Compiler compiler, MemberElement member) { | 58 void checkMemberElement(Compiler compiler, MemberElement member) { |
59 if (!compiler.resolution.hasBeenResolved(member)) return; | 59 if (!compiler.enqueuer.resolution.hasBeenResolved(member)) return; |
60 | 60 |
61 ResolvedAst resolvedAst = member.resolvedAst; | 61 ResolvedAst resolvedAst = member.resolvedAst; |
62 RelatedTypesChecker relatedTypesChecker = | 62 RelatedTypesChecker relatedTypesChecker = |
63 new RelatedTypesChecker(compiler, resolvedAst); | 63 new RelatedTypesChecker(compiler, resolvedAst); |
64 if (resolvedAst.node != null) { | 64 if (resolvedAst.node != null) { |
65 compiler.reporter.withCurrentElement(member.implementation, () { | 65 compiler.reporter.withCurrentElement(member.implementation, () { |
66 relatedTypesChecker.apply(resolvedAst.node); | 66 relatedTypesChecker.apply(resolvedAst.node); |
67 }); | 67 }); |
68 } | 68 } |
69 } | 69 } |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 ClassElement findClass(DartType type) => type.accept(this, null); | 427 ClassElement findClass(DartType type) => type.accept(this, null); |
428 | 428 |
429 @override | 429 @override |
430 ClassElement visitType(DartType type, _) => null; | 430 ClassElement visitType(DartType type, _) => null; |
431 | 431 |
432 @override | 432 @override |
433 ClassElement visitInterfaceType(InterfaceType type, _) { | 433 ClassElement visitInterfaceType(InterfaceType type, _) { |
434 return type.element; | 434 return type.element; |
435 } | 435 } |
436 } | 436 } |
OLD | NEW |