(t *testing.T)
| 784 | } |
| 785 | |
| 786 | func TestOverloadFunctionBindingWithLateBinding(t *testing.T) { |
| 787 | _, err := NewFunction("id", |
| 788 | Overload("id_bool", []*types.Type{types.BoolType}, types.AnyType, FunctionBinding(func(args ...ref.Val) ref.Val { |
| 789 | return args[0] |
| 790 | }), LateFunctionBinding()), |
| 791 | ) |
| 792 | if err == nil || !strings.Contains(err.Error(), "already has a binding") { |
| 793 | t.Errorf("NewCustomEnv() got %v, wanted already has a binding", err) |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | func TestOverloadFunctionLateBindingWithBinding(t *testing.T) { |
| 798 | _, err := NewFunction("id", |
nothing calls this directly
no test coverage detected