-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reactivity Transform should respect const
keyword
#6992
Comments
I can't believe people didn't see this as a problem thank goodness. Programming mechanics are important. |
|
It's legal in transformed code, but illegal in the source code at the JavaScript syntax level. |
I think there is no solution,unless use |
This may be a break change. @sxzz |
If 👇 is not allowed then there will be a lot of compatibility issues for projects prior to version < 3.2.41.This can cause problems for many users. // should emit an error here, since msg is a constant variable. |
@sxzz I think the developer should understand that this is a compiler macros. 👉RFC. |
As RFC mentioned
|
Answered my doubts. 🫡 |
Vue version
3.2.41
Link to minimal reproduction
https://sfc.vuejs.org/#eNp9kE1qw0AMha+iDgW3EHuabXAC3fUG3cxmYivxhPlDGqcL47tXtkspLXSn9/T0IWlSrzk39xHVQbXckcsFGMuYTya6kBMVmIDwAjNcKAWoJFqZaGKXIhcIfIUjPErgqXpD7xO8J/L9Q/W8ZLQGHtLoe8DgCtgISJQIBiTcAbvY4UpwDBZWoI0F7pacPXtsTNzwRu1fjDKx1duCspqIgiF7W1AUQDvsT9O0wua51aJW18U8CrAOqUd/NEr6Rkmr1d/Taqe2O+tgc3PjFOUT0zJtvhps1AFWZ/Hk/kUbNZSS+aA1X7rlfzduEl21VA2NsbiADXKoz5Q+GEnARu1+MLSYd6SaMPbyDfqP+Sv6h7tgZxNnNX8CV7ifXg==
Steps to reproduce
Open the reproduction
What is expected?
Throw an error about
const
keyword.What is actually happening?
No errors.
System Info
No response
Any additional comments?
Relate issue #6989
WIP: I'll make a PR later.
The text was updated successfully, but these errors were encountered: