]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: provide better error when method called without receiver
authorMichael Matloob <matloob@google.com>
Tue, 30 Dec 2014 00:59:55 +0000 (16:59 -0800)
committerMichael Matloob <michaelmatloob@gmail.com>
Thu, 18 Jun 2015 19:37:38 +0000 (19:37 +0000)
commit32f2f72c4716debf658eaec1c400a35b2de7d51d
tree3c7904dadf0f9b3166ae036c5c89f5f851ffb5c9
parent3925a7c5dbde952a94fc4c46686d78bb1ff71ed8
cmd/compile: provide better error when method called without receiver

When a method is called using the Type.Method(receiver, args...) syntax
without the receiver, or enough arguments, provide the more helpful
error message "not enough arguments in call to method expression
Type.Method" instead of the old message "not enough arguments in call
to Type.Method".

Fixes #8385

Change-Id: Id5037eb1ee5fa93687d4a6557b4a8233b29e9df2
Reviewed-on: https://go-review.googlesource.com/2193
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/gc/typecheck.go
test/fixedbugs/issue8385.go [new file with mode: 0644]