mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 07:19:22 +00:00
fixed #140
Problem related to the sourceMap option. Set the tests to use the sourceMap option because more fragile (ideally we should test both but tests would be twice longer)
This commit is contained in:
parent
ca9dfef10e
commit
16ba6762ea
@ -848,7 +848,7 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (def instanceof JCVariableDecl) {
|
||||
if (def instanceof JCVariableDecl && !(getScope().sharedMode && ((JCVariableDecl) def).getModifiers().getFlags().contains(Modifier.STATIC))) {
|
||||
if (getScope().enumScope) {
|
||||
print(", ");
|
||||
} else {
|
||||
@ -966,6 +966,9 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
println().println().printIndent().print("export namespace ").print(classdecl.getSimpleName().toString()).print(" {").startIndent();
|
||||
}
|
||||
println().println().printIndent().print(def);
|
||||
if (def instanceof JCVariableDecl) {
|
||||
print(";");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nameSpace) {
|
||||
|
||||
@ -100,6 +100,7 @@ public class AbstractTest {
|
||||
transpiler = new JSweetTranspiler(outDir, null, new File(JSweetTranspiler.TMP_WORKING_DIR_NAME + "/candies/js"),
|
||||
System.getProperty("java.class.path"));
|
||||
transpiler.setModuleKind(ModuleKind.none);
|
||||
transpiler.setPreserveSourceLineNumbers(true);
|
||||
FileUtils.deleteQuietly(transpiler.getWorkingDirectory());
|
||||
transpiler.getCandiesProcessor().touch();
|
||||
testSuiteInitialized = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user