[Issue 17366] Inferrence results in a missing error for final

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 3 01:51:26 PDT 2017


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

Daniel Kozak <kozzi11 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kozzi11 at gmail.com

--- Comment #1 from Daniel Kozak <kozzi11 at gmail.com> ---
final print() { writeln(this); }

is a template!!!. So I believe this is the main source of this "bug".

When you add void it makes print normal member function.

final print() { writeln(this); }
is not same as
final void print() { writeln(this); }

It is more like

final void print()() { writeln(this); }

--


More information about the Digitalmars-d-bugs mailing list