diff options
author | Matthew Dempsky <mdempsky@google.com> | 2017-10-10 09:35:11 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2017-10-10 17:53:22 +0000 |
commit | f58c6c991581fde4eca563100126eadceab48e80 (patch) | |
tree | 433727b07ccc18e0a706234556da51dee609dbd0 /test/inline.go | |
parent | 3a8b9cfe9138d3a4aa227a6967d94ecdb3c0bd6f (diff) | |
download | go-f58c6c991581fde4eca563100126eadceab48e80.tar.gz go-f58c6c991581fde4eca563100126eadceab48e80.zip |
cmd/compile: remove outdated TODO about inlining
We've supported inlining methods called as functions for a while now.
Change-Id: I53fba426e45f91d65a38f00456c2ae1527372b50
Reviewed-on: https://go-review.googlesource.com/69530
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'test/inline.go')
-rw-r--r-- | test/inline.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/inline.go b/test/inline.go index 773b047cf7..7bb86ef8b2 100644 --- a/test/inline.go +++ b/test/inline.go @@ -72,3 +72,13 @@ func switchType(x interface{}) int { // ERROR "switchType x does not escape" return 0 } } + +type T struct{} + +func (T) meth(int, int) {} // ERROR "can inline T.meth" + +func k() (T, int, int) { return T{}, 0, 0 } // ERROR "can inline k" + +func _() { // ERROR "can inline _" + T.meth(k()) // ERROR "inlining call to k" "inlining call to T.meth" +} |