未验证 提交 82051afc 编写于 作者: A Alexander Markov 提交者: GitHub

Fix const_finder to visit children of ConstructorInvocation (#25020)

上级 4ca02a57
......@@ -65,15 +65,14 @@ class _ConstVisitor extends RecursiveVisitor<void> {
@override
void visitConstructorInvocation(ConstructorInvocation node) {
final Class parentClass = node.target.parent as Class;
if (!_matches(parentClass)) {
super.visitConstructorInvocation(node);
return;
if (_matches(parentClass)) {
nonConstantLocations.add(<String, dynamic>{
'file': node.location.file.toString(),
'line': node.location.line,
'column': node.location.column,
});
}
nonConstantLocations.add(<String, dynamic>{
'file': node.location.file.toString(),
'line': node.location.line,
'column': node.location.column,
});
super.visitConstructorInvocation(node);
}
@override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册