I want to make a derived class of HASH_TABLE which implements a few additional features. I tried implementing it like this:
class HASH_TABLE2[G->HASHABLE]
inherit
HASH_TABLE[G,G]
rename
make as make_2
end
create
make
feature
make (capacity_ : INTEGER)
do
make_2(capacity_)
end
end
I get this error:
Error: Creation instruction uses call to improper feature.
Feature name: make_2 (n: INTEGER_32)
Line: 1156
do
-> create Result.make (n)
if object_comparison then
I don't understand why. If I do the same with inherit ARRAY[G], then it works fine.