Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scope management issue when deep-inferring callee. #944

Merged
merged 2 commits into from
May 16, 2024

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented May 15, 2024

  • 📍 Fix scope management issue when deep-inferring callee.
    Fixes typecheck permitting variables not in (hygenic) scope  #941.

    However, this currently breaks the stdlib somehow with some FreeUnique on the shrinker step of the optimizer.

  • 📍 Also preserve warnings when resetting scope for backtracking.
    This is crucial as some checks regarding variable usages depends on
    warnings; so we may accidentally remove variables from the AST as a
    consequence of backtracking for deep inferrence.

  Fixes #941.

  However, this currently breaks the stdlib somehow with some FreeUnique on the shrinker step of the optimizer.
@KtorZ KtorZ force-pushed the fix/scope-when-backtracking branch from de07396 to eadf709 Compare May 15, 2024 11:18
  This is crucial as some checks regarding variable usages depends on
  warnings; so we may accidentally remove variables from the AST as a
  consequence of backtracking for deep inferrence.
@KtorZ KtorZ merged commit 27b3536 into main May 16, 2024
7 of 8 checks passed
@KtorZ KtorZ deleted the fix/scope-when-backtracking branch May 16, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚀 Released
Development

Successfully merging this pull request may close these issues.

typecheck permitting variables not in (hygenic) scope
1 participant