Skip to content

Conversation

@manodasanW
Copy link
Member

@manodasanW manodasanW commented Nov 20, 2020

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

@manodasanW
Copy link
Member Author

manodasanW commented Nov 23, 2020

I realized there were other covariance scenarios still broken, made an attempt at solving them all.

|| type.GetCustomAttribute<WindowsRuntimeTypeAttribute>() is object;
}

// Use TryGetCompatibleWindowsRuntimeTypesForVariantType instead.
Copy link
Member

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?

Copy link
Member Author

@manodasanW manodasanW Nov 23, 2020

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.

@manodasanW manodasanW merged commit d9f1d21 into master Nov 24, 2020
@manodasanW manodasanW deleted the manodasanw/ienumstring branch November 24, 2020 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

passing array of derived type to IIterable parameter results in System.InvalidCastException System.InvalidCastException on CollectionView enumeration

4 participants