(fn *builtin.Function, name string, operator string)
| 137 | } |
| 138 | |
| 139 | func checkFunc(fn *builtin.Function, name string, operator string) { |
| 140 | if len(fn.Types) == 0 { |
| 141 | panic(fmt.Errorf("function %q for %q operator misses types", name, operator)) |
| 142 | } |
| 143 | for _, t := range fn.Types { |
| 144 | if t.NumIn() != 2 || t.NumOut() != 1 { |
| 145 | panic(fmt.Errorf("function %q for %q operator does not have a correct signature", name, operator)) |
| 146 | } |
| 147 | } |
| 148 | } |