[Issue 23754] New: betterC cannot use std.format at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 1 02:30:50 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23754
Issue ID: 23754
Summary: betterC cannot use std.format at compile time
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
The following still does not work:
---
import std.format;
import std.stdio;
void main()
{
enum s = "%1$s,%2$s".format("foo","bar");
writeln(s);
}
---
now failing with the message:
std/array.d(3418): Error: `TypeInfo` cannot be used with -betterC
The previous report on this, https://issues.dlang.org/show_bug.cgi?id=18472,
found a compiler bug preventing it from working, but that bug was fixed. The
problem now appears to be that `format` does not have an `if(__ctfe)` path in
it.
--
More information about the Digitalmars-d-bugs
mailing list