www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - AAs can't contain references to interfaces

reply Bastiaan Veelo <Bastiaan.N.Veelo ntnu.no> writes:
Hi,

Unless my code is incorrect, we can't have an associative array with 
interface references? Things go terribly wrong...

#class SlotManager {}

#interface GenericSlot






#class Slot : GenericSlot








#void main(char[][] arg)










output:
This should never be shown!!!


Removing any members from the interface produces a segmentation fault, 
so the execution of dead code appears to be a coinsidence.

dmd 0.129 on Linux.


Best regards,
Bastiaan.

(and thanks again for D :-)
Sep 04 2005
parent Thomas Kühne <thomas-dloop kuehne.cn> writes:
In article <dffjik$2p30$1 digitaldaemon.com>, Bastiaan Veelo says...
Hi,

Unless my code is incorrect, we can't have an associative array with 
interface references? Things go terribly wrong...

#class SlotManager {}

#interface GenericSlot






#class Slot : GenericSlot








#void main(char[][] arg)










output:
This should never be shown!!!


Removing any members from the interface produces a segmentation fault, 
so the execution of dead code appears to be a coinsidence.

dmd 0.129 on Linux.
Added to DStress as http://dstress.kuehne.cn/run/a/associative_array_18_A.d http://dstress.kuehne.cn/run/a/associative_array_18_B.d http://dstress.kuehne.cn/run/a/associative_array_18_C.d http://dstress.kuehne.cn/run/a/associative_array_18_D.d Thomas
Sep 07 2005