Open
Description
While poking around the go/types
internals, i noticed that nothing really "type-checks" goto
s without labels.
First pass:
Lines 578 to 608 in 500675a
Second pass:
Lines 173 to 176 in 500675a
Also it also turns out that:
func test() {
goto;
}
Is accepted by the go/parser
. The spec disallows goto
s without labels, so we should either return an appropriate error in go/types
or go/parser
. Currently go/types
returns an InvalidSyntaxTree
error.
Lines 605 to 607 in 500675a