-
Notifications
You must be signed in to change notification settings - Fork 121
Add vtable entry for covariant IEnumerable<object> for WinRT types too. #601
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
Conversation
|
I realized there were other covariance scenarios still broken, made an attempt at solving them all. |
| || type.GetCustomAttribute<WindowsRuntimeTypeAttribute>() is object; | ||
| } | ||
|
|
||
| // Use TryGetCompatibleWindowsRuntimeTypesForVariantType instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the comment a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the issue is this API was marked public even though we only used it internally. Since we don't expect anyone else to use it or for it to be used in cross module scenarios, we can accept the breaking change and remove the old version of the API. But before I did that, I wanted to make sure there weren't concerns with that, so I instead put a comment.
Adding a more complete covariant support. For covariant interfaces, we get all the possible types that can be passed for the generic and create a vtable entry for them. Along with that, if the generic is itself a covariant interface, we do the same for it.
For now, I haven't removed the previous version of this function as it was a public function.
Fixes #592
Fixes #598