diff options
Diffstat (limited to 'src/js_parser')
-rw-r--r-- | src/js_parser/js_parser.zig | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/js_parser/js_parser.zig b/src/js_parser/js_parser.zig index 9801e7e32..8b9649aa2 100644 --- a/src/js_parser/js_parser.zig +++ b/src/js_parser/js_parser.zig @@ -10315,11 +10315,14 @@ pub fn NewParser( e_.must_keep_due_to_with_stmt = result.is_inside_with_scope; e_.ref = result.ref; + // TODO: fix the underyling cause here + // The problem seems to be that result.ref.inner_index is not always set. + // Handle assigning to a constant - if (in.assign_target != .none and p.symbols.items[result.ref.inner_index].kind == .cconst) { - const r = js_lexer.rangeOfIdentifier(p.source, expr.loc); - p.log.addRangeErrorFmt(p.source, r, p.allocator, "Cannot assign to {s} because it is a constant", .{name}) catch unreachable; - } + // if (in.assign_target != .none and p.symbols.items[result.ref.inner_index].kind == .cconst) { + // const r = js_lexer.rangeOfIdentifier(p.source, expr.loc); + // p.log.addRangeErrorFmt(p.source, r, p.allocator, "Cannot assign to {s} because it is a constant", .{name}) catch unreachable; + // } var original_name: ?string = null; |