File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ lib/src/error/duplicate_definition_verifier.dart
107107lib/src/error/imports_verifier.dart
108108lib/src/error/inheritance_override.dart
109109lib/src/error/literal_element_verifier.dart
110- lib/src/error/nullable_dereference_verifier.dart
111110lib/src/error/override_verifier.dart
112111lib/src/error/required_parameters_verifier.dart
113112lib/src/error/unused_local_elements_verifier.dart
Original file line number Diff line number Diff line change @@ -575,6 +575,13 @@ extension InhertanceManager3Extension on InheritanceManager3 {
575575 }
576576}
577577
578+ extension InterfaceElement2Extension on InterfaceElement2 {
579+ /// Whether this element has the exact [name] and defined in the file with
580+ /// the given [uri] .
581+ bool isExactly (String name, Uri uri) =>
582+ name3 == name && enclosingElement2.firstFragment.source.uri == uri;
583+ }
584+
578585extension InterfaceTypeExtension on InterfaceType {
579586 /// Returns the collection of all interfaces that this type implements,
580587 /// including itself.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'package:analyzer/file_system/file_system.dart';
1010import 'package:analyzer/src/dart/element/type_visitor.dart' ; // ignore: implementation_imports
1111
1212import '../analyzer.dart' ;
13+ import '../extensions.dart' ;
1314
1415const _desc = r'Use new element model in opted-in files.' ;
1516
@@ -54,6 +55,15 @@ bool _isOldModelElement(Element2? element) {
5455}
5556
5657bool _isOldModelType (DartType ? type) {
58+ if (type is InterfaceType ) {
59+ if (type.element3.isExactly (
60+ 'FlowAnalysis' ,
61+ Uri .parse (
62+ 'package:_fe_analyzer_shared/src/flow_analysis/flow_analysis.dart' ))) {
63+ return false ;
64+ }
65+ }
66+
5767 var visitor = _TypeVisitor ();
5868 type? .accept (visitor);
5969 return visitor.result;
You can’t perform that action at this time.
0 commit comments