Detect the bug in the following code
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 15 10:27:59 PDT 2015
On Wednesday, 15 April 2015 at 14:44:48 UTC, Idan Arye wrote:
> import std.stdio;
>
> struct Foo {
> bool registered = false;
>
> void register(int x) {
> writeln("Registering ", x);
> register = true;
> }
> }
>
> void main() {
> Foo foo;
> foo.register(10);
> }
Property assignment syntax for non-property functions is a
horrible, horrible thing.
More information about the Digitalmars-d
mailing list