www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18472] New: betterC: cannot use format at compile time.


          Issue ID: 18472
           Summary: betterC: cannot use format at compile time.
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: iamthewilsonator hotmail.com

import std.format;
import std.stdio;
void main()
    enum s = "%1$s,%2$s".format("foo","bar");

fails with 

/dlang/dmd-nightly/linux/bin64/../../src/phobos/std/array.d(2889): Error:
TypeInfo cannot be used with -betterC

due to the use of Appender

at line 2889 is 

`private struct Data`

This did use to work as I have always compiled Dcompute with -betterC, however
upgrading to LDC 1.8.0b1 based on v2.078.2 (from LDC master in about December),

hit this.

Feb 19 2018