[Go] Fix member variables in base classes to handle CWRAP_NATURAL_VAR
correctly. Add a test case for the problem. Fixes #339.
This commit is contained in:
parent
c6b3088e58
commit
11d8403c3c
4 changed files with 47 additions and 3 deletions
15
Examples/test-suite/go/inherit_member_runme.go
Normal file
15
Examples/test-suite/go/inherit_member_runme.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue