inkle / inkle/ink

Divert parameters leak into surrounding context

Open
#603 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

Minimal reproduction
```
~temp scene = 0

->Start(scene)

===Start(ref scene)
~scene++
SCENE {scene}
-> END
```
The crash occurs in every runtime I've tried so far, but there are several ways around it: rename one of the variables, or use a tunnel instead of a divert, and the variable resolves successfully.

The tracebacks I've looked at all repeat the same few calls until it overflows that stack.
I believe the specific calls indicate that "scene" is getting treated as a pointer reference to itself, rather than as a reference to the calling context.

EDIT: I found a repro of the underlying issue that shows a bug without barfing out tons of traceback.

```
~temp scene = 0

->Start("blah")

===Start(scene)
-> next

===next
SCENE1 {scene} // Prints "SCENE1 blah", unless you change the name of the parameter to Start.
->END
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.