diff --git a/lang/funcs/simplepoly/simplepoly.go b/lang/funcs/simplepoly/simplepoly.go index b54883fd..8f4e4e82 100644 --- a/lang/funcs/simplepoly/simplepoly.go +++ b/lang/funcs/simplepoly/simplepoly.go @@ -42,6 +42,10 @@ func Register(name string, fns []*types.FuncValue) { panic(fmt.Sprintf("a simple polyfunc named %s is already registered", name)) } + if len(fns) == 0 { + panic("no functions specified for simple polyfunc") + } + // check for uniqueness in type signatures typs := []*types.Type{} for _, f := range fns {