Skip to content

Conversation

@lambdageek
Copy link
Member

When we have to resort to checking element by element, compare the type of each actual element with the destination type. In particular, not the destinations underlying type when it's an enum - we don't want to allow unrelated enums using the same representation to copy over.

Fixes #64387

where each element in the source array is the appropriate type
When we have to resort to checking element by element, compare the type of each
actual element with the destination type. In particular, not the destinations
underlying type when it's an enum - we don't want to allow unrelated enums
using the same representation to copy over.

Fixes dotnet#64387
@ghost ghost added the area-CoreLib-mono label Jan 28, 2022
@ghost ghost assigned lambdageek Jan 28, 2022
@lambdageek
Copy link
Member Author

/cc @lewing

Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lambdageek
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1764177051

@lambdageek lambdageek merged commit bc6d349 into dotnet:main Jan 30, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 2, 2022
@lambdageek lambdageek deleted the fix-gh-64387 branch March 19, 2022 16:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArrayList.ToArray(type) throws exception for enum type in Blazor WebAssembly

2 participants