* 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>
16 lines
236 B
Go
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
|