Files
moxa/_test/redeclaration0.go
mpl 6f878052f8 interp: detect local redeclaration (#673)
* interp: detect local redecleration

Fixes #666

* make make check happy

* fix typo in filenames, add them to the exclusion list

Co-authored-by: Marc Vertes <mvertes@free.fr>
2020-06-03 17:21:00 +02:00

16 lines
236 B
Go

package main
func main() {
type foo struct {
yolo string
}
var foo int
foo = 2
println(foo)
}
// Error:
// ../_test/redeclaration0.go:8:6: foo redeclared in this block
// previous declaration at ../_test/redeclaration0.go:4:7