Skip to content

Instantly share code, notes, and snippets.

@hongruiqi
Created November 6, 2013 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hongruiqi/7336953 to your computer and use it in GitHub Desktop.
Save hongruiqi/7336953 to your computer and use it in GitHub Desktop.
package main
type A struct {
x int
y int
}
func (a *A) Print() {
println(a.x, a.y)
}
type B struct {
A
}
func main() {
var b B
b.Print()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment