Skip to content

missing variable error in abstract closures should suggest adding the variable to the captures list, if applicable #649

@bakkot

Description

@bakkot

e.g.

1. Let _foo_ be 0.
1. Let _AC_ be a new Abstract Closure with no parameters that captures nothing and performs the following steps when called:
  1. Return _foo_.

This is an error because the AC uses but doesn't capture _foo_, but the error is just "could not find a preceding declaration for _foo_". If the thing being used exists outside the AC the error should suggest adding it to the captures list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions