apple / apple/pkl

StackOverflow error when computing hash code of circular objects

Open
#979 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

This code will stack overflow:

```pkl
local myself {
res = myself
}

foo: Mapping = new {
[myself] = 1
}
```

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Pkl snippet and tracing the object hash-code computation for the self-referential `myself` object. Determine the intended behavior for circular objects and verify that computing the mapping key no longer causes a stack overflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.