Commit 158559de by Ian Lance Taylor

Don't crash on interface loop with forwarding types.

From-SVN: r170198
parent 4e380b8e
......@@ -5659,7 +5659,7 @@ Interface_type::finalize_methods()
{
if (q->name().empty())
{
if (q->type() == p->type())
if (q->type()->forwarded() == p->type()->forwarded())
error_at(p->location(), "interface inheritance loop");
else
{
......@@ -5667,7 +5667,8 @@ Interface_type::finalize_methods()
for (i = from + 1; i < this->methods_->size(); ++i)
{
const Typed_identifier* r = &this->methods_->at(i);
if (r->name().empty() && r->type() == q->type())
if (r->name().empty()
&& r->type()->forwarded() == q->type()->forwarded())
{
error_at(p->location(),
"inherited interface listed twice");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment