-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
The docs for @implements mention the ability to define a type as inheriting from multiple interfaces by supplying a vector of interfaces, but it appear that the macro only handles the cases: Interface{:option} or plain, single Interface.
Am I missing something?
The docstring mentioning it:
Interfaces.jl/src/implements.jl
Lines 53 to 54 in b6191a0
| The macro can only be used once per module for any one type. To define | |
| multiple interfaces a type implements, combine them in square brackets. |
The logic for handling the interface argument to the macro:
Interfaces.jl/src/implements.jl
Lines 70 to 80 in b6191a0
| if interface isa Expr && interface.head == :curly | |
| interfacetype = interface.args[1] | |
| optional_keys = interface.args[2] | |
| # Allow a single Symbol instead of a Tuple | |
| if optional_keys isa QuoteNode | |
| optional_keys = (optional_keys.value,) | |
| end | |
| else | |
| interfacetype = interface | |
| optional_keys = () | |
| end |
Thanks for your work on this package! Really appreciate the thought going into it.
Metadata
Metadata
Assignees
Labels
No labels