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

Warn against deeply nested let exprs (WIP) #5588

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

robin-aws
Copy link
Member

Description

Attempts to warn against potentially hitting #3868.

Replaces the omnipresent inLetExprBody boolean with a letExprNesting int, so we can track how many levels deep we're nesting let expressions when compiling, and warn when crossing a somewhat arbitrary threshold.

TODO:

  • Figure out a way to easily suppress the warning if it's not actually an issue
  • Decide whether to expose an option to control the threshold
  • Flesh out the error message (relatively tricky to describe well)
  • Explict test case - probably add to git-issue-3868.dfy

How has this been tested?

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

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.

1 participant