gobra
gobra copied to clipboard
Gobra reports let-in parser error if there is a parser error in another function
The following code verifies because the syntax error is commented out:
var mapstrstr = map[string][]string{}
preserves acc(mapstrstr)
preserves let val, ok := mapstrstr[str] in acc(val)
func test(str string)
//preserves */thismakesnosense
func test_2()
However, in the following snippet, Gobra will report an error for the let-in clause even though the syntax error can be found in another function:
var mapstrstr = map[string][]string{}
preserves acc(mapstrstr)
preserves let val, ok := mapstrstr[str] in acc(val)
func test(str string)
preserves */thismakesnosense
func test_2()
The error reported is unexpected end of line in expression, expecting 'in' for the line with the let-in clause.