Comment #0 by dlang-bugzilla — 2014-02-19T15:43:46Z
template T()
{
void foo() {}
}
struct S
{
alias t = T!();
alias t this;
}
void main()
{
S s;
s.foo();
}
Comment #1 by schuetzm — 2015-03-15T16:33:45Z
Still there in DMD master. The error message is:
xx.d(15): Error: expression has no value
Comment #2 by razvan.nitu1305 — 2018-10-19T14:01:25Z
This is a weird case. The alias is part of the struct, but the actual function is not. I would say that the correct behavior is the current one:
Error : no property foo for type S.
Note that writing s.t.foo works. In my opinion, this is the real bug.
Comment #3 by robert.schadek — 2024-12-13T18:17:10Z