From: Robert Daniel Kortschak Date: Fri, 1 Feb 2013 18:02:23 +0000 (-0800) Subject: reflect: document that Value.Slice panics on an unaddressable array. X-Git-Tag: go1.1rc2~1193 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=11d16dc53545438067fef0103c10eae126c11535;p=gostls13.git reflect: document that Value.Slice panics on an unaddressable array. Fixes #4736. R=rsc CC=golang-dev https://golang.org/cl/7239045 --- diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go index 10a4c0775b..2e2c807ea0 100644 --- a/src/pkg/reflect/value.go +++ b/src/pkg/reflect/value.go @@ -1448,7 +1448,7 @@ func (v Value) SetString(x string) { } // Slice returns a slice of v. -// It panics if v's Kind is not Array, Slice, or String. +// It panics if v's Kind is not Array, Slice or String, or if v is an unaddressable array. func (v Value) Slice(beg, end int) Value { var ( cap int