[BUG] Traits with functions not defined in the namespace where @derive
is called
#9
Labels
bug
Something isn't working
@derive
is called
#9
The following kind of pattern doesn't work right now:
We should be able to make it work with judicious use of
GlobalRef
in@derive
, see for example https://github.com/ITensor/Derive.jl/blob/f97d55a21109e0390bb542237da532aec9d3ce0c/src/interface_macro.jl#L36.This will allow us to include these functions in the
AbstractArrayOps
trait: https://github.com/ITensor/Derive.jl/blob/f97d55a21109e0390bb542237da532aec9d3ce0c/src/traits.jl#L18-L19.The text was updated successfully, but these errors were encountered: