mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 15:29:22 +00:00
fix residual globals mapping
This commit is contained in:
parent
f1a4036fa8
commit
1b4948e625
@ -1051,6 +1051,13 @@ public class JSweetContext extends Context {
|
|||||||
globalsMapping.put(from, to);
|
globalsMapping.put(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear globals mappings.
|
||||||
|
*/
|
||||||
|
public void clearGlobalsMappings() {
|
||||||
|
globalsMapping.clear();;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the TypeScript string for globals mapping.
|
* Returns the TypeScript string for globals mapping.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1052,6 +1052,7 @@ public class JSweetTranspiler implements JSweetOptions {
|
|||||||
logger.info("created " + outputFilePath);
|
logger.info("created " + outputFilePath);
|
||||||
} finally {
|
} finally {
|
||||||
context.clearHeaders();
|
context.clearHeaders();
|
||||||
|
context.clearGlobalsMappings();
|
||||||
context.clearFooterStatements();
|
context.clearFooterStatements();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5783,7 +5783,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
|||||||
print(exprStr, expr);
|
print(exprStr, expr);
|
||||||
if (checkFirstArrayElement)
|
if (checkFirstArrayElement)
|
||||||
print("[0]");
|
print("[0]");
|
||||||
print(").length == " + context.getFunctionalTypeParameterCount(type));
|
print(").length === " + context.getFunctionalTypeParameterCount(type));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print(exprStr, expr);
|
print(exprStr, expr);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user