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

Allow private method invocation with self receiver #6075

Merged

Conversation

makenowjust
Copy link
Contributor

@makenowjust makenowjust commented May 8, 2018

Closes #5995

I was surprised there is no spec for checking this. All specs are passed even if calling private method with self receiver is allowed.

IMHO it is not so problem to allow this. This change makes private visibility rule complex, but protected is more complex than that still. And there is no reason not to allow this in statically typed programming language like Crystal.

Additionally I don't know and can't find the case breaking compatibility for this change. Perhaps it is so little.

Thank you.

@sdogruyol sdogruyol merged commit 372b8d3 into crystal-lang:master May 8, 2018
@sdogruyol sdogruyol added this to the Next milestone May 8, 2018
@makenowjust makenowjust deleted the fix/crystal/self-private branch May 8, 2018 14:22
chris-huxtable pushed a commit to chris-huxtable/crystal that referenced this pull request Jun 6, 2018
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.

None yet

3 participants