Open sys9kdr opened 6 months ago
This is enough:
function main() trace([1,2,"wat"]);
The problem is that type errors do not thrown in interp, but in python.
My concern is the differences between platforms, not the usability of trace
.
This is really about trace
and its special typing in order to make hello-world programs on JS (and apparently python) look nicer. You won't like the fix here because it's going to make the error disappear on those targets as well. It's the expected behavior when typing against Dynamic
, which is the argument type of haxe.Log.trace
.
ahh sorry, I finally understand. I updated my repo with simpler ones. https://github.com/sys9kdr/haxe-interp-miss-err/tree/trace-differences-between-targets
I checked interp and lua allow mixed array, but python and js don't. Is this deference a problem or design?
problem
At runtime,
--interp
missing type mismatch. In python target , it can be detected at compile time. Expected that interp cause runtime error, but interp ignore error.code
Test.hx:
JsonLoadMacro.hx:
interp.hxml:
py.hxml
how to reproduce