Woops, I got confused. I was thinking about structs, not arrays. But yeah, in this case a float gets compared to a double and it seems to evaluate to false.
On Wed, Jul 28, 2010 at 7:26 PM, Jonathan M Davis <[email protected]>wrote: > On Wednesday, July 28, 2010 09:49:52 Andrej Mitrovic wrote: > > IIRC arrays are value types and as such they are compared bit-by-bit > > to each other, right? > > Dynamic arrays are reference types (though static arrays are indeed value > types), and they evaluate for equality by comparing each element in turn > (though > presumably, they compare their length first and don't bother with element > comparisons if the lengths don't match). Look at section 4.1.5 on page 100 > of > TDPL. > > - Jonathan M Davis >
