swig/Examples/test-suite/go/inherit_member_runme.go
Ian Lance Taylor 11d8403c3c [Go] Fix member variables in base classes to handle CWRAP_NATURAL_VAR
correctly.  Add a test case for the problem.

Fixes #339.
2015-06-20 17:42:44 -07:00

15 lines
214 B
Go

package main
import wrap "./inherit_member"
func main() {
s := wrap.NewChild()
s.SetPvar("p")
s.SetCvar("c")
if s.GetPvar() != "p" {
panic(s.GetPvar())
}
if s.GetCvar() != "c" {
panic(s.GetCvar())
}
}