Skip to content

Add return type restrictions to methods of container types#10582

Merged
straight-shoota merged 6 commits intocrystal-lang:masterfrom
oprypin:annot5
Jun 7, 2021
Merged

Add return type restrictions to methods of container types#10582
straight-shoota merged 6 commits intocrystal-lang:masterfrom
oprypin:annot5

Conversation

@oprypin
Copy link
Member

@oprypin oprypin commented Apr 3, 2021

No description provided.

@straight-shoota
Copy link
Member

Is there a particular reason why there's sometimes self and sometimes Array(T) etc.?

@oprypin
Copy link
Member Author

oprypin commented Apr 10, 2021

@straight-shoota "returns actually self" vs "returns another array"

@straight-shoota straight-shoota added this to the 1.1.0 milestone Jun 1, 2021
@oprypin
Copy link
Member Author

oprypin commented Jun 4, 2021

@straight-shoota "returns actually self" vs "returns another array"

On that topic... In #10243 you added type annotations that totally clash with this idea. So I replace them back.

@straight-shoota
Copy link
Member

Ooops, habits....

@straight-shoota straight-shoota merged commit 6a3f6b1 into crystal-lang:master Jun 7, 2021
straight-shoota added a commit to straight-shoota/crystal that referenced this pull request Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants