dgkf / dgkf/R

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

Open
#211 2 comments 0 reactions 0 assignees View on GitHub
type-bug
Dominant language
Rust
Stars
145
Forks
5
PR merge metrics
No merged PRs in 30d

Description

```r
> f = fn() {
: a = 1
: fn() print(a)
: }
function() {
a <- 1
function() print(a)
}

> f()()
Error: object 'a' not found
backtrace:
1: f()() => None
2: print(a) => None
3: a => None
>
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by running the provided f()() reproduction and trace how a function returned by another function receives its evaluation environment. Done means the nested print(a) resolves a without the object-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.