You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing typestates, the compiler creates a hidden variable called _contract_state. This then means that if the writer of a flint program tries to create a variable of the same name in the same scope, there will be an error that they are unable to explain. This issue is not specific to typestates - any local variable created for any reason potentially throws up this naming conflict.
To fix this, variable mangling, whereby variable names are somehow transformed if there is a conflict, should be implemented in both targets. This was previously implemented in move, but it was inconsistent and difficult to work with, so it has been unimplemented to make way for a new mangling design.
The text was updated successfully, but these errors were encountered:
When implementing typestates, the compiler creates a hidden variable called
_contract_state
. This then means that if the writer of a flint program tries to create a variable of the same name in the same scope, there will be an error that they are unable to explain. This issue is not specific to typestates - any local variable created for any reason potentially throws up this naming conflict.To fix this, variable mangling, whereby variable names are somehow transformed if there is a conflict, should be implemented in both targets. This was previously implemented in move, but it was inconsistent and difficult to work with, so it has been unimplemented to make way for a new mangling design.
The text was updated successfully, but these errors were encountered: