Skip to content
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

Numbered parameters are valid for pattern matching pinning #1060

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Earlopain
Copy link
Contributor

The following is how different versions behave:

# Valid only in 2.7
case 0; in _1; end
1.then { 1 in _1 }

# Valid in no versions
case 0; in ^_1; end

# Valid in all versions
1.then { 1 in ^_1 }

@builder.accessible makes the numparam visible to the environment, so it must be called first

The following is how different versions behave:
```
# Valid only in 2.7
case 0; in _1; end
1.then { 1 in _1 }

# Valid in no versions
case 0; in ^_1; end

# Valid an all versions
1.then { 1 in ^_1 }
```

`@builder.accessible` makes the numparam visible to the environment,
so it must be called first
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.

1 participant