}
}
}
- f.buf = f.buf + s; // BUG: += should work
+ f.buf += s;
}
// format val into buf, ending at buf[i]. (printing is easier right-to-left;
// guess 10-exponent using 2-exponent, then fine tune.
var g double;
var e2 int;
- e2, g = sys.frexp(a);
+ e2, g = sys.frexp(a); // BUG: should be able to say e2, g := sys.frexp(a);
e := int(e2 * .301029995663981);
g = a * pow10(-e);
for g < 1 {
// float
func (x *Fmt) f(a float) *Fmt {
- return x.F(double(a));
+ return x.F(double(a))
}
// float
func (x *Fmt) e(a float) *Fmt {
- return x.E(double(a));
+ return x.E(double(a))
}
// float
func (x *Fmt) g(a float) *Fmt {
- return x.G(double(a));
+ return x.G(double(a))
}
(<float32>FLOAT32)
(<int32>INT32)
test0.go:50: error in shape across assignment
-test0.go:47: illegal types for operand: CALLMETH
+test0.go:55: illegal types for operand: CALLMETH
(*<Point>{})
(<Point>{<x><int32>INT32;<y><int32>INT32;<Point_Initialize>120({},{}){};<Point_Distance>101({},{}){};})
-test0.go:47: illegal types for operand: AS
+test0.go:54: illegal types for operand: AS
(<Point>{<x><int32>INT32;<y><int32>INT32;<Point_Initialize>120({},{}){};<Point_Distance>101({},{}){};})
({})
BUG: known to fail incorrectly
=========== bugs/bug043.go
bugs/bug043.go:14: error in shape across assignment
-bugs/bug043.go:14: error in shape across assignment
+bugs/bug043.go:17: error in shape across assignment
BUG: compilation should succeed
=========== bugs/bug044.go
bugs/bug057.go:13: syntax error
BUG: compilation should succeed
-=========== bugs/bug058.go
-bugs/bug058.go:11: illegal types for operand: INDEX
- (MAP[<string>*STRING]*<Box>{})
- (<string>*STRING)
-bugs/bug058.go:11: illegal types for operand: AS
- (*<Box>{})
-BUG: compilation should succeed
+=========== bugs/bug059.go
+BUG: crashes
=========== fixedbugs/bug000.go
=========== fixedbugs/bug040.go
=========== fixedbugs/bug045.go
+
+=========== fixedbugs/bug058.go
// Send the sequence 2, 3, 4, ... to channel 'ch'.
func Generate(ch *chan> int) {
for i := 2; ; i++ {
- >ch = i; // Send 'i' to channel 'ch'.
+ >ch = i // Send 'i' to channel 'ch'.
}
}
// removing those divisible by 'prime'.
func Filter(in *chan< int, out *chan> int, prime int) {
for {
- i := <in; // Receive value of new variable 'i' from 'in'.
+ i := <in // Receive value of new variable 'i' from 'in'.
if i % prime != 0 {
- >out = i; // Send 'i' to channel 'out'.
+ >out = i // Send 'i' to channel 'out'.
}
}
}
print "%d\n", prime;
ch1 := new(chan int);
go Filter(ch, ch1, prime);
- ch = ch1;
+ ch = ch1
}
}
func Main() {
- Sieve();
+ Sieve()
}