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

--- Comment #5 from ar...@samerion.com ---
(In reply to RazvanN from comment #3)
> Why does it matter? The call to fun will never return so casting to void (or
> any other value) it actually a no-op.

In this case it makes the compiler issue an unwanted warning. The cast is
supposed to tell the compiler I'm purposefully discarding the return value.

As a workaround, I could've done this:

```
fun();
static if (!is(typeof(stuff()) == void)) {
    writeln("never written");
}
```

But it's a mess, and I don't want to do that every time I call a template
delegate.

--

Reply via email to