Skip to content

Fix IDIC casts throwing exceptions for is operator checks#1676

Merged
manodasanW merged 1 commit intostaging/AOTfrom
manodasanw/idicexception
Jul 22, 2024
Merged

Fix IDIC casts throwing exceptions for is operator checks#1676
manodasanW merged 1 commit intostaging/AOTfrom
manodasanw/idicexception

Conversation

@manodasanW
Copy link
Member

Fix is operator checks such as in AddRange throwing exceptions when IDIC indicates it doesn't support that interface. We will still throw if an explicit cast is done. In this scenario IDIC was getting triggered as we had a IReadOnlyList and were trying to check if it implements ICollection which it actually doesn't as it implements IReadOnlyCollection. So, in that scenario, we should indeed return false rather than throw an exception for the AOT check.

Fixes #1671

@manodasanW manodasanW requested a review from Sergio0694 July 22, 2024 03:14
@manodasanW manodasanW merged commit fa224c3 into staging/AOT Jul 22, 2024
@manodasanW manodasanW deleted the manodasanw/idicexception branch July 22, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants