Skip to content

Commit

Permalink
go/token: document postcondition of SetLines
Browse files Browse the repository at this point in the history
Change-Id: Ie163deade396b3e298a93845b9ca4d52333ea82a
Reviewed-on: https://go-review.googlesource.com/22831
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
adonovan committed May 5, 2016
1 parent 5bf9b39 commit 5f83bf6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/go/token/position.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f83bf6

Please sign in to comment.