PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/go/smart_pointer_typedef_runme.go

#
Go | 19 lines | 15 code | 4 blank | 0 comment | 4 complexity | 59de042e1580cb995bf80392aeedf45f MD5 | raw file
 1package main
 2
 3import . "./smart_pointer_typedef"
 4
 5func main() {
 6	f := NewFoo()
 7	b := NewBar(f)
 8
 9	b.SetX(3)
10	if b.Getx() != 3 {
11		panic(0)
12	}
13
14	fp := b.X__deref__()
15	fp.SetX(4)
16	if fp.Getx() != 4 {
17		panic(0)
18	}
19}