File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ lib/src/dart/resolver/binary_expression_resolver.dart
6868lib/src/dart/resolver/body_inference_context.dart
6969lib/src/dart/resolver/comment_reference_resolver.dart
7070lib/src/dart/resolver/constructor_reference_resolver.dart
71- lib/src/dart/resolver/exit_detector.dart
7271lib/src/dart/resolver/extension_member_resolver.dart
7372lib/src/dart/resolver/flow_analysis_visitor.dart
7473lib/src/dart/resolver/for_resolver.dart
Original file line number Diff line number Diff line change 55import 'package:analyzer/dart/ast/ast.dart' ;
66import 'package:analyzer/dart/ast/token.dart' ;
77import 'package:analyzer/dart/ast/visitor.dart' ;
8- import 'package:analyzer/dart/element/element .dart' ;
8+ import 'package:analyzer/dart/element/element2 .dart' ;
99import 'package:analyzer/src/dart/element/type.dart' ;
1010
1111/// Instances of the class `ExitDetector` determine whether the visited AST node
@@ -436,7 +436,7 @@ class ExitDetector extends GeneralizingAstVisitor<bool> {
436436 return false ;
437437 }
438438 }
439- var element = node.methodName.staticElement ;
439+ var element = node.methodName.element ;
440440 if (_elementExits (element)) {
441441 return true ;
442442 }
@@ -696,10 +696,10 @@ class ExitDetector extends GeneralizingAstVisitor<bool> {
696696 return ExitDetector ()._nodeExits (node);
697697 }
698698
699- static bool _elementExits (Element ? element) {
700- if (element is ExecutableElement ) {
701- var declaration = element.declaration ;
702- return declaration.hasAlwaysThrows ||
699+ static bool _elementExits (Element2 ? element) {
700+ if (element is ExecutableElement2 ) {
701+ var declaration = element.baseElement ;
702+ return declaration.metadata2. hasAlwaysThrows ||
703703 identical (declaration.returnType, NeverTypeImpl .instance);
704704 }
705705
You can’t perform that action at this time.
0 commit comments