Skip to content

Calling a function returned by another function directly causes wrong evaluation environment #211

@sebffischer

Description

@sebffischer
> f = fn() {
:   a = 1
:   fn() print(a)
: }
function() {
  a <- 1
  function() print(a)
}
<environment 0x6000029303d8>
> f()()
Error: object 'a' not found
backtrace:
1: f()() => None
2: print(a) => None
3: a => None
> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions