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

Refactor getter/property macros to work properly with Bool types #7313

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

Sija
Copy link
Contributor

@Sija Sija commented Jan 14, 2019

Fixes #7312

src/object.cr Outdated Show resolved Hide resolved
spec/std/object_spec.cr Outdated Show resolved Hide resolved
@Sija Sija force-pushed the fix-7312 branch 2 times, most recently from ff60f3a to 792abc3 Compare January 14, 2019 00:36
Copy link
Contributor

@bew bew left a comment

Choose a reason for hiding this comment

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

You could simply use a fresh variable like %value for the local variable

@Sija
Copy link
Contributor Author

Sija commented Jan 14, 2019

@bew I thought about it but since there's no danger of name collision or anything like that would be just wasteful.

@bew
Copy link
Contributor

bew commented Jan 14, 2019

then why not use value instead of _\{{name.var.id}} ?

@Sija
Copy link
Contributor Author

Sija commented Jan 14, 2019

value it is then.

@Sija
Copy link
Contributor Author

Sija commented Jan 15, 2019

Ready for review 🙏

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

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

Thank you @Sija 👍

@RX14 RX14 added this to the 0.27.1 milestone Jan 16, 2019
@RX14 RX14 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:macros labels Jan 16, 2019
@RX14 RX14 merged commit 2ca157c into crystal-lang:master Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:macros
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants