[Issue 22794] New: Compile-time format validation gives unhelpful error on too many arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 20 10:07:05 UTC 2022


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

          Issue ID: 22794
           Summary: Compile-time format validation gives unhelpful error
                    on too many arguments
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: zorael at gmail.com

Manjaro/Arch x86_&4, dmd 2.098.1.

```d
import std.stdio;

void main()
{
    writefln!"%s"("a", "b");
}
```

>/dlang/dmd/linux/bin64/../../src/phobos/std/stdio.d(4442): Error: no property `msg` for type `string`
>/dlang/dmd/linux/bin64/../../src/phobos/std/stdio.d(4442): Error: static assert:  __error
>onlineapp.d(4):        instantiated from here: `writefln!("%s", string, string)`

https://run.dlang.io/is/fQ9GtQ

--


More information about the Digitalmars-d-bugs mailing list