Make the can equal interface more permissive with associated types
This commit is contained in:
parent
e7e6527975
commit
0e7eef6556
|
@ -43,16 +43,19 @@ public:
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (other->get_kind () == TypeKind::PLACEHOLDER)
|
if (other->get_kind () == TypeKind::PLACEHOLDER)
|
||||||
{
|
{
|
||||||
const PlaceholderType *p = static_cast<const PlaceholderType *> (other);
|
const PlaceholderType *p = static_cast<const PlaceholderType *> (other);
|
||||||
if (p->can_resolve ())
|
if (p->can_resolve ())
|
||||||
{
|
{
|
||||||
const BaseType *resolved = p->resolve ();
|
other = p->resolve ();
|
||||||
resolved->accept_vis (*this);
|
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (other->get_kind () == TypeKind::PROJECTION)
|
||||||
|
{
|
||||||
|
const ProjectionType *p = static_cast<const ProjectionType *> (other);
|
||||||
|
other = p->get ();
|
||||||
|
}
|
||||||
|
|
||||||
other->accept_vis (*this);
|
other->accept_vis (*this);
|
||||||
return ok;
|
return ok;
|
||||||
|
|
Loading…
Reference in New Issue