-
Notifications
You must be signed in to change notification settings - Fork 50
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
Type error when @extern method's result widens ADT value #1537
Comments
The workaround is to explicitly type the result of the closure given to @extern
def myTree1: Tree = {
Node()
} ensuring((res: Tree) => res.nodesGood) |
Or explicitly widen the resulting expression: @extern
def myTree1: Tree = {
Node() : Tree
} (_.nodesGood) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This:
gives:
in Stainless Version: 0.9.8.7-14-g7fd69e2
The text was updated successfully, but these errors were encountered: