Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcasting of ADT instance is required before calling a method #641

Closed
Timon555 opened this issue Mar 16, 2023 · 0 comments · Fixed by #687
Closed

Upcasting of ADT instance is required before calling a method #641

Timon555 opened this issue Mar 16, 2023 · 0 comments · Fixed by #687

Comments

@Timon555
Copy link

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.

@jcp19 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
@jcp19 jcp19 closed this as completed in #687 Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant