[haXe] Optional Int, Bool and Float parameters and Flash 9
Nicolas Cannasse
ncannasse at motion-twin.com
Fri Aug 3 11:22:05 CEST 2007
Asger Ottar Alstrup a écrit :
> On 8/1/07, Asger Ottar Alstrup <asger at area9.dk> wrote:
>> Another problem is optional parameters in enums:
>>
>> enum Test {
>> Testing(?a : Int);
>> }
>>
>> class NullBug {
>> public static function main() {
>> switch (Testing(1)) {
>> case Testing(a):
>> if (a == null) 1;
>> }
>> }
>> }
>>
>> This gives
>>
>> NullBug.hx:9: characters 12-16 : In Flash9, null can't be used as basic type Int
>>
>> This affects Arctic a lot, so it would be nice to have fixed.
>
> Any news on this?
>
> Or do I have to change my enums to
>
> Testing(?a : Null<Int>);
It's on my TODO.
Nicolas
More information about the Haxe
mailing list