[Issue 23754] betterC cannot use std.format at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 11 19:26:37 UTC 2023


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

--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
The problem is illustrated with:

---
void test()
{
    enum s = foo();
}

int foo()
{
    new C();
    return 1;
}

class C { }
---

While executing foo() at compile time works, even with -betterC, the compiler
still tries to generate code for foo(). This produces the error about a
reference to TypeInfo.

--


More information about the Digitalmars-d-bugs mailing list