Skip to content

Commit a9cf43d

Browse files
committed
use instance wrapper
1 parent 31b5464 commit a9cf43d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/javaTranspiler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,9 +1116,11 @@ export class JavaTranspiler extends BaseTranspiler {
11161116
}
11171117

11181118
printInstanceOfExpression(node, identation) {
1119-
const left = node.left.escapedText;
1119+
// const left = node.left.escapedText;
11201120
const right = node.right.escapedText;
1121-
return this.getIden(identation) + `${left} instanceof ${right}`;
1121+
const left = this.printNode(node.left, 0);
1122+
// const right = this.printNode(node.right, 0);
1123+
return this.getIden(identation) + `Helpers.isInstance(${left}, ${right}.class)`;
11221124
}
11231125

11241126
printAwaitExpression(node, identation) {

0 commit comments

Comments
 (0)