Skip to content

Commit 3d563c4

Browse files
committed
possible fix
1 parent 98b53a0 commit 3d563c4

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/mo_frontend/typing.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ let add_val env id t =
346346
let add_typs env xs cs =
347347
{ env with
348348
typs = List.fold_right2 T.Env.add xs cs env.typs;
349-
cons = List.fold_right T.ConSet.disjoint_add cs env.cons;
349+
cons = List.fold_right T.ConSet.add cs env.cons;
350350
}
351351

352352
let adjoin env scope =
@@ -363,7 +363,7 @@ let adjoin_vals env ve = {env with vals = T.Env.adjoin env.vals (available ve)}
363363
let adjoin_typs env te ce =
364364
{ env with
365365
typs = T.Env.adjoin env.typs te;
366-
cons = T.ConSet.disjoint_union env.cons ce;
366+
cons = T.ConSet.union env.cons ce;
367367
}
368368

369369
let disjoint_union env at code fmt env1 env2 =

test/repl/ok/issue-5708.stderr.ok

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/repl/ok/issue-5708.stdout.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Motoko compiler (source XXX)
22
> type t = <T>T -> <T_1>T_1 -> T_1
33
> type T = ()
4+
> type t = <T>T -> <T_1>T_1 -> T_1
45
>

0 commit comments

Comments
 (0)