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





------- Comment #2 from hs...@inter7.jp  2009-03-30 06:02 -------
(In reply to comment #1)

real[2][int] hash = null;
real[2] v = [3,4];

*(hash[0])=1;
write(hash[0]);
// -> [1 0], very strange result. where does 0 come from? *1

hash[0]=v;
write(hash[0]);
// -> [3 4], it works well if key have been already set.


*1
real.init is NaN. actually: write(new real[2]) -> [nan nan].
This test code might show us a different bug of accepts-invalid.

To make matters worse, following code is compiled without any error
and cause runtime object.Exception: lengths don't match for array copy.

real[1] v = [3,4];

I think that this code should be an compile-time error because
the compiler knows types of both `real[1] v' and `[3,4]'.
I will report these bugs if they have not been reported on this tracking
system.


-- 

Reply via email to