ink icon indicating copy to clipboard operation
ink copied to clipboard

Can't correctly divert to a stitch using a parameter

Open elliotherriman opened this issue 3 years ago • 1 comments

This one's a little hard to explain, but the sample code should illustrate the issue.

<- goToStitch(-> knot)

=== goToStitch(-> divert)
<- knot.stitch2
<- divert.stitch2

=== knot

= stitch1
1!

= stitch2
2!

Expected output:

2!
2!

Actual output:

2!
1!

I believe this is caused by Ink diverting to the knot, and falling through to the first stitch, ignoring the request to jump to a stitch. If you add text before the first stitch, Ink will display this instead.

elliotherriman avatar Aug 06 '21 03:08 elliotherriman

<- divert.stitch2 should generate a compiler error.

joningold avatar Aug 06 '21 03:08 joningold