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

Gobra does not consider shStructDefault to be terminating #494

Closed
jcp19 opened this issue Jul 27, 2022 · 0 comments · Fixed by #495
Closed

Gobra does not consider shStructDefault to be terminating #494

jcp19 opened this issue Jul 27, 2022 · 0 comments · Fixed by #495

Comments

@jcp19
Copy link
Contributor

jcp19 commented Jul 27, 2022

... as such, the following fails to verify

package main

type B struct {
	f int
}

//@ decreases
//@ pure
func (b *B)isNil() bool {
    return b == nil
}

Error message:

[info] Gobra has found 1 error(s) in package .. - main
[info] 	</Users/joao/Desktop/test_test.gobra:9:17> Pure function might not terminate. 
[info] Required termination condition might not hold.
[info] Gobra has found 1 error(s)
[info] Writing report to .gobra/stats.json
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