mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 07:19: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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear globals mappings.
|
||||
*/
|
||||
public void clearGlobalsMappings() {
|
||||
globalsMapping.clear();;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the TypeScript string for globals mapping.
|
||||
*/
|
||||
|
||||
@ -1052,6 +1052,7 @@ public class JSweetTranspiler implements JSweetOptions {
|
||||
logger.info("created " + outputFilePath);
|
||||
} finally {
|
||||
context.clearHeaders();
|
||||
context.clearGlobalsMappings();
|
||||
context.clearFooterStatements();
|
||||
}
|
||||
|
||||
|
||||
@ -5783,7 +5783,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
print(exprStr, expr);
|
||||
if (checkFirstArrayElement)
|
||||
print("[0]");
|
||||
print(").length == " + context.getFunctionalTypeParameterCount(type));
|
||||
print(").length === " + context.getFunctionalTypeParameterCount(type));
|
||||
}
|
||||
} else {
|
||||
print(exprStr, expr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user