encore icon indicating copy to clipboard operation
encore copied to clipboard

Linear object in Tuple can't be consumed

Open kaeluka opened this issue 7 years ago • 2 comments

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.

kaeluka avatar Apr 06 '17 15:04 kaeluka

I expect that (something, somethingElse) should not be well-formed unless it is linear.

supercooldave avatar Apr 25 '17 11:04 supercooldave

Arrrghhhhh. I have this problem, but with triples.

supercooldave avatar Jun 28 '17 14:06 supercooldave