Cpp error when compiling haxe code

Hi I’m trying to use raylib-hx (GitHub - foreignsasquatch/raylib-hx: Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming) it compiles to the hxcpp target:

The code is straightforward, it uses the keys WASD if it hasn’t been filled.

function arrowAxis(speed = 1.0, up = Rl.Keys.W, left = Rl.Keys.A, down = Rl.Keys.S, right = Rl.Keys.D) {
   var isLeft = Rl.isKeyDown(left);
   var isRight = Rl.isKeyDown(right);
   var isUp = Rl.isKeyDown(up);
   var isDown = Rl.isKeyDown(down);
}

Yet when I try to compile it, it gives an error in cpp:

./src/core/_InputKeyboard/InputKeyboard_Fields_.cpp(45): error C2660: 'hx::Null<int>::Default': function does not take 0 arguments
C:\HaxeToolkit\haxe\lib\hxcpp\4,3,2\include\null.h(196): note: see declaration of 'hx::Null<int>::Default'
./src/core/_InputKeyboard/InputKeyboard_Fields_.cpp(45): note: while trying to match the argument list '()'
./src/core/_InputKeyboard/InputKeyboard_Fields_.cpp(46): error C2660: 'hx::Null<int>::Default': function does not take 0 arguments
C:\HaxeToolkit\haxe\lib\hxcpp\4,3,2\include\null.h(196): note: see declaration of 'hx::Null<int>::Default'
./src/core/_InputKeyboard/InputKeyboard_Fields_.cpp(46): note: while trying to match the argument list '()'
./src/core/_InputKeyboard/InputKeyboard_Fields_.cpp(47): error C2660: 'hx::Null<int>::Default': function does not take 0 arguments

Peeking into the cpp code it’s not filling in the Rl.isKeyDown(left) with left and its leaving it at 0 arguments.

Guess my question is, is it normal to have errors in the CPP and not in haxe like this?

I’m not familiar with the @:native metadata or extern abstracts, but I’m sure it has something to do with one of those.

My only idea is to simplify your example, and try to narrow things down.

function arrowAxis(speed = 1.0) {
   var isLeft = Rl.isKeyDown(Rl.Keys.A);
   var isRight = Rl.isKeyDown(Rl.Keys.D);
   var isUp = Rl.isKeyDown(Rl.Keys.W);
   var isDown = Rl.isKeyDown(Rl.Keys.S);
}

Other than that, I think starting an issue/discussion in the raylib-hx repo is your best bet.