Haxe is too stupid...
(you cannot switch on expressions, even with inlined vars)