8000 Wrong span end for `using foo = null;` · Issue #9620 · oxc-project/oxc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Wrong span end for using foo = null; #9620

New issue
Closed
ArnaudBarre opened this issue Mar 9, 2025 · 0 comments · Fixed by #9622
Closed

Wrong span end for using foo = null; #9620

ArnaudBarre opened this issue Mar 9, 2025 · 0 comments · Fixed by #9622
Assignees
Labels
C-bug Category - Bug

Comments

@ArnaudBarre
Copy link
Contributor

See the difference with const: https://playground.oxc.rs/#eNpFTztuwzAMvYrB2YMToIuLbkUv0LULrVCGAJo0SKlJEPjukZM4nvh7fJ8bBOiheJKxiaqH5quRwvz5J0HFcxO77rjvoAWF/gZWZC1+lYwX6LMVaoGTZOgjstfBg860Xfw6DcrblA3Fo9r0Ai8tzGhOVilrv9Js/Rv6WEBGG6lqAPmxO3xUN8mVMdPpmwKjYU7V9E4b9EQjPayS4MD0q8UCTTjvmClJimkTrKGzKf+wntevf7JBveZ4opflDl4qahk=

See in Babel: https://ast-explorer.dev/#eNpFizEOwjAMRa8See5QGIs4AgtiIwxpcKMg146aBIGq3h1HHdie339egWCAl3u77JeYCnSQVIxuRFL2yjVHDmYSOZiz4Up0suyFczFT3x//TnPRfLVsjIUsdfF4+ya0MOg9y7OScrfPiWqInNt2b6Y5/CSKPpYr7s8Xxy7gjFwstOZheYPtB7sjOeg=

Looking at the code, self.asi()?; should be done inside parse_using_declaration instead of parse_using, but it's not clear for me whether if should be inside a if matches!(decl_parent, VariableDeclarationParent::Statement) like in parse_variable_declaration

@ArnaudBarre ArnaudBarre added the C-bug Category - Bug label Mar 9, 2025
@Boshen Boshen self-assigned this Mar 9, 2025
@ArnaudBarre ArnaudBarre changed the title Span.end is wrong for using foo = null; Wrong span end for using foo = null; Mar 9, 2025
Boshen added a commit that referenced this issue Mar 9, 2025
@Boshen Boshen closed this as completed Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0