Kagamin: > [] is not null, it's an array of 0 elements, what is done exactly. > edx points to the allocated array.
I don't understand what you say. I think the caller of foo() and bar() receive the same thing, two empty registers. I think that cast(int[])null and cast(int[])[] are the same thing for D. void main() { assert(cast(int[])null == cast(int[])null); auto a1 = cast(int[])null; a1 ~= 1; auto a2 = 1 ~ cast(int[])null; } Bye, bearophile