Commit 093a1e0
Fix panic by checking for binding patterns before calling Text()
The correct fix is to check if a parameter name is a binding pattern before
calling Text() on it, rather than making Text() handle binding patterns.
This follows the TypeScript reference implementation which checks
!isBindingPattern(param.name) before accessing the name's text.
Reverted the previous change to ast.go and fixed the caller in checker.go instead.
Co-authored-by: jakebailey <[email protected]>1 parent e16624b commit 093a1e0
2 files changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | 337 | | |
342 | 338 | | |
343 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30398 | 30398 | | |
30399 | 30399 | | |
30400 | 30400 | | |
30401 | | - | |
| 30401 | + | |
| 30402 | + | |
30402 | 30403 | | |
30403 | 30404 | | |
30404 | 30405 | | |
| |||
0 commit comments