OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:compiler/src/common.dart'; | 5 import 'package:compiler/src/common.dart'; |
6 import 'package:compiler/src/common_elements.dart'; | 6 import 'package:compiler/src/common_elements.dart'; |
7 import 'package:compiler/src/compiler.dart'; | 7 import 'package:compiler/src/compiler.dart'; |
8 import 'package:compiler/src/elements/elements.dart'; | 8 import 'package:compiler/src/elements/elements.dart'; |
9 import 'package:compiler/src/elements/entities.dart'; | 9 import 'package:compiler/src/elements/entities.dart'; |
10 import 'package:compiler/src/resolution/tree_elements.dart'; | 10 import 'package:compiler/src/resolution/tree_elements.dart'; |
(...skipping 28 matching lines...) Expand all Loading... |
39 }); | 39 }); |
40 } else if (member.isTypedef) { | 40 } else if (member.isTypedef) { |
41 // Skip. | 41 // Skip. |
42 } else { | 42 } else { |
43 checkMember(compiler, expectedMap, member); | 43 checkMember(compiler, expectedMap, member); |
44 } | 44 } |
45 }); | 45 }); |
46 expectedMap.forEach((Id id, String expected) { | 46 expectedMap.forEach((Id id, String expected) { |
47 reportHere( | 47 reportHere( |
48 compiler.reporter, | 48 compiler.reporter, |
49 computeSpannable(compiler.elementEnvironment, mainUri, id), | 49 computeSpannable(compiler.resolution.elementEnvironment, mainUri, id), |
50 'expected:${expected},actual:null'); | 50 'expected:${expected},actual:null'); |
51 }); | 51 }); |
52 Expect.isTrue(expectedMap.isEmpty, "Ids not found: $expectedMap."); | 52 Expect.isTrue(expectedMap.isEmpty, "Ids not found: $expectedMap."); |
53 } | 53 } |
54 | 54 |
55 void checkMemberAstTypeMasks( | 55 void checkMemberAstTypeMasks( |
56 Compiler compiler, Map<Id, String> expectedMap, MemberElement member) { | 56 Compiler compiler, Map<Id, String> expectedMap, MemberElement member) { |
57 ResolvedAst resolvedAst = member.resolvedAst; | 57 ResolvedAst resolvedAst = member.resolvedAst; |
58 if (resolvedAst.kind != ResolvedAstKind.PARSED) return; | 58 if (resolvedAst.kind != ResolvedAstKind.PARSED) return; |
59 compiler.reporter.withCurrentElement(member.implementation, () { | 59 compiler.reporter.withCurrentElement(member.implementation, () { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 visitSend(Send node) { | 173 visitSend(Send node) { |
174 checkSend(node); | 174 checkSend(node); |
175 visitNode(node); | 175 visitNode(node); |
176 } | 176 } |
177 | 177 |
178 visitSendSet(SendSet node) { | 178 visitSendSet(SendSet node) { |
179 checkSend(node); | 179 checkSend(node); |
180 visitNode(node); | 180 visitNode(node); |
181 } | 181 } |
182 } | 182 } |
OLD | NEW |