Make compiler check for arity in part 11 of compiler series.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
acb22c4119
commit
1f00b6a3f8
|
@ -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