[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:31:00 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=19091
--- Comment #4 from FeepingCreature <default_357-line at yahoo.de> ---
A different way of provoking the same effect:
```
struct Struct() {
static void missing() { } // this will be missing from the linker
void fun() { error; } // will provoke an error if attempted to compile
}
void helper1()() { Struct!().missing; }
void helper2()() { helper1(); }
void main() {
static assert(!__traits(compiles, helper2()));
helper1();
}
```
--
More information about the Digitalmars-d-bugs
mailing list