diff --git a/kiss/src/kiss/SpecialForms.hx b/kiss/src/kiss/SpecialForms.hx index e1ab8f25..46a643bf 100644 --- a/kiss/src/kiss/SpecialForms.hx +++ b/kiss/src/kiss/SpecialForms.hx @@ -306,9 +306,9 @@ class SpecialForms { var exp = k.withoutListWrapping().convert(args[0]); - // On C# and C++, value types (specifically Float and Int) cannot be null, so they cannot be compared with null. + // On C#, C++, and HashLink, value types (specifically Float and Int) cannot be null, so they cannot be compared with null. // Therefore a null case doesn't need to be added--and will cause a compile failure if it is. - var canCompareNull = if (Context.defined('cs') || Context.defined('cpp')) { + var canCompareNull = if (Context.defined('cs') || Context.defined('cpp') || Context.defined('hl')) { // TODO can locals from let bindings and localVar be gathered and passed to this? Would be difficult and maybe require a separate stack in KissState for each (begin) conversion switch (exp.typeof()) { case Success(TAbstract(ref, [])) if (["Int", "Float"].indexOf(ref.get().name) != -1):