1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:57:57 -07:00

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>
This commit is contained in:
Matthew Dempsky 2017-10-10 09:35:11 -07:00
parent 3a8b9cfe91
commit f58c6c9915
2 changed files with 10 additions and 1 deletions

View File

@ -23,7 +23,6 @@
//
// TODO:
// - inline functions with ... args
// - handle T.meth(f()) with func f() (t T, arg, arg, )
package gc

View File

@ -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"
}