When a module implements an interface, it has to include the module
that defines the interface before calling `implements()'. However,
since the name of an interface and the module that defines it are
necessarily identical, there is no ambiguity and the module should
be included automatically.
This commit modifies the function `implements()' so that it includes
the interface's module before registering the implementation.
local method
declare -n interface
+ if ! include "$iface"; then
+ return 1
+ fi
+
if [[ -z "${__TOOLBOX_INTERFACES[$iface]}" ]]; then
echo "ERROR: Unknown interface: \"$iface\"" 1>&2
return 1