Invalid plus operation in neko target

Anyone else get this, or am I dreaming?

Maybe _seconds has not been assigned an initial value?

Oh yeah, of course. I really wish Haxe understood default values. So infuriating. My brain is just not working today.

And thanks.

From here:

Define: Default values
Basic types have the following default values on static targets:

  • Int: 0
  • Float: NaN on Flash, 0.0 on other static targets
  • Bool: false


Define: Static target
Static targets employ their own type system where null is not a valid value for basic types. This is true for the Flash, C++, Java and C# targets.

Define: Dynamic target
Dynamic targets are more lenient with their types and allow null values for basic types. This applies to the JavaScript, PHP, Neko and Flash 6-8 targets.

So basically, watch out for Neko and JavaScript.

…though Javascript will treat null as 0 in arithmetic, I believe (null + 1 = 1)