May 16

RazvanN <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from RazvanN <> ---
This doesn't seem to have anything to do with property. This yields the same result:

template T(bool value) {}

bool getValue() { return true; }
alias Inst1 = T!(getValue); // OK

struct S2 { static bool getValue() { return true; } } alias Inst2 = T!(S2.getValue); // OK

struct S3 { bool getValue() { return true; } }
alias Inst = T!(S3().getValue); // Error

May 16

--- Comment #2 from RazvanN <> ---
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.