blob: 1ba541f13cda4f62fb130dee0a8c9a319d955940 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package main
import "./overload_extend"
func main() {
f := overload_extend.NewFoo()
if f.Test().(int) != 0 {
panic(0)
}
if f.Test(3).(int) != 1 {
panic(0)
}
if f.Test("hello").(int) != 2 {
panic(0)
}
if f.Test(float64(3), float64(2)).(float64) != 5 {
panic(0)
}
if f.Test(3.0).(float64) != 1003 {
panic(0)
}
}
|