Problem with passing ref parameters to properties

Manu turkeyman at gmail.com
Thu May 10 13:22:02 PDT 2012


On 10 May 2012 18:10, SebastianA <sebastian.ahlman at remedygames.com> wrote:

> test.d(23): Error: not a property t.vPosition
>
> when trying that. If I remove the ternary operator and just assign Vec(2,
> 2) to the property, it works as expected. Am I missing something here? Why
> cannot I write the code as listed above?
>

Hmmm, with this in mind, and the information that it works if you remove
'ref', I wonder if this may be related to the problem that caused me to
have to remove 'ref' from all the operators on tuesday (where we couldn't
chain operators that received their argument by ref, complaining about
lvalues). Perhaps the result of the ternary operator is causing a similar
problem with temporary variable lifetime?

I am suspecting ref its self might be kinda broken. Is it a fairly new
keyword? We've had a few weird problems with it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20120510/dff3f00b/attachment.html>


More information about the D.gnu mailing list