bun
bun copied to clipboard
Edge case: "Can't find variable: fileName"
Version
0.2.0
Platform
Darwin redacted.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
What steps will reproduce the bug?
This is a weird one:
- define a variable
fileName - use the variable
const fileName = 'myValue'
console.log(fileName)
How often does it reproduce? Is there a required condition?
This will only throw if the variable name is exactly "fileName". "filename" will work, and variable names containing "fileName" + other characters also will not throw.
What is the expected behavior?
The code above does not throw.
What do you see instead?
Additional information
No response
very strange! thanks for reporting
If the variable name JSX and jsx have the same issue.
This was fixed, tested as of Bun v1.0.7.