Replies: 1 comment 1 reply
-
You are seeing contravariance issues. With a method you are only allowed to substitute argument types with a more general argument type, more specific argument types violate the contravariance requirement. You may be able to get around this by switching to You may be able to help the type checker a bit by using another Nested protocols usually fall apart because of variance requirements, which will force you to use the protocol types in the implementation as well, rather than the implementation types, so you can't assume anything that isn't part of the protocol, such as your |
Beta Was this translation helpful? Give feedback.
-
With the current typing implementation, how far can we make this work as expected?
Is there any innate problem in this approach?
This results error like this .
Beta Was this translation helpful? Give feedback.
All reactions