Skip to content

Gobra does not consider shStructDefault to be terminating #494

@jcp19

Description

@jcp19

... 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions