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
In the book I am translating, I encountered the following problem.
We need to upcast "Suc{x}" to "Unary(Suc{x})" in order to call the Add function: "Unary(Suc{x}).Add(y)".
Here is the declaration of the Add function: "pure func (x Unary) Add(y Unary) Unary".
This is also the case with other functions and ADTs.
The text was updated successfully, but these errors were encountered:
jcp19
changed the title
[Gobra][Chapter 7] Upcasting of ADT instance is required before calling a method
Upcasting of ADT instance is required before calling a method
Sep 21, 2023
In the book I am translating, I encountered the following problem.
We need to upcast "Suc{x}" to "Unary(Suc{x})" in order to call the Add function: "Unary(Suc{x}).Add(y)".
Here is the declaration of the Add function: "pure func (x Unary) Add(y Unary) Unary".
This is also the case with other functions and ADTs.
The text was updated successfully, but these errors were encountered: