struct Foo
{
int b;
}
int bar;
void main()
{
Foo f;
bar = f.bar;
}
Example code to reproduce the issue. Error message is: "Failure with output: onlineapp.d(11): Error: function expected before `()`, not `bar` of type `int`"
Potential regression in 2.063
Up to 2.062 : Failure with output: onlineapp.d(11): Error: no property 'bar' for type 'Foo', did you mean 'b'?
2.063 to 2.078.3: Failure with output: onlineapp.d(11): Error: function expected before (), not bar of type int
Since 2.079.1: Failure with output: onlineapp.d(11): Error: function expected before `()`, not `bar` of type `int`
Comment #1 by b2.temp — 2022-10-15T22:15:24Z
The diagnostic that's output is actually the failed UFCS attempt on `bar`. You get the same error message with `bar(f)` for example.
Comment #2 by robert.schadek — 2024-12-13T19:25:04Z