File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
test/expect-tests/dune_lang Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ let rec simplify = function
305305 let combined_sw = String_with_vars. make ~quoted loc parts in
306306 Literal combined_sw)
307307 else Form (loc, Concat (List. map xs ~f: simplify))
308+ | When (_ , Nil) -> Nil
308309 | When (condition , t ) ->
309310 let simplified_condition = simplify_blang condition in
310311 (match (simplified_condition : blang ) with
Original file line number Diff line number Diff line change @@ -326,10 +326,9 @@ let%expect_test "when unknown" =
326326 [% expect {| When (Expr (Literal (template " %{pkg-self:x}" )), Literal " hello" ) | }]
327327;;
328328
329- (* CR-soon Alizter: when with nil body should reduce to Nil *)
330329let % expect_test " when unknown nil" =
331330 print_slang (Slang. when_ (expr (pform " x" )) Slang. Nil );
332- [% expect {| When ( Expr ( Literal (template " %{pkg-self:x} " )), Nil ) | }]
331+ [% expect {| Nil | }]
333332;;
334333
335334(* Slang: If *)
You can’t perform that action at this time.
0 commit comments