On Saturday, 29 June 2013 at 12:57:07 UTC, Namespace wrote:
I get this with -wi:
bug.d(5): Warning: explicit element-wise assignment
(test[0u])[] = false is bett
er than test[0u] = false
That helps a bit. But I thought that D dereferences
automatically? ;)
Only when making a function call (AFAIK), eg: "p.foo();"
This also takes precedence over UFCS:
----
struct S
{
void foo(){writeln("val");}
}
void foo(S*){writeln("pointer");} //troll function trying to
hijack p.foo()
void main()
{
S* p = new S;
p.foo();
}
--------
val
--------