Fixed bug with printing
This commit is contained in:
+6
-3
@@ -357,10 +357,13 @@ class Printer {
|
||||
expr(e);
|
||||
case ETry(e, v, t, ecatch):
|
||||
add("try");
|
||||
block(e);
|
||||
add(" catch( " + v);
|
||||
var wasBlock = block(e);
|
||||
if( !wasBlock ) {
|
||||
add("\n" + tabs);
|
||||
} else add(" ");
|
||||
add("catch( " + v);
|
||||
addType(t);
|
||||
add(")");
|
||||
add(" )");
|
||||
block(ecatch);
|
||||
case EObject(fl):
|
||||
if( fl.length == 0 ) {
|
||||
|
||||
@@ -58,6 +58,8 @@ class StringCase extends TestCase {
|
||||
assertEq("s.charCodeAt(7)", s.charCodeAt(7));
|
||||
assertEq("s.charCodeAt(-1)", s.charCodeAt(-1));
|
||||
|
||||
headerCode = '';
|
||||
|
||||
Util.runKnownBug("string.code doesnt work", () -> {
|
||||
assertEq('"f".code', "f".code);
|
||||
assertEq('"o".code', "o".code);
|
||||
|
||||
Reference in New Issue
Block a user