[Issue 1262] Local variable of struct type initialized by literal resets when compared to .init

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 12 10:13:52 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1262





------- Comment #2 from fvbommel at wxs.nl  2007-06-12 12:13 -------
(In reply to comment #1)
> umm, struct literals should not be l-value

And your point is?

At no point in the code is a struct literal used as an l-value. There's a
struct variable initialized _by_ a struct literal, and a struct literal being
assigned to a variable, but those are the only struct literals used. And those
operations should only copy the value of the struct literal to the variable
being initialized, which should be perfectly fine.
Structs are value types, not reference types.


-- 



More information about the Digitalmars-d-bugs mailing list