]> Cypherpunks repositories - gostls13.git/commit
go/types: fix TypeString(nil, nil)
authorMatthew Dempsky <mdempsky@google.com>
Thu, 29 Oct 2015 01:55:30 +0000 (18:55 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 30 Oct 2015 22:58:43 +0000 (22:58 +0000)
commitce3045858ae8d37cfc4fade21c0818b408af1c74
tree955cca4d13cf2febdae88ca32e5a2fc341e6960b
parent7832c82bf5ebd32e24e3f324f5284194e505f3e4
go/types: fix TypeString(nil, nil)

The code is meant to return "<nil>", but because of a make([]Type, 8)
call that should be make([]Type, 0, 8), the nil Type happens to
already appear in the array.

Change-Id: I2db140046e52f27db1b0ac84bde2b6680677dd95
Reviewed-on: https://go-review.googlesource.com/16464
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/typestring.go
src/go/types/typestring_test.go