Skip to content

changed index '9' to '0' in match types / dependent typing example #2207

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
merged 2 commits into from
Oct 25, 2021

Conversation

peter-nuernberg
Copy link
Contributor

In the section "Dependent Typing" on the page "Match Types" in the Scala 3 Language Reference, the example with leafElem[X](x: X) has a line: case x: Array[t] => leafElem(x(9)) -- I think the index should be 0, not 9.

Copy link
Member

@Philippus Philippus left a comment

Choose a reason for hiding this comment

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

good catch!

@SethTisue SethTisue merged commit 669c0c7 into scala:main Oct 25, 2021
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.

3 participants