[Issue 19966] [DIP1000] DIP1000 with a template behaves differently

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 13 09:29:47 UTC 2020


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

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
> So it doesn't matter if "foo" is returning something else, like a global variable?

If inference is not happening, then the compiler believes you when you say it
is returning the `this` pointer. This is a feature, not a bug, as it enables
you to attach the checking to the `this` pointer.

--


More information about the Digitalmars-d-bugs mailing list