Skip to content

Commit b70ad3c

Browse files
committed
fix(compiler): proper handling of typeof, void in RecursiveAstVisitor (#60101)
Handle typeof and void expressions the same way as other unary operator expressions. PR Close #60101
1 parent 7c9b489 commit b70ad3c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/compiler/src/output/output_ast.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,12 +1687,6 @@ export class RecursiveAstVisitor implements StatementVisitor, ExpressionVisitor
16871687
visitWrappedNodeExpr(ast: WrappedNodeExpr<any>, context: any): any {
16881688
return ast;
16891689
}
1690-
visitTypeofExpr(ast: TypeofExpr, context: any): any {
1691-
return this.visitExpression(ast, context);
1692-
}
1693-
visitVoidExpr(ast: VoidExpr, context: any) {
1694-
return this.visitExpression(ast, context);
1695-
}
16961690
visitReadVarExpr(ast: ReadVarExpr, context: any): any {
16971691
return this.visitExpression(ast, context);
16981692
}
@@ -1770,6 +1764,14 @@ export class RecursiveAstVisitor implements StatementVisitor, ExpressionVisitor
17701764
ast.expr.visitExpression(this, context);
17711765
return this.visitExpression(ast, context);
17721766
}
1767+
visitTypeofExpr(ast: TypeofExpr, context: any): any {
1768+
ast.expr.visitExpression(this, context);
1769+
return this.visitExpression(ast, context);
1770+
}
1771+
visitVoidExpr(ast: VoidExpr, context: any) {
1772+
ast.expr.visitExpression(this, context);
1773+
return this.visitExpression(ast, context);
1774+
}
17731775
visitBinaryOperatorExpr(ast: BinaryOperatorExpr, context: any): any {
17741776
ast.lhs.visitExpression(this, context);
17751777
ast.rhs.visitExpression(this, context);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy