parent
2d10ceedc9
commit
c1e17955cd
1 changed files with 3 additions and 3 deletions
|
@ -870,8 +870,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(a2, arg, node);
|
this.unifyKind(a1, arg, node);
|
||||||
return a1;
|
return a2;
|
||||||
}
|
}
|
||||||
case KindType.Arrow:
|
case KindType.Arrow:
|
||||||
{
|
{
|
||||||
|
@ -1036,7 +1036,7 @@ export class Checker {
|
||||||
|
|
||||||
if (a.type === KindType.Arrow && b.type === KindType.Arrow) {
|
if (a.type === KindType.Arrow && b.type === KindType.Arrow) {
|
||||||
return this.unifyKind(a.left, b.left, node)
|
return this.unifyKind(a.left, b.left, node)
|
||||||
|| this.unifyKind(a.right, b.right, node);
|
&& this.unifyKind(a.right, b.right, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.diagnostics.add(new KindMismatchDiagnostic(solve(a), solve(b), node));
|
this.diagnostics.add(new KindMismatchDiagnostic(solve(a), solve(b), node));
|
||||||
|
|
Loading…
Reference in a new issue