From: Alan Donovan Date: Thu, 5 May 2016 21:56:58 +0000 (-0700) Subject: go/token: document postcondition of SetLines X-Git-Tag: go1.7beta1~314 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5f83bf6053763801beb84a926cde7221874bc4f7;p=gostls13.git go/token: document postcondition of SetLines Change-Id: Ie163deade396b3e298a93845b9ca4d52333ea82a Reviewed-on: https://go-review.googlesource.com/22831 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/go/token/position.go b/src/go/token/position.go index 33751779a3..7306083b0d 100644 --- a/src/go/token/position.go +++ b/src/go/token/position.go @@ -164,6 +164,7 @@ func (f *File) MergeLine(line int) { // Each line offset must be larger than the offset for the previous line // and smaller than the file size; otherwise SetLines fails and returns // false. +// Callers must not mutate the provided slice after SetLines returns. // func (f *File) SetLines(lines []int) bool { // verify validity of lines table