blob: 49097999c59baaa423a7c57064973678c272680d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package main
import "./typedef_inherit"
func main() {
a := typedef_inherit.NewFoo()
b := typedef_inherit.NewBar()
x := typedef_inherit.Do_blah(a)
if x != "Foo::blah" {
panic(x)
}
x = typedef_inherit.Do_blah(b)
if x != "Bar::blah" {
panic(x)
}
c := typedef_inherit.NewSpam()
d := typedef_inherit.NewGrok()
x = typedef_inherit.Do_blah2(c)
if x != "Spam::blah" {
panic(x)
}
x = typedef_inherit.Do_blah2(d)
if x != "Grok::blah" {
panic(x)
}
}
|