File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1325,6 +1325,25 @@ abstract class InterfaceElement2 implements InstanceElement2 {
13251325 required NullabilitySuffix nullabilitySuffix,
13261326 });
13271327
1328+ /// Returns the element representing the method that results from looking up
1329+ /// the given [methodName] in this class with respect to the given [library] ,
1330+ /// ignoring abstract methods, or `null` if the look up fails.
1331+ ///
1332+ /// The behavior of this method is defined by the Dart Language Specification
1333+ /// in section 16.15.1:
1334+ /// <blockquote>
1335+ /// The result of looking up method <i>m</i> in class <i>C</i> with respect to
1336+ /// library <i>L</i> is: If <i>C</i> declares an instance method named
1337+ /// <i>m</i> that is accessible to <i>L</i>, then that method is the result of
1338+ /// the lookup. Otherwise, if <i>C</i> has a superclass <i>S</i>, then the
1339+ /// result of the lookup is the result of looking up method <i>m</i> in
1340+ /// <i>S</i> with respect to <i>L</i>. Otherwise, we say that the lookup has
1341+ /// failed.
1342+ /// </blockquote>
1343+ // TODO(scheglov): Deprecate and remove it.
1344+ MethodElement2 ? lookUpConcreteMethod (
1345+ String methodName, LibraryElement2 library);
1346+
13281347 /// Returns the element representing the method that results from looking up
13291348 /// the given [methodName] in the superclass of this class with respect to the
13301349 /// given [library] , or `null` if the look up fails.
Original file line number Diff line number Diff line change @@ -6447,6 +6447,13 @@ abstract class InterfaceElementImpl2 extends InstanceElementImpl2
64476447 firstFragment.instantiate (
64486448 typeArguments: typeArguments, nullabilitySuffix: nullabilitySuffix);
64496449
6450+ @override
6451+ MethodElement2 ? lookUpConcreteMethod (
6452+ String methodName, LibraryElement2 library) {
6453+ return _implementationsOfMethod2 (methodName).firstWhereOrNull (
6454+ (method) => ! method.isAbstract && method.isAccessibleIn2 (library));
6455+ }
6456+
64506457 PropertyAccessorElement2 ? lookUpInheritedConcreteGetter (
64516458 String getterName, LibraryElement2 library) {
64526459 return _implementationsOfGetter2 (getterName).firstWhereOrNull ((getter) =>
You can’t perform that action at this time.
0 commit comments