Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(105)

Delta Between Two Patch Sets: test/fixedbugs/issue5753.go

Issue 10383048: code review 10383048: cmd/gc: fix issue with method wrappers not having escap... (Closed)
Left Patch Set: Created 10 years, 9 months ago
Right Patch Set: diff -r 3a652b14dccc https://code.google.com/p/go/ Created 10 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/gc/closure.c ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // run
2
3 // Copyright 2013 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 // issue 5753: bad typecheck info causes escape analysis to
8 // not run on method thunks.
9
10 package main
11
12 type Thing struct{}
13
14 func (t *Thing) broken(s string) []string {
15 foo := [1]string{s}
16 return foo[:]
17 }
18
19 func main() {
20 t := &Thing{}
21
22 f := t.broken
23 s := f("foo")
24 _ = f("bar")
25 if s[0] != "foo" {
26 panic(`s[0] != "foo"`)
27 }
28 ········
29 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b