[Issue 23267] New: statically evaluated code in betterC mask static assertion message with an unrelated error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 22 09:53:56 UTC 2022


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

          Issue ID: 23267
           Summary: statically evaluated code in betterC mask static
                    assertion message with an unrelated error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: betterC
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com

compiles this with -betterC

```
import std.conv : to;
static assert(0, to!string(0));

extern(C) int main()
{
    return 0;
}    
```

to obtain

> Error: `TypeInfo` cannot be used with -betterC

this is because the code for to!string is incompatible with -betterC but in
this case it is only statically evaluated.

--


More information about the Digitalmars-d-bugs mailing list