LateFunctionBinding indicates that the function has a binding which is not known at compile time. This is useful for functions which have side-effects or are not deterministically computable.
()
| 996 | // LateFunctionBinding indicates that the function has a binding which is not known at compile time. |
| 997 | // This is useful for functions which have side-effects or are not deterministically computable. |
| 998 | func LateFunctionBinding() OverloadOpt { |
| 999 | return func(o *OverloadDecl) (*OverloadDecl, error) { |
| 1000 | if o.HasBinding() { |
| 1001 | return nil, fmt.Errorf("overload already has a binding: %s", o.ID()) |
| 1002 | } |
| 1003 | o.hasLateBinding = true |
| 1004 | return o, nil |
| 1005 | } |
| 1006 | } |
| 1007 | |
| 1008 | // OverloadIsNonStrict enables the function to be called with error and unknown argument values. |
| 1009 | // |