-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
parser: allow use a b it as var name when using array builtin methods
#25755
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
Merged
spytheman
merged 3 commits into
vlang:master
from
kbkpbot:fix-parser-skip-sort-arg-check
Nov 17, 2025
Merged
parser: allow use a b it as var name when using array builtin methods
#25755
spytheman
merged 3 commits into
vlang:master
from
kbkpbot:fix-parser-skip-sort-arg-check
Nov 17, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
I think that the parser should do very little amount of checks of this kind (semantic ones). Ideally, it should be only concerned with syntax errors. |
spytheman
reviewed
Nov 17, 2025
spytheman
reviewed
Nov 17, 2025
Contributor
Author
|
It become slower: |
a b it as var name when using array builtin methods
spytheman
approved these changes
Nov 17, 2025
Member
spytheman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work.
#25759 should make checking for these method names a bit faster, but its tests are still running.
spytheman
added a commit
to davlgd/v
that referenced
this pull request
Nov 18, 2025
* master: cgen: fix dump(ptr_to_fixed_array_value) - it now returns the argument directly (thanks @tankf33der) (vlang#25764) type_resolver: clear option flag if present in comptime $for (fix vlang#25761) (vlang#25763) db.sqlite: update windows version to https://sqlite.org/2025/sqlite-amalgamation-3510000.zip (vlang#25766) builder,pref: add `-file-list` support (implement feature vlang#25707) (vlang#25749) transformer: transform ArrayInit into a function call for C and native backends (part 1) doc: cleanup grammar issues in doc/docs.md parser: allow using `a`, `b` and `it` as var names, when using the builtin array methods (fix vlang#25729) (vlang#25755) v.builder: improve diagnostic information for a failed build_thirdparty_obj_file veb: fix gzip middleware decode/encode (fix vlang#20865) (fix vlang#25753) (vlang#25754) strconv: fix handling of subnormal numbers like `'1.23e-308'.f64()` (fix vlang#25751) (vlang#25752) crypto.blake2b,crypto.blake2s: add `@[direct_array_access]` to hot functions (vlang#25750)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue #25729
I think further check, for example, left expr is an array/fixed array, should be done in
checkerand not inparser.