Skip to content

Function scope lifting and nested functions #150

@counc009

Description

@counc009

In our implementation of function scope lifting (see #149), we currently inject definitions into the second outermost scope of the environment. In general, this is correct, but when we have nested functions this is incorrect, as the declarations will be lifted to the outermost scope of the nested function, but will be placed into the environment of the outermost scope of the outer function.
Currently, I don't believe there to be a solution to this, it would likely require modifying how environments are designed in a manner that would allow us to identify what scope is the inner-most function scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions