Don't understand where I'm wrong here...
class
LINKED_LIST_SEP[G]
inherit
LINKED_LIST [G]
create
make,
make_from_iterable,
make_from_separate
feature {NONE} -- Initialization
make_from_separate (other: separate like Current)
do
default_create
across
other is l_item
loop
check
attached {G} {SCOOP_UTIL}.any_from_separate (l_item) as l_v
then
extend (l_v)
end
end
end
end -- class
For an unconstrained formal generic parameter, the implicit constraint is detachable separate ANY
. But feature any_from_separate
expects separate ANY
.
The following solutions are possible:
l_item
is not void before calling any_from_separate
.any_from_separate
to accept detachable types. In this case, however, its result would also become detachable.separate ANY
to the formal generic parameter of class LINKED_LIST_SEP
.