Skip to content

Commit

Permalink
[element model] migrate do_not_use_environment
Browse files Browse the repository at this point in the history
Bug: dart-lang/linter#5099
Change-Id: Ided4b129486fd0d394547a69303613db129c66af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387625
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
  • Loading branch information
pq authored and Commit Queue committed Sep 30, 2024
1 parent 4334ac9 commit c5684c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/linter/lib/src/rules/do_not_use_environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class _Visitor extends SimpleAstVisitor {
@override
void visitInstanceCreationExpression(InstanceCreationExpression node) {
var constructorNameNode = node.constructorName;
if (constructorNameNode.staticElement?.isFactory != true) {
if (constructorNameNode.element?.isFactory != true) {
return;
}
var staticType = node.staticType;
Expand Down

0 comments on commit c5684c4

Please sign in to comment.