Skip to content

markused: fix for gated index range on string#24200

Merged
spytheman merged 1 commit into
vlang:masterfrom
felipensp:fix_markused_gated_index
Apr 13, 2025
Merged

markused: fix for gated index range on string#24200
spytheman merged 1 commit into
vlang:masterfrom
felipensp:fix_markused_gated_index

Conversation

@felipensp

Copy link
Copy Markdown
Member

Fix #24187

Comment thread vlib/v/checker/checker.v
}
}
.string {
if node.is_gated && c.mod != 'strings' {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why make an exception for the strings module?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still do not see the reason for making it a special case, but it does solve the issue, and I do not see it as a big problem (just a bit slower), if it behaves a bit differently for strings.

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, only a test is missing.

@spytheman spytheman merged commit 8a39132 into vlang:master Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_trimmed_lines() results in C error

2 participants