gobra icon indicating copy to clipboard operation
gobra copied to clipboard

Method Wellformedness

Open viper-admin opened this issue 4 years ago • 3 comments

Created by @arquintl on 2020-06-19 07:38 Last updated on 2020-06-19 07:44

Check that methods do not have the same name as fields

This is invalid:

type Rectangle struct {
    Width, Height int
}

ghost
requires acc(r.Width)
ensures acc(r.Width)
pure func (r *Rectangle) Width() (res int) {
    return r.Width
}

viper-admin avatar Jun 19 '20 07:06 viper-admin

@arquintl on 2020-06-19 07:44:

  • edited the description

viper-admin avatar Jun 19 '20 07:06 viper-admin

@arquintl on 2020-06-19 07:44:

  • edited the description

viper-admin avatar Jun 19 '20 07:06 viper-admin

it detects that something is incorrect, but the error messages are not good.

Felalolf avatar May 18 '22 15:05 Felalolf