Commit 60d4e30d authored by Robert Griesemer's avatar Robert Griesemer

make test/fixedbugs save for optional semis

R=rsc
https://golang.org/cl/173045
parent 4d44d6a3
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
package main package main
func main() func main() {
{
s := float(0); s := float(0);
s := float(0); // BUG redeclaration s := float(0); // BUG redeclaration
} }
...@@ -18,5 +18,5 @@ func main() { ...@@ -18,5 +18,5 @@ func main() {
type s2 int; type s2 int;
var k = func (a int) int { return a+1 }(3); var k = func (a int) int { return a+1 }(3);
_, _ = j, k; _, _ = j, k;
ro: ro: ;
} }
...@@ -12,8 +12,7 @@ swap(x, y int) (u, v int) { ...@@ -12,8 +12,7 @@ swap(x, y int) (u, v int) {
} }
func func
main() main() {
{
a := 1; a := 1;
b := 2; b := 2;
a, b = swap(swap(a, b)); a, b = swap(swap(a, b));
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
package main package main
func f() { func f() {
exit: exit: ;
} }
func main() { func main() {
exit: // this should be legal (labels not properly scoped?) exit: ; // this should be legal (labels not properly scoped?)
} }
/* /*
......
...@@ -15,7 +15,7 @@ var i1 I1; ...@@ -15,7 +15,7 @@ var i1 I1;
var i2 I2; var i2 I2;
func func
main() main() {
{
i2 = e().(I2); // bug089.go:16: fatal error: agen_inter i2i i2 = e().(I2); // bug089.go:16: fatal error: agen_inter i2i
} }
...@@ -17,9 +17,9 @@ var v8 = T5{f:11} ...@@ -17,9 +17,9 @@ var v8 = T5{f:11}
var pf func(T1) var pf func(T1)
func main() { func main() {
if v1 != 1 || v2.f != 2 || v3[0] != 3 || v3[1] != 4 if v1 != 1 || v2.f != 2 || v3[0] != 3 || v3[1] != 4 ||
|| v4[0] != 5 || v4[1] != 6 || v5[0] != 7 || v5[1] != 8 v4[0] != 5 || v4[1] != 6 || v5[0] != 7 || v5[1] != 8 ||
|| v6.f != 9 || v7[0] != 10 || v8[0] != 11 { v6.f != 9 || v7[0] != 10 || v8[0] != 11 {
panic() panic()
} }
} }
......
...@@ -9,12 +9,10 @@ package main ...@@ -9,12 +9,10 @@ package main
var s [8]string var s [8]string
func func
init() init() {
{
s = [...]string{ "now", "is", "the", "time", "to", "fix", "this", "bug"} s = [...]string{ "now", "is", "the", "time", "to", "fix", "this", "bug"}
} }
func func
main() main() {
{
} }
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