Skip to content

Add type restriction to String#byte_index offset parameter#14981

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota:fix/string.byte_index-offset
Sep 10, 2024
Merged

Add type restriction to String#byte_index offset parameter#14981
straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota:fix/string.byte_index-offset

Conversation

@straight-shoota
Copy link
Member

The return type is Int32?, so offset must be Int32 as well.

Closes #14938

The return type is `Int32?`, so `offset` must be `Int32` as well.
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:text labels Sep 6, 2024
@straight-shoota straight-shoota self-assigned this Sep 6, 2024
@straight-shoota straight-shoota added this to the 1.14.0 milestone Sep 6, 2024
@straight-shoota straight-shoota merged commit ce76bf5 into crystal-lang:master Sep 10, 2024
@straight-shoota straight-shoota deleted the fix/string.byte_index-offset branch September 10, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants