When you access an item in a HASH_TABLE
it's possible that the item is not present. Therefore the signature of this feature is
item (k: K): detachable G
and it returns Void
(or a default value for an expanded type) if the item is not found. So, when you try to use an item from HASH_TABLE
, it should be checked whether it is attached or not. This can be achieved by replacing:
table.at (1).go_i_th (1)
with:
if attached table.at (1) as la_element then
la_element.go_i_th (1)
end