On Wednesday, 16 March 2016 at 11:22:02 UTC, rikki cattermole wrote:

Change those static if's to just plain old ifs.

But then this wouldn't compile, would it?
```
static if(__traits(compiles, __traits(getMember, a, "b"))) {
   return a.b;
}
```
(real code, I am not making this up)

Imagine those foreach loops being unrolled and what that happens there isn't just one return there, imagine many many many of them and all of them valid.

Yep :-)

Perhaps the only solution is to be able to annotate the code to "shut up" DMD about it.

Reply via email to