[Issue 17239] template this in typeof expressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 14 13:12:49 UTC 2022


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

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org

--- Comment #2 from Nick Treleaven <nick at geany.org> ---
>     @property int b(this X)() { return 2; }

If you change b above to c (I assume it's a typo), you get:

int
int()
void

As c is a template, the type is supposed to be void. This is nothing to do with
the template this parameter.

--


More information about the Digitalmars-d-bugs mailing list