[Issue 4927] writefln silently ignores arguments not present in the format string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 9 22:30:03 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=4927
Mathias LANG <pro.mathias.lang at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC| |pro.mathias.lang at gmail.com
Resolution|--- |FIXED
--- Comment #7 from Mathias LANG <pro.mathias.lang at gmail.com> ---
As mentioned, the issue in the original message was per spec.
However, the part with positional argument was not, and has since been fixed:
```D
import std.stdio;
void main() {
writefln("A%2$s B%1$s", 10);
}
```
This correctly errors out now.
--
More information about the Digitalmars-d-bugs
mailing list