Meta-comment: I will apply this patch, as well as the other Format fixes lying around, but I'm in holidays this post-ICFP week so it will probably happen next week. If anyone has a good reason to need the fixes earlier, ask for it, I could possibly free some time or delegate to Damien.
Original bug ID: 6533
Reporter: @yakobowski
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:34:47Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.02.0+beta1 / +rc1
Target version: 4.02.1+dev
Category: standard library
Monitored by: @gasche "Julien Signoles" @hcarty
Bug description
The following code exhibits very different outputs in 4.02
let fmt = Format.std_formatter
let () =
Format.fprintf fmt "@[<v 2>";
Format.fprintf fmt "{@ ";
let pp_elt fmt i = Format.fprintf fmt "%d" i in
Format.fprintf fmt "%(%)%a%(%)" "@[" pp_elt 1 "@]@ ";
pp_elt fmt 5;
Format.fprintf fmt "@;<1 -2>}";
Format.fprintf fmt "@]@.";
The problem is in the interpretation of the first %(%). The '@[' format seems to be ignored.
File attachments
The text was updated successfully, but these errors were encountered: