inkle / inkle/ink

Crash when creating a gather label that is also a called function (and vice-versa)

Open
#342 0 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

Ran into this very small issue that had me confused for a while, so I thought I'd bring it up.

```
=== function gather_test(x) ===
~ return 1

=== knot_test ===
= stitch_test
- (gather_test)
{gather_test("hey")}
->END
```

This crashes the compiler and requires you to fix the problem and then restart/reload Inky to get back to normal. 😣

If you create the gather label BEFORE the function is called in the ink file, you get a nice error saying the gather name has already been used. But if you create the gather after a function has been called or call the function after the gather has been created, you get a crash.

Apologies if this is too much of an edge case but it was frustrating to debug.

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.