summaryrefslogtreecommitdiffstats
path: root/bytecomp/printlambda.ml
diff options
context:
space:
mode:
authorLuc Maranget <luc.maranget@inria.fr>2014-04-07 15:43:20 +0000
committerLuc Maranget <luc.maranget@inria.fr>2014-04-07 15:43:20 +0000
commitfcf3571123e2c914768e34f1bd17e4cbaaa7d212 (patch)
tree6b134249f7290400da6f92af29a20f4a6820b476 /bytecomp/printlambda.ml
parent192d8b44d14ccc6aeb1dfeb34325f98d008a1c9d (diff)
Folllowup to PR#6359, great cleanup of switch actions sharing.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/printlambda.ml')
-rw-r--r--bytecomp/printlambda.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/bytecomp/printlambda.ml b/bytecomp/printlambda.ml
index e02196f9b..a2b2d5c5a 100644
--- a/bytecomp/printlambda.ml
+++ b/bytecomp/printlambda.ml
@@ -311,8 +311,12 @@ let rec lam ppf = function
if !spc then fprintf ppf "@ " else spc := true;
fprintf ppf "@[<hv 1>case \"%s\":@ %a@]" (String.escaped s) lam l)
cases;
- if !spc then fprintf ppf "@ " else spc := true;
- fprintf ppf "@[<hv 1>default:@ %a@]" lam default in
+ begin match default with
+ | Some default ->
+ if !spc then fprintf ppf "@ " else spc := true;
+ fprintf ppf "@[<hv 1>default:@ %a@]" lam default
+ | None -> ()
+ end in
fprintf ppf
"@[<1>(stringswitch %a@ @[<v 0>%a@])@]" lam arg switch cases
| Lstaticraise (i, ls) ->