switch inferior/thread before calling target methods
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.go / methods.go
1 package main
2
3 import "fmt"
4
5 type T struct { i int }
6
7 func (t T) Foo () {
8 fmt.Println (t.i)
9 }
10
11 func (t *T) Bar () {
12 fmt.Println (t.i)
13 }
14
15 func main () {
16 fmt.Println ("Shall we?")
17 var t T
18 t.Foo ()
19 var pt = new (T)
20 pt.Bar ()
21 }
This page took 0.02948 seconds and 4 git commands to generate.