Skip to content

Conversation

AlekseyTs
Copy link
Contributor

@AlekseyTs AlekseyTs commented Sep 4, 2025

Do not perform the check for scenarios when foreach is emitted as a for, i.e. the interface isn't used even when collection implements it.

Fixes #80041.

Do not perform the check for scenarios when ``forech` is emitted as a `for`, i..e. the interface isn't used even when collection implements it.

Fixes dotnet#80041.
@AlekseyTs AlekseyTs requested a review from a team as a code owner September 4, 2025 21:26
@AlekseyTs AlekseyTs added Area-Compilers Feature - RefStructInterfaces `allows ref struct` (ref struct interfaces) labels Sep 4, 2025
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (commit 2)

@jcouv jcouv self-assigned this Sep 5, 2025
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler Please review

@AlekseyTs AlekseyTs merged commit a9e6e71 into dotnet:main Sep 5, 2025
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - RefStructInterfaces `allows ref struct` (ref struct interfaces)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

foreach with ReadOnlySpan<char> no longer compiles when targeting .NET 10 with LangVersion=11
3 participants