Closed fmoo closed 11 months ago
I think declare
should help:
title: Bug3
---
<<declare $akos_talkers = 0 as int>>
<<set $akos_talkers = $akos_talkers + 1>>
===
There are two parts to this bug, the first is that the type inference isn't working correctly. This is fixed in the WIP line groups branch which has a much more rigorous type system. The second is it crashes the import at Unity, this is fixed in https://github.com/YarnSpinnerTool/YarnSpinner-Unity/commit/6d5054b993f9b77cf034885e60fd04eebc6d3225
Closing this now, thanks for finding it.
What is the current behavior?
When implicitly defining a variable through its usage a certain way, the .yarnproject will fail to import and cause various runtime errors. The compile itself fails with a generic error that could also be improved.
Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Create a .yarn file with the following contents:
What is the expected behavior?
$akos_talkers should be detected as an integer, and the .yarnproject compiles
Please tell us about your environment:
Other information