fixed trace() with multiple arguments

This commit is contained in:
ncannasse
2017-11-23 16:14:59 +01:00
parent e2bc716ea7
commit 4a8b2690aa
+6 -1
View File
@@ -61,7 +61,12 @@ class Interp {
variables.set("null",null);
variables.set("true",true);
variables.set("false",false);
variables.set("trace",function(e) haxe.Log.trace(Std.string(e), posInfos()));
variables.set("trace", Reflect.makeVarArgs(function(el) {
var inf = posInfos();
var v = el.shift();
if( el.length > 0 ) inf.customParams = el;
haxe.Log.trace(Std.string(v), inf);
}));
initOps();
}