mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 07:19:22 +00:00
Enable stats from command line + fix problem with varargs
This commit is contained in:
parent
824c04872f
commit
456ce0769c
@ -903,7 +903,10 @@ public class JSweetCommandLineLauncher {
|
|||||||
}
|
}
|
||||||
if (jsapArgs.userSpecified(JSweetOptions.disableOverloadStubs)) {
|
if (jsapArgs.userSpecified(JSweetOptions.disableOverloadStubs)) {
|
||||||
transpiler.setGenerateOverloadStubs(!jsapArgs.getBoolean(JSweetOptions.disableOverloadStubs));
|
transpiler.setGenerateOverloadStubs(!jsapArgs.getBoolean(JSweetOptions.disableOverloadStubs));
|
||||||
}
|
}
|
||||||
|
if (jsapArgs.userSpecified(JSweetOptions.stats)) {
|
||||||
|
transpiler.setStats(jsapArgs.getBoolean(JSweetOptions.stats));
|
||||||
|
}
|
||||||
|
|
||||||
if (tsOutputDir != null) {
|
if (tsOutputDir != null) {
|
||||||
transpiler.setTsOutputDir(tsOutputDir);
|
transpiler.setTsOutputDir(tsOutputDir);
|
||||||
|
|||||||
@ -4165,7 +4165,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<JCExpression> substitutionArgs = inv.args;
|
List<JCExpression> substitutionArgs = inv.args;
|
||||||
if (methSym != null && applyVarargs && inv.args.length() == methSym.getParameters().length()) {
|
if (methSym != null && applyVarargs && inv.args.length() > 0 && inv.args.length() == methSym.getParameters().length()) {
|
||||||
JCExpression expr = inv.args.last();
|
JCExpression expr = inv.args.last();
|
||||||
JCNewArray newArrayExpr = null;
|
JCNewArray newArrayExpr = null;
|
||||||
if (expr instanceof JCNewArray) {
|
if (expr instanceof JCNewArray) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user