mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
Ignore unnecessary_cast hint.
The cast is no longer needed due to the class hierarchy changes in https://dart-review.googlesource.com/c/sdk/+/89923. But we don't want to remove it yet, because we don't want to unnecessarily make the analyzer_plugin to depend on the very latest analyzer. So for now we ignore the hint. Change-Id: Ic5314181cd78d72e5c9b1d00f38302773f0a789c Reviewed-on: https://dart-review.googlesource.com/c/90101 Commit-Queue: Paul Berry <paulberry@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Auto-Submit: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
3513f872ce
commit
f353719b08
|
@ -816,7 +816,12 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
|
|||
AstNode grandparent = node.parent.parent;
|
||||
if (grandparent is ConstructorReferenceNode) {
|
||||
ConstructorElement element =
|
||||
(grandparent as ConstructorReferenceNode).staticElement;
|
||||
// TODO(paulberry): remove the unnecessary cast when we are ready to
|
||||
// depend on a version of the analyzer that includes
|
||||
// https://dart-review.googlesource.com/c/sdk/+/89923
|
||||
(grandparent // ignore: unnecessary_cast
|
||||
as ConstructorReferenceNode)
|
||||
.staticElement;
|
||||
if (element != null) {
|
||||
List<ParameterElement> parameters = element.parameters;
|
||||
ParameterElement parameterElement = parameters.firstWhere((e) {
|
||||
|
|
Loading…
Reference in a new issue