mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 15:09:04 +00:00
Add mixin support to InterfaceTypeImpl.isMoreSpecificThan.
In the long run we should eliminate the code duplication between InterfaceTypeImpl.isMoreSpecificThan and TypeSystem.isMoreSpecificThan (see #34653), but this gets us past the immediate bug. Fixes #34641. Change-Id: I0a7935cff7a0d73728a918db7513e46ff73bc984 Reviewed-on: https://dart-review.googlesource.com/c/77676 Auto-Submit: Paul Berry <paulberry@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
d2e08e4952
commit
621c41f091
|
@ -1706,6 +1706,14 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
if (element.isMixin) {
|
||||
for (InterfaceType constraint in superclassConstraints) {
|
||||
if ((constraint as InterfaceTypeImpl)
|
||||
.isMoreSpecificThan(type, withDynamic, visitedElements)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If a type I includes an instance method named `call`, and the type of
|
||||
// `call` is the function type F, then I is considered to be more specific
|
||||
// than F.
|
||||
|
|
Loading…
Reference in a new issue