-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Figure out whether we are mis-using instancetype in the Darwin APIs #23384
Comments
Also see #23364 (comment) |
Quoting @ksperling-apple - first comment:
A subclass of If you play with a |
I think the issue is this: for a factory method as here, what happens? It can do one of two things. The impl could |
Okay you're right about this. Given the implementation of the factory method asks |
We should change the factory method to return |
We should not be claiming to return instancetype if we actually always return an instance of our class. Fixes project-chip#23384
We should not be claiming to return instancetype if we actually always return an instance of our class. Fixes project-chip#23384
…5169) We should not be claiming to return instancetype if we actually always return an instance of our class. Fixes project-chip/connectedhomeip#23384
…5169) We should not be claiming to return instancetype if we actually always return an instance of our class. Fixes project-chip/connectedhomeip#23384
…oject-chip#25169) We should not be claiming to return instancetype if we actually always return an instance of our class. Fixes project-chip#23384
See #23364 (comment) -- what does
instancetype
promise, exactly? When is it appropriate to use it?@jtung-apple @ksperling-apple
The text was updated successfully, but these errors were encountered: