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

Avoid UnexpectedError when assigning untyped singleton class #586

Merged
merged 2 commits into from
Jun 22, 2022
Merged

Avoid UnexpectedError when assigning untyped singleton class #586

merged 2 commits into from
Jun 22, 2022

Conversation

kachick
Copy link
Contributor

@kachick kachick commented Jun 18, 2022

Currently assigning untyped singleton class making UnexpectedError and UnsupportedSyntax.

UnexpectedError: undefined method `constr' for nil:NilClass

              constr = rhs_result.constr.update_lvar_env do |lvar_env|
                                 ^^^^^^^(Ruby::UnexpectedError)
sclass receiver must be instance type or singleton type, but type given `untyped`(Ruby::UnsupportedSyntax)

I personally want correct signature from the assigning sclass, however it looks intentionally ommited in #211.
So this PR just suppress the UnexpectedError and keep UnsupportedSyntax.

Copy link
Owner

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

💦 🙏

@soutaro soutaro merged commit 9f841e4 into soutaro:master Jun 22, 2022
@kachick
Copy link
Contributor Author

kachick commented Jun 22, 2022

Thank you for merging! 🙏

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.

2 participants