[Issue 19091] __traits(compiles) and error in templated structs leads to missing symbol

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 2 09:20:34 UTC 2020


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

--- Comment #3 from FeepingCreature <default_357-line at yahoo.de> ---
Correction, sorry; didn't pay attention and accidentally pasted a working
version. This one properly linker errors:

```
void early()() { auto var = Struct!()(0); }

struct Struct() { this(int) { } void fun() { error; } }

void main() {
    void helper()() { early!(); }

    static assert(!__traits(compiles, helper()));
    helper();
}
```

--


More information about the Digitalmars-d-bugs mailing list