Skip to content

fix(checker): inherit generics in anonymous closures - #481

Merged
akonwi merged 1 commit into
mainfrom
fix/anonymous-closure-generic-context
Sep 7, 2026
Merged

fix(checker): inherit generics in anonymous closures#481
akonwi merged 1 commit into
mainfrom
fix/anonymous-closure-generic-context

Conversation

@akonwi

@akonwi akonwi commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve enclosing declaration generic visibility while checking anonymous closures
  • keep named-function boundaries intact and exclude call-owned/provisional inference variables from source generic resolution
  • add checker, ownership, runtime parity, receiver-only, nested, and cross-module regressions
  • document explicit generic call arguments in anonymous functions and repair the duplicated ADR 0010 tail

Validation

  • cd compiler && go test ./... -count=1
  • cd compiler && go test -race ./checker ./air ./go -count=1
  • cd compiler && go vet ./...
  • cd compiler && gopls check checker/checker.go checker/scope.go checker/closure_generic_context_test.go go/parity_test.go go/private_generic_cross_module_test.go
  • LSP harness: 18/18 passed
  • cd website && npm run build
  • git diff --check

Fixes #478

Preserve enclosing declaration generic visibility across anonymous closures while keeping named function boundaries intact. Ignore call-owned and provisional inference variables during source generic lookup, and cover checker, runtime, cross-module, and documentation behavior.

Fixes #478
@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 2:30pm UTC

@akonwi
akonwi merged commit 839f354 into main Sep 7, 2026
6 checks passed
@akonwi
akonwi deleted the fix/anonymous-closure-generic-context branch September 7, 2026 14:32
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.

Anonymous closures lose enclosing receiver generic context for explicit type arguments

1 participant