Source file
test/fixedbugs/issue19217.go
1
2
3
4
5
6
7 package foo
8
9 import (
10 "encoding/binary"
11 )
12
13 type DbBuilder struct {
14 arr []int
15 }
16
17 func (bld *DbBuilder) Finish() error {
18 defer bld.Finish()
19
20 var hash []byte
21 for _, ixw := range bld.arr {
22 for {
23 if ixw != 0 {
24 panic("ixw != 0")
25 }
26 ixw--
27 insertOne:
28 for {
29 for i := 0; i < 1; i++ {
30 if binary.LittleEndian.Uint16(hash[i:]) == 0 {
31 break insertOne
32 }
33 }
34 }
35 }
36 }
37
38 return nil
39 }
40
View as plain text