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 30 matching lines...) Expand all Loading... |
41 } else { | 41 } else { |
42 checkMember(compiler, expectedMap, member); | 42 checkMember(compiler, expectedMap, member); |
43 } | 43 } |
44 }); | 44 }); |
45 expectedMap.forEach((Id id, String expected) { | 45 expectedMap.forEach((Id id, String expected) { |
46 reportHere( | 46 reportHere( |
47 compiler.reporter, | 47 compiler.reporter, |
48 computeSpannable(compiler.elementEnvironment, mainUri, id), | 48 computeSpannable(compiler.elementEnvironment, mainUri, id), |
49 'expected:${expected},actual:null'); | 49 'expected:${expected},actual:null'); |
50 }); | 50 }); |
51 Expect.isTrue(expectedMap.isEmpty, | 51 Expect.isTrue(expectedMap.isEmpty, "Ids not found: $expectedMap."); |
52 "Ids not found: $expectedMap."); | |
53 } | 52 } |
54 | 53 |
55 void checkMemberAstTypeMasks( | 54 void checkMemberAstTypeMasks( |
56 Compiler compiler, Map<Id, String> expectedMap, MemberElement member) { | 55 Compiler compiler, Map<Id, String> expectedMap, MemberElement member) { |
57 ResolvedAst resolvedAst = member.resolvedAst; | 56 ResolvedAst resolvedAst = member.resolvedAst; |
58 if (resolvedAst.kind != ResolvedAstKind.PARSED) return; | 57 if (resolvedAst.kind != ResolvedAstKind.PARSED) return; |
59 compiler.reporter.withCurrentElement(member.implementation, () { | 58 compiler.reporter.withCurrentElement(member.implementation, () { |
60 new TypeMaskChecker(compiler.reporter, expectedMap, resolvedAst, | 59 new TypeMaskChecker(compiler.reporter, expectedMap, resolvedAst, |
61 compiler.globalInference.results) | 60 compiler.globalInference.results) |
62 .check(); | 61 .check(); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 visitSend(Send node) { | 171 visitSend(Send node) { |
173 checkSend(node); | 172 checkSend(node); |
174 visitNode(node); | 173 visitNode(node); |
175 } | 174 } |
176 | 175 |
177 visitSendSet(SendSet node) { | 176 visitSendSet(SendSet node) { |
178 checkSend(node); | 177 checkSend(node); |
179 visitNode(node); | 178 visitNode(node); |
180 } | 179 } |
181 } | 180 } |
OLD | NEW |