[Issue 23915] Instance method properties not evaluated when passed to template value argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 16 13:01:38 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23915
--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
I've tried to entangle what happens here, but the behavior is a bit puzzling.
It turns out that free functions and static member functions are considered
types when instantiating the template, but the `S3().getValue` is considered an
expression. On the expression path of the code, since the () are missing, this
is seen as just refering to the symbol `getValue` not actually calling it.
Resolving `getValue` to a function fixes the issue but it makes other parts of
the template instantiation mechanism fail, so I'm stuck at this point. There's
just too much context that I'm missing: I have no idea why `S2.getValue` or
`getValue` are treated as types in this scenario. They must be resolved somehow
later to their corresponding expressions.
--
More information about the Digitalmars-d-bugs
mailing list