[Issue 17435] bogus "need 'this'" error with aggregate field passed in alias parameter
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 26 07:41:21 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17435
--- Comment #2 from ag0aep6g at gmail.com ---
(In reply to Vladimir Panteleev from comment #1)
> Here static applies to the template, not function. You can observe this by
> explicitly rewriting the function template into an eponymous template.
In the code I showed, `static` applies to the template, yes. But applying it to
the function also makes the code compile. And it should be a NOP either way. At
least as far as I know. In the language, there's no such thing as a static
module-level function/template that's distinct from a non-static module-level
function/template, or is there?
[...]
> It looks like you found a different bug here. A function template that takes
> an alias parameter can be implicitly cast to a function pointer, even when
> it uses the alias parameter:
[...]
> That should be filed as a separate accepts-invalid bug.
Sure. Issue 17439.
--
More information about the Digitalmars-d-bugs
mailing list