Skip to content

Fix lexical lifetime of using declarations - #2764

Merged
DavidObando merged 1 commit into
mainfrom
fix/2753-top-level-using
Jul 22, 2026
Merged

Fix lexical lifetime of using declarations#2764
DavidObando merged 1 commit into
mainfrom
fix/2753-top-level-using

Conversation

@DavidObando

Copy link
Copy Markdown
Owner

Summary

  • bind top-level statements and block-expression prefixes as lexical statement lists
  • keep using/defer cleanup around trailing expressions, awaits, returns, and exceptions
  • add runtime ordering and async MoveNext IL coverage for closures and nested resources

Validation

  • related using/async tests: 25 passed
  • Core.Tests: 6,691 passed, 1 skipped
  • Compiler.Tests: 3,407 passed
  • patched migrated Oahu CLI: doctor --skip-network reports all checks passed

Deferred work

  • None.

Fixes #2753

@DavidObando
DavidObando merged commit f3e9fbf 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: top-level using declaration is disposed immediately instead of at program end

1 participant