Skip to content

fix(compiler): preserve global initializer locals - #485

Merged
akonwi merged 1 commit into
mainfrom
fix/global-initializer-locals
Sep 7, 2026
Merged

fix(compiler): preserve global initializer locals#485
akonwi merged 1 commit into
mainfrom
fix/global-initializer-locals

Conversation

@akonwi

@akonwi akonwi commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • represent each AIR global initializer as an executable region that owns its local table and expression
  • validate and lower initializer locals, captures, references, names, and imports in an isolated per-global context
  • preserve dependency-aware Go package-variable IIFEs and explicit lexical block scopes
  • preserve contextual Result/Maybe types for block-valued globals
  • reconcile ADR 0021 and ADR 0031 with current initializer and cycle-diagnostic behavior

Validation

  • go test ./... -count=1
  • go test -race ./air ./go -count=1
  • go vet ./...
  • gopls check on changed Go files
  • LSP harness: 18/18
  • downstreams: Tinear, Decode, SQL, Cooper

Follow-up

Fixes #482

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ard-lang-dev Ready Ready Preview Sep 7, 2026 7:05pm UTC

@akonwi
akonwi merged commit 9a6980d into main Sep 7, 2026
6 checks passed
@akonwi
akonwi deleted the fix/global-initializer-locals branch September 7, 2026 19:09
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.

Global block initializers with local bindings fail AIR validation

1 participant