Property assignment problem

Jonathan M Davis jmdavisProg at gmx.com
Fri May 11 00:18:13 PDT 2012


On Friday, May 11, 2012 09:10:37 SebastianA wrote:
> Okay, thanks for the info. The weird thing is, if I change the
> line to:
> 
> t.vPosition = Vec(2, 2);
> 
> it compiles and works, even if the property is ref. As far as I
> know, this does nothing towards correcting the rvalue issue.
> Should this also cause an error?

struct literals work. They at least used to be lvalues for some bizarre 
reason. I'm not sure if they are now, because it went back and forth prior to 
the last release. They're either still lvalues or the first part of making 
rvalues work with ref has been implemented (but only with struct literals). 
I'm not sure which.

- Jonathan M Davis


More information about the Digitalmars-d mailing list