[Issue 5788] Return [] array

2013-07-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5788



--- Comment #3 from bearophile_h...@eml.cc 2013-07-03 11:19:34 PDT ---
currently this code:

void main() {
int[] emptyArray = [];
}



Produces:

__Dmain comdat
L0: pushEAX
mov EAX,offset FLAT:_D11TypeInfo_Ai6__initZ
push0
pushEAX
callnear ptr __d_arrayliteralTX
add ESP,8
xor EAX,EAX
pop ECX
ret

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5788] Return [] array

2011-04-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5788


Vladimir thecybersha...@gmail.com changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com


--- Comment #1 from Vladimir thecybersha...@gmail.com 2011-04-01 19:03:12 PDT 
---
No!

Often it is extremely useful to distinguish an empty array from a null one.
(You do that with is null).

Fixing this will break a lot of my code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5788] Return [] array

2011-04-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5788



--- Comment #2 from Vladimir thecybersha...@gmail.com 2011-04-01 19:08:43 PDT 
---
Erm, never mind, [] still creates a null array. I just remembered I had to do
something more tricky in my code to make empty non-null arrays.

https://github.com/CyberShadow/RABCDAsm/blob/cecff913/abcfile.d#L1094

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---