JSON export fails, despite lack of visible errors, manual compilation succeeds
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Description
Encountered while verifying https://github.com/inkle/ink/issues/344 against Unity.
The code from that issue, reproduced below, works in the preview pane, and has no errors or warnings, but JSON export fails with the following message:
`Could not export: Ink has errors - please fix them before exporting.`
Manually invoking inklecate produced a JSON file with behavior identical to the preview pane.
Code:
```
~ temp val = 1
~ temp val2 = 5
initial values: {val}, {val2}
-> deref(-> load_1, val, val2) ->
final values: {val}, {val2}
VAR MY_VALUE_1 = 10
=== load_1(ref val, msg) ===
pre set {msg}: {val}
~ val = MY_VALUE_1
post set {msg}: {val}
->->
=== deref(-> func1, ref out, ref out2) ===
~ temp my_value_1 = 2
-> func1(out, "parameter") -> func1(my_value_1, "temp") ->
post-divert parameter: {out}
post-divert temp: {my_value_1}
constant divert:
-> load_1(out2, "constant") ->
->->
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.