Using "Void safety - complete", my code:
class TENSOR_SHAPE
create
default_create,
from_tuple
convert
from_tuple ({TUPLE [INTEGER]})
feature -- Initialization
from_tuple (a_shape: TUPLE [INTEGER])
...
I try to call this with:
local
s: TENSOR_SHAPE
do
s := [2, 4, 3, 5] -- convert from tuple?
I get "source of assignment is not compatible with target."
Target name: s
Target type: detachable TENSOR_SHAPE
Source type: attached TUPLE [INTEGER_32, ...]
on line "s := [2, 4, 3, 5]".
Why does the compiler say `s' is detachable? Is this not how conversions are used? thanks, jjj