Use parent of AssigmentExpressions when bailing out
For some reason the expression itself wont print the codeframe, but its parent will, so print that instead
Lauren Tan committed
Feb 6, 2023 at 17:32 UTC
0d2653dbd44c9f355134a48584d6aac12793a981
1 file changed
+1
-1
compiler/forget/src/HIR/BuildHIR.ts
+1
-1
@@ -1084,7 +1084,7 @@ function lowerExpression(
1084
builder.errors.push({
1085
reason: `(BuildHIR::lowerExpression) Handle AssignmentExpression within a LogicalExpression or ConditionalExpression`,
1086
severity: ErrorSeverity.Todo,
1087
- nodePath: expr,
1087
+ nodePath: expr.parentPath,
1088
});
1089
return { kind: "UnsupportedNode", node: exprNode, loc: exprLoc };
1090
}