[Issue 13904] calls to mutable methods are just ignored when instance is an enum
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu May 11 16:40:43 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=13904
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla at digitalmars.com
Resolution|--- |INVALID
--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
This is actually not a bug.
enum S x = S(10);
x.setValue(20);
is rewritten to be:
S(10).setValue(20);
which is then rewritten to be:
auto tmp = S(10);
tmp.setValue(20);
which works as expected.
--
More information about the Digitalmars-d-bugs
mailing list