braceless with statements
user1234
user1234 at 12.de
Fri Nov 12 21:44:25 UTC 2021
On Friday, 12 November 2021 at 12:52:28 UTC, kdevel wrote:
> That's good, but why stop half way? Drop the colon, drop the
> parentheses,
parens can be removed that simply:
```d
import std.stdio;
struct L
{
struct R
{
static opUnary(string s : "-")() {writeln("oops");}
}
}
void main()
{
with (L) - R;
}
```
now remove the parens... oops the parser sees a binary minus ;)
More information about the Digitalmars-d
mailing list