Skip to content

Fix projected covariance interfaces#1902

Merged
manodasanW merged 8 commits intomasterfrom
manodasanw/fixienumvtable
Jan 24, 2025
Merged

Fix projected covariance interfaces#1902
manodasanW merged 8 commits intomasterfrom
manodasanw/fixienumvtable

Conversation

@manodasanW
Copy link
Member

  • In the AOT optimizer, for collection types with value types as the generic instantiation, we were projecting a covariant interface on the vtable for IEnumerable when it isn't a covariant interface. This addresses that by fixing the check for it.
  • Added tests to validate scenarios where the interface should be projected and shouldn't.
  • During testing, it was discovered for collections of interfaces, we were not projecting object as a covariance given BaseType returns null for interfaces. This is addressed by an interface check that was added.
@manodasanW manodasanW requested a review from Sergio0694 January 22, 2025 10:01
@manodasanW manodasanW merged commit b9042e7 into master Jan 24, 2025
10 checks passed
@manodasanW manodasanW deleted the manodasanw/fixienumvtable branch January 24, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants