gobra icon indicating copy to clipboard operation
gobra copied to clipboard

Gobra reports let-in parser error if there is a parser error in another function

Open ThomasMayerl opened this issue 9 months ago • 0 comments

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.

ThomasMayerl avatar Mar 27 '25 13:03 ThomasMayerl