www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21875] New: std.format: wrong number of format specifiers in

https://issues.dlang.org/show_bug.cgi?id=21875

          Issue ID: 21875
           Summary: std.format: wrong number of format specifiers in
                    nested format string of associative arrays should be
                    detected
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla bernis-buecher.de

auto aa = [ 1 : "x", 2 : "y", 3 : "z" ];

format("%(%)", spelled);
format("%(%s%)", spelled);
format("%(%s%s%s%)", spelled);

All three format strings should be refuted with exceptions.

--
Apr 28