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
switch fails assert if the receiver sends nil #82
Comments
@joshaber can speak to whether this was an intentional design choice, but I'd argue that it's the correct one. A subscribable of subscribables shouldn't send |
I can see the logic behind that, and I would agree with it if it were an isolated matter, but it makes using subjects as properties a bit cumbersome. Consider
Even if whatever
instead. The problem is compounded if you use subscribables that send objects that have subscribable properties. |
👍 Those are good points. I think |
Makes sense to me 👍 PR opened. |
Looks good, thanks for the fix and fast feedback. |
If a subscribable sends nil, then switch fails it's assert:
From a cursory glance at the code there doesn't seem to be any practical reason why nil wouldn't be a valid value.
Is requiring a non-nil subscribable a design choice or just something that never came up?
The text was updated successfully, but these errors were encountered: