Skip to content

Convert non-generic enumerator Current values - #2757

Merged
DavidObando merged 1 commit into
mainfrom
fix/2752-foreach-current-cast
Jul 22, 2026
Merged

Convert non-generic enumerator Current values#2757
DavidObando merged 1 commit into
mainfrom
fix/2752-foreach-current-cast

Conversation

@DavidObando

Copy link
Copy Markdown
Owner

Fixes #2752

Routes IEnumerator.Current values through the existing bound conversion emitter before assigning them to inferred foreach element locals. This emits the required castclass/unbox.any while leaving typed generic enumerators unchanged.

Adds runtime and ILVerify coverage for the Regex.MatchCollection cycle-13 failure shape.

Fixes #2752

Copilot-Session: d27ee0ef-46db-423b-93dc-db64f8eae1ff
@DavidObando
DavidObando merged commit 077bddc into main Jul 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gsc: foreach over non-generic IEnumerator omits Current downcast

1 participant