mirror of
https://github.com/golang/go
synced 2024-11-05 18:56:10 -07:00
b8a5fcfcec
(This functionality is provided by the oracle, but its output format is inflexible, and the functionality is better suited to a shell utility. I may remove the oracle 'callgraph' feature.) See Usage for details. + Test. LGTM=sameer R=sameer CC=golang-codereviews, gri https://golang.org/cl/164460044
26 lines
221 B
Go
26 lines
221 B
Go
package main
|
|
|
|
type I interface {
|
|
f()
|
|
}
|
|
|
|
type C int
|
|
|
|
func (C) f() {}
|
|
|
|
type D int
|
|
|
|
func (D) f() {}
|
|
|
|
func main() {
|
|
var i I = C(0)
|
|
i.f() // dynamic call
|
|
|
|
main2()
|
|
}
|
|
|
|
func main2() {
|
|
var i I = D(0)
|
|
i.f() // dynamic call
|
|
}
|