diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-08-10 12:58:10 +0200 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2017-08-11 00:56:21 +0000 |
commit | d7ec89c19846d8c1d89d510cd7634ae9de640ac0 (patch) | |
tree | 494888fb3bb030d3928e011e2367270517649405 /test/escape2.go | |
parent | 3b87defe4e3f865862cbe2e0627d94a8c456ae0c (diff) | |
download | go-d7ec89c19846d8c1d89d510cd7634ae9de640ac0.tar.gz go-d7ec89c19846d8c1d89d510cd7634ae9de640ac0.zip |
test: add missing escape analysis test
https://golang.org/cl/37508 added an escape analysis test for #12397 to
escape2.go but missed to add it to escape2n.go. The comment at the top
of the former states that the latter should contain all the same tests
and the tests only differ in using -N to compile. Conform to this by
adding the function issue12397 to escape2n.go as well.
Also fix a whitespace difference in escape2.go, so the two files match
exactly (except for the comment at the top).
Change-Id: I3a09cf95169bf2150a25d6b4ec9e147265d36760
Reviewed-on: https://go-review.googlesource.com/54610
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'test/escape2.go')
-rw-r--r-- | test/escape2.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/escape2.go b/test/escape2.go index e10dbc2acc..ef3d6a88bf 100644 --- a/test/escape2.go +++ b/test/escape2.go @@ -1204,7 +1204,7 @@ func foo126() { // loopdepth 1 var i int // ERROR "moved to heap: i$" func() { // ERROR "foo126 func literal does not escape$" - px = &i // ERROR "&i escapes to heap$" "leaking closure reference i" + px = &i // ERROR "&i escapes to heap$" "leaking closure reference i" }() } _ = px |