mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 15:29:22 +00:00
undo fix assertion line (that's more complex)
This commit is contained in:
parent
26ccdaa8ac
commit
7ad1657c0f
@ -645,8 +645,8 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
if (globals || adaptedQualId != null) {
|
||||
ModuleImportDescriptor moduleImport = getModuleImportDescriptor(importedName, importedClass);
|
||||
if (moduleImport != null) {
|
||||
useModule(false, moduleImport.getTargetPackage(), importDecl,
|
||||
moduleImport.getImportedName(), moduleImport.getPathToImportedClass(), null);
|
||||
useModule(false, moduleImport.getTargetPackage(), importDecl, moduleImport.getImportedName(),
|
||||
moduleImport.getPathToImportedClass(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5249,8 +5249,8 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
public void visitAssert(JCAssert assertion) {
|
||||
if (!context.options.isIgnoreAssertions()) {
|
||||
String assertCode = assertion.toString().replace("\"", "'");
|
||||
print("if(!(").print(assertion.cond).print(")) throw new Error(\"Assertion error line "
|
||||
+ diagnosticSource.getLineNumber(assertion.getStartPosition()) + ": " + assertCode + "\");");
|
||||
print("if(!(").print(assertion.cond).print(
|
||||
")) throw new Error(\"Assertion error line " + getCurrentLine() + ": " + assertCode + "\");");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user