binding returns the runtime binding for an overload whose implementation is provided at declaration time. Each implementation is wrapped in an invocation guard which ensures runtime type agreement between the overload signature and the argument values.
(funcName string, disableTypeGuards bool)
| 887 | // Each implementation is wrapped in an invocation guard which ensures runtime type agreement |
| 888 | // between the overload signature and the argument values. |
| 889 | func (o *OverloadDecl) binding(funcName string, disableTypeGuards bool) *functions.Overload { |
| 890 | return &functions.Overload{ |
| 891 | Operator: o.ID(), |
| 892 | Unary: o.guardedUnaryOp(funcName, disableTypeGuards), |
| 893 | Binary: o.guardedBinaryOp(funcName, disableTypeGuards), |
| 894 | Function: o.guardedFunctionOp(funcName, disableTypeGuards), |
| 895 | Async: o.guardedAsyncOp(funcName, disableTypeGuards), |
| 896 | OperandTrait: o.OperandTrait(), |
| 897 | NonStrict: o.IsNonStrict(), |
| 898 | } |
| 899 | } |
| 900 | |
| 901 | // lateBoundBinding returns the runtime binding for an overload whose implementation is supplied |
| 902 | // by the activation at evaluation time. |
no test coverage detected