Commit 5182aff0 authored by Robert Griesemer's avatar Robert Griesemer

- more tests (mostly redeclaration errors that are not checked)

SVN=121546
parent 094ee44b
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// $G $F.go && echo BUG: compilation succeeds incorrectly
package main
type I interface {
g,f ()int; // BUG only one method name allowed per signature
}
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// $G $F.go && echo BUG: compilation succeeds incorrectly
package main
type Iputs interface {
puts func(s string); // BUG no func allowed
}
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// $G $F.go && echo BUG: compilation succeeds incorrectly
package main
type Item interface {
Print_BUG func(); // BUG no func allowed
}
// errchk $G $D/$F.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func f9(a int) (i int, f float) {
i := 9; // BUG redeclaration
f := float(9); // BUG redeclaration
return i, f;
}
// ! $G $D/$F.go >/dev/null
// # ignoring error messages...
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main()
{
s := float(0);
s := float(0); // BUG redeclaration
}
// errchk $G $D/$F.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main() {
s := vlong(0); // BUG no vlong specified in the language
}
// ! $G $D/$F.go >/dev/null
// # ignoring error messages...
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main() {
var z [3]byte;
z := new([3]byte); // BUG redeclaration
}
// errchk $G $D/$F.go
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main (x int) {
var x int; // BUG redeclaration error
}
// ! $G $D/$F.go >/dev/null
// # ignoring error messages...
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func main (x, x int) { // BUG redeclaration error
}
=========== ./bug032.go
BUG: compilation succeeds incorrectly
=========== ./bug033.go
BUG: compilation succeeds incorrectly
=========== ./bug034.go
BUG: compilation succeeds incorrectly
=========== ./bug035.go
BUG: compilation succeeds incorrectly
=========== ./bug036.go
BUG: compilation succeeds incorrectly
=========== ./bug037.go
BUG: compilation succeeds incorrectly
=========== ./bug038.go
BUG: compilation succeeds incorrectly
=========== ./bug039.go
BUG: compilation succeeds incorrectly
=========== ./bug040.go
BUG: compilation succeeds incorrectly
=========== ./bug041.go
BUG: compilation succeeds incorrectly
=========== ./char_lit.go =========== ./char_lit.go
char_lit.go:5: syntax error char_lit.go:5: syntax error
char_lit.go:17: unknown escape sequence: \ char_lit.go:17: unknown escape sequence: \
...@@ -101,6 +131,7 @@ BUG: known to fail incorrectly ...@@ -101,6 +131,7 @@ BUG: known to fail incorrectly
=========== ken/rob1.go =========== ken/rob1.go
=========== ken/rob2.go =========== ken/rob2.go
(hello hello (hello 12 34))
=========== ken/robfor.go =========== ken/robfor.go
ken/robfor.go:45: fatal error: optoas: no entry MOD-<int32>INT32 ken/robfor.go:45: fatal error: optoas: no entry MOD-<int32>INT32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment