Make compiler check for arity in part 11 of compiler series.
This commit is contained in:
parent
9fb9eec394
commit
9d16d3840a
|
@ -114,7 +114,7 @@ void type_mgr::unify(type_ptr l, type_ptr r) {
|
||||||
return;
|
return;
|
||||||
} else if((lid = dynamic_cast<type_base*>(l.get())) &&
|
} else if((lid = dynamic_cast<type_base*>(l.get())) &&
|
||||||
(rid = dynamic_cast<type_base*>(r.get()))) {
|
(rid = dynamic_cast<type_base*>(r.get()))) {
|
||||||
if(lid->name == rid->name) return;
|
if(lid->name == rid->name && lid->arity == rid->arity) return;
|
||||||
} else if((lapp = dynamic_cast<type_app*>(l.get())) &&
|
} else if((lapp = dynamic_cast<type_app*>(l.get())) &&
|
||||||
(rapp = dynamic_cast<type_app*>(r.get()))) {
|
(rapp = dynamic_cast<type_app*>(r.get()))) {
|
||||||
unify(lapp->constructor, rapp->constructor);
|
unify(lapp->constructor, rapp->constructor);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user