Commit 3577398f authored by Rémy Oudompheng's avatar Rémy Oudompheng

test: add test for issue 3888.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/9676043
parent 1beb7919
...@@ -1325,3 +1325,15 @@ func foo142() { ...@@ -1325,3 +1325,15 @@ func foo142() {
t := new(Tm) // ERROR "escapes to heap" t := new(Tm) // ERROR "escapes to heap"
gf = t.M // ERROR "t.M 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"
}
}()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment