Commit Graph

1 Commits

Author SHA1 Message Date
Boshen e431a0eb52 fix(parser): break extends clause loop on fatal error (#22517)
## Summary

`parse_extends_clause` kept iterating after `parse_lhs_expression_or_higher` set a fatal error, producing a `TSInterfaceHeritage` with an inverted span (`start > end`). `parse_class` then passed that span to `classes_can_only_extend_single_class`, which panicked in `miette` when converting the span to a label (`debug_assert!(self.start <= self.end)` in `Span::size`). Release builds silently produced garbage diagnostics.

Repro from the issue:

```js
class extends,{
```

Closes #22515

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-18 05:50:19 +00:00