Method invocation -- why it's not working?

Simen Kjærås simen.kjaras at gmail.com
Wed Mar 7 15:51:52 PST 2012


On Thu, 08 Mar 2012 00:21:36 +0100, Comrad  
<comrad.karlovich at googlemail.com> wrote:

>    1 struct A
>    2 {
>    3   double[2] _x;
>    4 }
>    5
>    6 @property ref double y(ref A a) {return a._x[1];}
>    7
>    8 void main()
>    9 {
>   10   A a1;
>   11   a1.y=2.;
>   12 }
>
> dmd test.d gives me:
>
> Error: no property 'y' for type 'A'

Uniform function call syntax is not implemented. Due to what
was originally a bug, it works for arrays.


More information about the Digitalmars-d-learn mailing list