File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1518,18 +1518,19 @@ let advance_pos item pos_stat pos_rt env =
1518
1518
let add sf sf' =
1519
1519
match (sf, sf') with
1520
1520
| (Nonstatic , sf ) | (sf , Nonstatic) -> sf
1521
- | _ -> assert false
1521
+ | (Static, Static) ->
1522
+ raise (Invalid_argument " Evaluating static sigitem in phase-1 env" )
1522
1523
in
1523
1524
let pos = function Static -> pos_stat | Nonstatic -> pos_rt in
1524
1525
match item with
1525
1526
| Sig_value (_id , sf , decl ) ->
1526
- let sf = add (sf_of_phase (cur_phase env)) sf in
1527
1527
begin match decl.val_kind with
1528
1528
| Val_macro ->
1529
1529
(Biphase (pos_stat, pos_rt), pos_stat+ 1 , pos_rt+ 1 )
1530
1530
| Val_prim _ ->
1531
+ let sf = add (sf_of_phase (cur_phase env)) sf in
1531
1532
(Uniphase (sf, pos sf), pos_stat, pos_rt)
1532
- | _ when sf = Static ->
1533
+ | _ when cur_phase env = 1 || sf = Static ->
1533
1534
(Uniphase (Static , pos_stat), pos_stat+ 1 , pos_rt)
1534
1535
| _ ->
1535
1536
(Uniphase (Nonstatic , pos_rt), pos_stat, pos_rt+ 1 )
You can’t perform that action at this time.
0 commit comments