encore
encore copied to clipboard
Linear object in Tuple can't be consumed
I have a function foo() : (something, somethingElse)
, where somethingElse
is a linear class
; I’d like to do this:
match foo() with
case (a, b) =>
... consume b ...
I can’t do this, because the b
binding is immutable, so the consume
will not typecheck.
I expect that (something, somethingElse)
should not be well-formed unless it is linear
.
Arrrghhhhh. I have this problem, but with triples.