Skip to content

foreach will jump to other code in dotnet9 #109812

@Coloryr

Description

@Coloryr

Description

When I upgrade the project to Dotnet9 and foreach the list, I will jump to other code by myself after the list is not fully foreach.
dotnet8
https://github.com/user-attachments/assets/5bd3c4cb-2c7f-4b53-ae2f-adc318f6ee80

dotnet9
https://github.com/user-attachments/assets/9ddfc90d-0000-4bc7-a177-d962416d2d83

Reproduction Steps

  1. make a List
  2. add some thing
  3. foreach it

Expected behavior

foreach every item

Actual behavior

foreach some item and exit all code

Regression?

dotnet9

Known Workarounds

No response

Configuration

windows x64

Other information

No response

Metadata

Metadata

Assignees

Labels

area-Diagnostics-coreclrin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions