Skip to content

Commit edc2536

Browse files
pqCommit Queue
authored andcommitted
[element model] migrate public_member_api_docs
Bug: https://github.com/dart-lang/linter/issues/5099 Change-Id: I3a215df3bd3c01b58b0ca9c698f0f888fe5e9cfc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395121 Auto-Submit: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
1 parent 741f568 commit edc2536

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pkg/linter/analyzer_use_new_elements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ lib/src/rules/invalid_runtime_check_with_js_interop_types.dart
66
lib/src/rules/prefer_asserts_in_initializer_lists.dart
77
lib/src/rules/prefer_final_fields.dart
88
lib/src/rules/prefer_initializing_formals.dart
9-
lib/src/rules/public_member_api_docs.dart
109
lib/src/rules/unnecessary_overrides.dart
1110
lib/src/rules/use_build_context_synchronously.dart
1211
lib/src/rules/use_late_for_private_fields_and_variables.dart

pkg/linter/lib/src/rules/public_member_api_docs.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ class _Visitor extends SimpleAstVisitor<void> {
111111

112112
/// Whether [node] overrides some other member.
113113
bool isOverridingMember(Declaration node) =>
114-
context.inheritanceManager.overriddenMember(node.declaredElement) != null;
114+
context.inheritanceManager
115+
.overriddenMember2(node.declaredFragment?.element) !=
116+
null;
115117

116118
@override
117119
void visitClassDeclaration(ClassDeclaration node) {
118-
var element = node.declaredElement;
119-
if (element == null || element.hasInternal) return;
120+
var element = node.declaredFragment?.element;
121+
if (element == null || element.metadata2.hasInternal) return;
120122
_visitMembers(node, node.name, node.members);
121123
}
122124

@@ -219,8 +221,8 @@ class _Visitor extends SimpleAstVisitor<void> {
219221

220222
@override
221223
void visitExtensionTypeDeclaration(ExtensionTypeDeclaration node) {
222-
var element = node.declaredElement;
223-
if (element == null || element.hasInternal) return;
224+
var element = node.declaredFragment?.element;
225+
if (element == null || element.metadata2.hasInternal) return;
224226
_visitMembers(node, node.name, node.members);
225227
}
226228

0 commit comments

Comments
 (0)