Skip to content

Commit

Permalink
Version 3.7.0-280.0.dev
Browse files Browse the repository at this point in the history
Merge 7cc1322 into dev
  • Loading branch information
Dart CI committed Dec 21, 2024
2 parents be85840 + 7cc1322 commit ce20c39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions pkg/analyzer/lib/dart/element/type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ abstract class InterfaceType implements ParameterizedType {
/// with the given name.
MethodElement? getMethod(String name);

/// Return the element representing the method with the given [name] that is
/// declared in this class, or `null` if this class does not declare a method
/// with the given name.
MethodElement2? getMethod2(String name);

/// Return the element representing the setter with the given [name] that is
/// declared in this class, or `null` if this class does not declare a setter
/// with the given name.
Expand Down
5 changes: 5 additions & 0 deletions pkg/analyzer/lib/src/dart/element/type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,11 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
MethodElement? getMethod(String methodName) =>
MethodMember.from(element.getMethod(methodName), this);

@override
MethodElement2? getMethod2(String methodName) {
return getMethod(methodName)?.asElement2;
}

@override
PropertyAccessorElement? getSetter(String setterName) =>
PropertyAccessorMember.from(element.getSetter(setterName), this);
Expand Down
6 changes: 0 additions & 6 deletions pkg/analyzer/lib/src/utilities/extensions/element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,6 @@ extension InterfaceElementExtension on InterfaceElement {
}
}

extension InterfaceTypeExtension on InterfaceType {
MethodElement2? getMethod2(String name) {
return getMethod(name)?.asElement2;
}
}

extension LabelElement2Extension on LabelElement2 {
LabelElement get asElement {
return firstFragment as LabelElement;
Expand Down
2 changes: 1 addition & 1 deletion tools/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ CHANNEL dev
MAJOR 3
MINOR 7
PATCH 0
PRERELEASE 279
PRERELEASE 280
PRERELEASE_PATCH 0

0 comments on commit ce20c39

Please sign in to comment.