File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
pkg/analyzer/lib/src/dart/element Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -259,30 +259,6 @@ abstract class TypeSystem implements public.TypeSystem {
259259 return inferredTypes;
260260 }
261261
262- /// Searches the superinterfaces of [type] for implementations of
263- /// [genericType] and returns the most specific type argument used for that
264- /// generic type.
265- ///
266- /// For a more general/robust solution, use [InterfaceTypeImpl.asInstanceOf] .
267- ///
268- /// For example, given [type] `List<int>` and [genericType] `Iterable<T>` ,
269- /// returns [int] .
270- ///
271- /// Returns `null` if [type] does not implement [genericType] .
272- DartType mostSpecificTypeArgument (DartType type, DartType genericType) {
273- if (type is ! InterfaceType ) return null ;
274- if (genericType is ! InterfaceType ) return null ;
275-
276- var asInstanceOf =
277- type.asInstanceOf ((genericType as InterfaceType ).element);
278-
279- if (asInstanceOf != null ) {
280- return asInstanceOf.typeArguments[0 ];
281- }
282-
283- return null ;
284- }
285-
286262 /// Returns a non-nullable version of [type] . This is equivalent to the
287263 /// operation `NonNull` defined in the spec.
288264 @override
You can’t perform that action at this time.
0 commit comments