Skip to content

Commit

Permalink
workaround for compiler bug: len(a) is zero
Browse files Browse the repository at this point in the history
TBR=iant
OCL=13873
CL=13873
  • Loading branch information
robpike committed Aug 5, 2008
1 parent 4a0765b commit 033682d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/chan/powser1.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,9 @@ func check(U PS, c *rat, count int, str string) {
}
}

const N=10
func checka(U PS, a *[]*rat, str string) {
for i := 0; i < len(a); i++ {
for i := 0; i < N; i++ {
check(U, a[i], 1, str);
}
}
Expand All @@ -648,8 +649,7 @@ func main() {
check(Ones, one, 5, "Ones");
check(Add(Ones, Ones), itor(2), 0, "Add Ones Ones"); // 1 1 1 1 1
check(Add(Ones, Twos), itor(3), 0, "Add Ones Twos"); // 3 3 3 3 3
const N = 5;
a := new([10] *rat);
a := new([N] *rat);
d := Diff(Ones);
// BUG: want array initializer
for i:=0; i < N; i++ {
Expand Down

0 comments on commit 033682d

Please sign in to comment.