Collection expressions use AddRange
instead of manual foreach
in presence of a struct enumerator
#74615
Labels
Area-Compilers
Code Gen Quality
Room for improvement in the quality of the compiler's generated code
Feature - Collection Expressions
untriaged
Issues and PRs which have not yet been triaged by a lead
Milestone
Version Used:
Noticed while working on other PR, so latest
main
Steps to Reproduce:
Expected Behavior:
Codegen of
C.M
is a manualforeach
due to the fact, thatMyCollection
has a struct enumerator and doesn't implementICollection<T>
Actual Behavior:
Codegen of
C.M
is:sharplab
Benchmark results:
Benchmark code
The text was updated successfully, but these errors were encountered: