R=rsc
https://golang.org/cl/173045
package main
-func main()
-{
+func main() {
s := float(0);
s := float(0); // BUG redeclaration
}
type s2 int;
var k = func (a int) int { return a+1 }(3);
_, _ = j, k;
-ro:
+ro: ;
}
}
func
-main()
-{
+main() {
a := 1;
b := 2;
a, b = swap(swap(a, b));
package main
func f() {
-exit:
+exit: ;
}
func main() {
-exit: // this should be legal (labels not properly scoped?)
+exit: ; // this should be legal (labels not properly scoped?)
}
/*
var i2 I2;
func
-main()
-{
+main() {
+
i2 = e().(I2); // bug089.go:16: fatal error: agen_inter i2i
}
var pf func(T1)
func main() {
- if v1 != 1 || v2.f != 2 || v3[0] != 3 || v3[1] != 4
- || v4[0] != 5 || v4[1] != 6 || v5[0] != 7 || v5[1] != 8
- || v6.f != 9 || v7[0] != 10 || v8[0] != 11 {
+ if v1 != 1 || v2.f != 2 || v3[0] != 3 || v3[1] != 4 ||
+ v4[0] != 5 || v4[1] != 6 || v5[0] != 7 || v5[1] != 8 ||
+ v6.f != 9 || v7[0] != 10 || v8[0] != 11 {
panic()
}
}
var s [8]string
func
-init()
-{
+init() {
s = [...]string{ "now", "is", "the", "time", "to", "fix", "this", "bug"}
}
func
-main()
-{
+main() {
}
import (
"fmt"; // GCCGO_ERROR "previous"
fmt "math"; // ERROR "redeclared|redefinition|incompatible"
-)
\ No newline at end of file
+)