Closed julbinb closed 3 years ago
If I recall correctly, I had some problem where the default constructor wasn't used anymore when I omitted the >: Tuple
. But I cannot reproduce this anymore... So maybe this was due to some redefinitions coming from Revise
or I just made some other mistake. The correct way would probably be to just define the functions as
Instruction(op::InstructionOp, a::InstructionArg) = Instruction(op, (a, nothing, nothing))
Instruction(op, a::InstructionArg, b::InstructionArg) = Instruction(op, (a, b, nothing))
Instruction(op, a::InstructionArg, b::InstructionArg, c::InstructionArg) = Instruction(op, (a, b, c))
Sorry if this wasted your time
No worries, thank you very much for the swift reply!
This isn't an issue per se, just curious (I am researching Julia subtyping, and we are looking into lower-bounds usages)...
https://github.com/JuliaHomotopyContinuation/HomotopyContinuation.jl/blob/a24d71335ce21e2f76b554fff6dda53a6b7d6e5b/src/model_kit/instructions.jl#L147-L150
What is the purpose of using
>: Tuple
lower bound in the first method? It seems that>: Tuple
in this case does not impact multiple dispatch, and any value can be passed asa
of typeT>:Tuple
: