We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
由于代码编译后,运行上下文发生变化 arguments 对象语义也发生变化,所以用 arguments 判断参数的方法已无法使用了,这个不是大问题也很容易解决,可还是会引起一些麻烦,希望能给一个编程规范来避免这样的问题
源代码
eval(Wind.compile("async", function(/*[String], Date*/){ var seg, date; switch (arguments.length){ case 0: date = Date.now(); break; case 1: date = arguments[0]; break; } });
编译后的代码
/* async << function () { */ (function () { var _builder_$0 = Wind.builders["async"]; return _builder_$0.Start(this, _builder_$0.Delay(function () { /* var seg, date; */ var seg, date; /* switch (arguments.length) { */ switch (arguments.length) { /* case 0: */ case 0: /* date = Date.now(); */ date = Date.now(); /* break; */ break; /* case 1: */ case 1: /* date = arguments[0]; */ date = arguments[0]; /* break; */ break; /* } */ } }) ); /* } */ })
The text was updated successfully, but these errors were encountered:
还真是这样,多谢。
Sorry, something went wrong.
JeffreyZhao
No branches or pull requests
由于代码编译后,运行上下文发生变化 arguments 对象语义也发生变化,所以用 arguments 判断参数的方法已无法使用了,这个不是大问题也很容易解决,可还是会引起一些麻烦,希望能给一个编程规范来避免这样的问题
源代码
编译后的代码
The text was updated successfully, but these errors were encountered: