OverloadOperandTrait configures a set of traits which the first argument to the overload must implement in order to be successfully invoked.
(trait int)
| 922 | // OverloadOperandTrait configures a set of traits which the first argument to the overload must implement in order to be |
| 923 | // successfully invoked. |
| 924 | func OverloadOperandTrait(trait int) OverloadOpt { |
| 925 | return func(o *OverloadDecl) (*OverloadDecl, error) { |
| 926 | o.operandTrait = trait |
| 927 | return o, nil |
| 928 | } |
| 929 | } |
| 930 | |
| 931 | // NewConstant creates a new constant declaration. |
| 932 | func NewConstant(name string, t *types.Type, v ref.Val) *VariableDecl { |
no outgoing calls