1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package main import . "swigtests/smart_pointer_simple" func main() { f := NewFoo() b := NewBar(f) b.SetX(3) if b.Getx() != 3 { panic(0) } fp := b.X__deref__() fp.SetX(4) if fp.Getx() != 4 { panic(0) } }