-
-
Save mkevac/09f64f8fc9f00d1a659d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import () | |
type Conn interface { | |
Read([]int) | |
} | |
type connT struct { | |
} | |
func (c *connT) Read(data []int) { | |
} | |
func (c *connT) Read2(data []int) { | |
} | |
func read_escapes(conn Conn, data []int) { | |
conn.Read(data) | |
} | |
func read_doesnt_escape(conn *connT, data []int) { | |
conn.Read2(data) | |
} | |
func main() { | |
c := &connT{} | |
n := []int{1} | |
// read_escapes(c, n) | |
read_doesnt_escape(c, n) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment