massive-oss/msignal

SlotList throws Error in php

Opened this issue · 0 comments

The php target version will throw exception: "Parameters head and tail are null. Use the NIL element instead."

it is because the generated code hase two times the following line at the end of file SlotList.class.php:
msignal_SlotList::$NIL = new msignal_SlotList(null, null);

I think it comes from the fact that in haxe code you have two ways of initialisation of NIL property:
one is: static function init() { NIL = new SlotList<Dynamic, Dynamic>(null, null); }
the other is: public static var NIL:SlotList<Dynamic, Dynamic> = new SlotList<Dynamic, Dynamic>(null, null);

I tried to delete the first one, and it seems to work fine either in php and other targets.
Why did you need this hackish init? was it for haxe2 init?

Could you please delete this line or properly switch init cases with #if haxe3 please?
Thanks