Skip to content

Fix return type restriction for ENV.fetch#14919

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
straight-shoota:bug/env-fetch-type-restriction
Aug 21, 2024
Merged

Fix return type restriction for ENV.fetch#14919
straight-shoota merged 2 commits intocrystal-lang:masterfrom
straight-shoota:bug/env-fetch-type-restriction

Conversation

@straight-shoota
Copy link
Member

This return type restriction was too restrictive. Env.fetch("x", y) can return the type of y whatever it is. This is now identical to the return type restriction of the yielding overload.

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:system labels Aug 19, 2024
@straight-shoota straight-shoota self-assigned this Aug 19, 2024
@straight-shoota straight-shoota changed the title Fix return type restriction for Env.fetch Fix return type restriction for ENV.fetch Aug 19, 2024
@straight-shoota straight-shoota added this to the 1.14.0 milestone Aug 20, 2024
@straight-shoota straight-shoota merged commit f402215 into crystal-lang:master Aug 21, 2024
@straight-shoota straight-shoota deleted the bug/env-fetch-type-restriction branch August 21, 2024 15:08
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:system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants