aboutsummaryrefslogtreecommitdiff
path: root/test/escape5.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-02-19 16:27:32 +0300
committerDmitry Vyukov <dvyukov@google.com>2015-03-28 16:15:27 +0000
commitedcc062bdc35a7dd6ac5d33aa85a135b020b72a8 (patch)
treedcf12943f01cb1664af7e009e8403c8fa0875f4b /test/escape5.go
parent8a2545744b2662fc34c117e769f3dbd2f7167d19 (diff)
downloadgo-edcc062bdc35a7dd6ac5d33aa85a135b020b72a8.tar.gz
go-edcc062bdc35a7dd6ac5d33aa85a135b020b72a8.zip
test: add tests for escape analysis of interface conversions
The false positives (var incorrectly escapes) are marked with BAD. Change-Id: If64fabb6ea96de44a1177d9ab12e2ccc579fe0c4 Reviewed-on: https://go-review.googlesource.com/5294 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/escape5.go')
-rw-r--r--test/escape5.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/escape5.go b/test/escape5.go
index a33daeee18..1d411b32d4 100644
--- a/test/escape5.go
+++ b/test/escape5.go
@@ -134,7 +134,8 @@ func f8(p *T1) (k T2) { // ERROR "leaking param: p to result k" "leaking param:
return
}
- global = p // should make p leak always
+ // should make p leak always
+ global = p // ERROR "p escapes to heap"
return T2{p}
}