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

Reading channel and indexing map can give nil refs. #3

Closed
tcard opened this issue Dec 11, 2015 · 1 comment
Closed

Reading channel and indexing map can give nil refs. #3

tcard opened this issue Dec 11, 2015 · 1 comment
Labels
Milestone

Comments

@tcard
Copy link
Owner

tcard commented Dec 11, 2015

When reading from a closed channel or looking up a non-present key in a map, the zero value for the expected type is returned instead. Reference types aren't supposed to have a zero value, but right now it's i.

Related #1, maybe this should be fixed in a similar way by forbidding ref types in dangerous cases, maybe this should just be ignored, as it would conflict with the v, ok := idiom.

@tcard tcard added the bug label Feb 27, 2016
@tcard tcard added this to the v0.1.0 milestone Feb 27, 2016
@tcard
Copy link
Owner Author

tcard commented Feb 29, 2016

Fixed by 0aef1cc.

@tcard tcard closed this as completed Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant