go/types, types2: explicitly check for non-nil type in LookupFieldOrMethod
Document and enforce API expectation. Add a test so we don't inadvertently change the function behavior with respect to nil type arguments. Fixes #50620. Change-Id: Ic000bff7504a03006bd248a319c7a2d49dcf09c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/379374 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by:Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Loading
Please sign in to comment