Commit 11d16dc5 authored by Robert Daniel Kortschak's avatar Robert Daniel Kortschak Committed by Russ Cox

reflect: document that Value.Slice panics on an unaddressable array.

Fixes #4736.

R=rsc
CC=golang-dev
https://golang.org/cl/7239045
parent 2ccd4e9f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment