Fix kind inference not detecting when too many arguments are applied

This commit is contained in:
Sam Vervaeck 2022-09-15 13:49:07 +02:00
parent e3d00f6146
commit 685ff3cf2d

View file

@ -919,8 +919,8 @@ export class Checker {
const a2 = this.createKindVar(); const a2 = this.createKindVar();
const arrow = new KArrow(a1, a2); const arrow = new KArrow(a1, a2);
this.unifyKind(arrow, operator, node); this.unifyKind(arrow, operator, node);
this.unifyKind(a1, arg, node); this.unifyKind(a2, arg, node);
return a2; return a1;
} }
case KindType.Arrow: case KindType.Arrow:
{ {