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

Fix type narrowing on assignment #622

Merged
merged 1 commit into from
Jul 30, 2022
Merged

Fix type narrowing on assignment #622

merged 1 commit into from
Jul 30, 2022

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Jul 28, 2022

Type narrowing on assignment is not working. 🤕

if x = array.sample
  x + 1     # Type error is reported unless `#sample` is _pure_ method call
end

@soutaro soutaro merged commit caf3d3c into aaa-1.1.x Jul 30, 2022
@soutaro soutaro deleted the narrowing-assignment branch July 30, 2022 11:56
@soutaro soutaro added this to the Steep 1.1.x milestone Jul 31, 2022
soutaro added a commit that referenced this pull request Jul 31, 2022
@soutaro soutaro mentioned this pull request Jul 31, 2022
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