diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-03-30 14:56:34 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-04-11 11:44:59 +0100 |
commit | 0e7eef6556703cd53b336d0b5280c3696586d431 (patch) | |
tree | 27ca9d19ce696edf0b19f302de3069ae290834e4 /gcc | |
parent | e7e6527975d2872c6e928dca6912604b021715cb (diff) | |
download | gcc-0e7eef6556703cd53b336d0b5280c3696586d431.zip gcc-0e7eef6556703cd53b336d0b5280c3696586d431.tar.gz gcc-0e7eef6556703cd53b336d0b5280c3696586d431.tar.bz2 |
Make the can equal interface more permissive with associated types
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/typecheck/rust-tyty-cmp.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/rust/typecheck/rust-tyty-cmp.h b/gcc/rust/typecheck/rust-tyty-cmp.h index 34c8963..9ea49ca 100644 --- a/gcc/rust/typecheck/rust-tyty-cmp.h +++ b/gcc/rust/typecheck/rust-tyty-cmp.h @@ -43,16 +43,19 @@ public: return ok; } } - else if (other->get_kind () == TypeKind::PLACEHOLDER) + if (other->get_kind () == TypeKind::PLACEHOLDER) { const PlaceholderType *p = static_cast<const PlaceholderType *> (other); if (p->can_resolve ()) { - const BaseType *resolved = p->resolve (); - resolved->accept_vis (*this); - return ok; + other = p->resolve (); } } + if (other->get_kind () == TypeKind::PROJECTION) + { + const ProjectionType *p = static_cast<const ProjectionType *> (other); + other = p->get (); + } other->accept_vis (*this); return ok; |