diff options
author | John Hodge <tpg@ucc.asn.au> | 2016-06-05 00:30:12 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2016-06-05 00:30:12 +0800 |
commit | 1f614012969b0d9052ee1bb0526afddc7e6187b6 (patch) | |
tree | c46d8d2d3815aa72c97633ebf5adaff99d68bc0a /src/ast/types.cpp | |
parent | b745c5f88faf89af9a487b7cf0cfc362b73c0423 (diff) | |
download | mrust-1f614012969b0d9052ee1bb0526afddc7e6187b6.tar.gz |
Resolve - Replace `Self` when known
Diffstat (limited to 'src/ast/types.cpp')
-rw-r--r-- | src/ast/types.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/ast/types.cpp b/src/ast/types.cpp index 7b1c4cdb..070f02ba 100644 --- a/src/ast/types.cpp +++ b/src/ast/types.cpp @@ -168,16 +168,6 @@ Ordering TypeRef::ord(const TypeRef& x) const return OrdEqual; ), (Generic, - if( ent.params != x_ent.params ) - { - DEBUG(*this << " == " << x); - if( ent.params ) DEBUG("- (L) " << *ent.params); - if( x_ent.params ) DEBUG("- (R) " << *x_ent.params); - throw ::std::runtime_error("Can't compare mismatched generic types"); - //BUG(m_span, "Can't compare mismatched generic types"); - } - else { - } return ::ord(ent.name, x_ent.name); ), (Path, @@ -245,7 +235,7 @@ Ordering TypeRef::ord(const TypeRef& x) const os << "]"; ) _(Generic, - os << "/* arg */ " << ent.name << "/*"<<ent.level<<"*/"; + os << "/* arg */ " << ent.name << "/*"<<ent.index<<"*/"; ) _(Path, os << ent.path; @@ -337,7 +327,7 @@ SERIALISE_TYPE(TypeRef::, "TypeRef", { ) _S(Generic, s.item( ent.name ); - s.item( ent.level ); + s.item( ent.index ); ) _S(Array, s.item( ent.inner ); @@ -386,7 +376,7 @@ SERIALISE_TYPE(TypeRef::, "TypeRef", { ) _D(Generic, s.item( ent.name ); - s.item( ent.level ); + s.item( ent.index ); ) _D(Array, s.item( ent.inner ); |