mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
test: add test for issue 3888.
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/9676043
This commit is contained in:
parent
1beb791934
commit
3577398f82
|
@ -1325,3 +1325,15 @@ func foo142() {
|
|||
t := new(Tm) // ERROR "escapes to heap"
|
||||
gf = t.M // ERROR "t.M escapes to heap"
|
||||
}
|
||||
|
||||
// issue 3888.
|
||||
func foo143() {
|
||||
for i := 0; i < 1000; i++ {
|
||||
func() { // ERROR "func literal does not escape"
|
||||
for i := 0; i < 1; i++ {
|
||||
var t Tm
|
||||
t.M() // ERROR "t does not escape"
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue