]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix line number for implicitly declared method expressions
authorKeith Randall <khr@google.com>
Fri, 21 Dec 2018 23:41:28 +0000 (15:41 -0800)
committerKeith Randall <khr@golang.org>
Sat, 22 Dec 2018 01:08:39 +0000 (01:08 +0000)
commitdebca779719a72929932c589fe7ed3fea5341e53
tree343055c8980fa2f977bb28c29db9267c2054a8c9
parent08477a38ab21c5d4c196af6d16f817aae8c125da
cmd/compile: fix line number for implicitly declared method expressions

Method expressions where the method is implicitly declared have no
line number. The Error method of the built-in error type is one such
method.  We leave the line number at the use of the method expression
in this case.

Fixes #29389

Change-Id: I29c64bb47b1a704576abf086599eb5af7b78df53
Reviewed-on: https://go-review.googlesource.com/c/155639
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/closure.go
test/fixedbugs/issue29389.go [new file with mode: 0644]