From 8542fc29bd5bc48c006896de3f8af38acc47482b Mon Sep 17 00:00:00 2001 From: Nicholas Ng Date: Wed, 3 May 2017 23:14:54 +0100 Subject: [PATCH] go/ssa: updated inconsistent docs after Program.Method rename Fixes golang/go#20225 Change-Id: Ifd069546698981f3c6a3673dd73a1bd770560f8b Reviewed-on: https://go-review.googlesource.com/c/42570 Reviewed-by: Alan Donovan --- go/ssa/methods.go | 4 ++-- go/ssa/ssa.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/ssa/methods.go b/go/ssa/methods.go index 080dca96..9cf38391 100644 --- a/go/ssa/methods.go +++ b/go/ssa/methods.go @@ -23,14 +23,14 @@ import ( // func (prog *Program) MethodValue(sel *types.Selection) *Function { if sel.Kind() != types.MethodVal { - panic(fmt.Sprintf("Method(%s) kind != MethodVal", sel)) + panic(fmt.Sprintf("MethodValue(%s) kind != MethodVal", sel)) } T := sel.Recv() if isInterface(T) { return nil // abstract method } if prog.mode&LogSource != 0 { - defer logStack("Method %s %v", T, sel)() + defer logStack("MethodValue %s %v", T, sel)() } prog.methodsMu.Lock() diff --git a/go/ssa/ssa.go b/go/ssa/ssa.go index 7f7998a5..78272c54 100644 --- a/go/ssa/ssa.go +++ b/go/ssa/ssa.go @@ -654,7 +654,7 @@ type ChangeInterface struct { // value of a concrete type. // // Use Program.MethodSets.MethodSet(X.Type()) to find the method-set -// of X, and Program.Method(m) to find the implementation of a method. +// of X, and Program.MethodValue(m) to find the implementation of a method. // // To construct the zero value of an interface type T, use: // NewConst(constant.MakeNil(), T, pos)