threading icon indicating copy to clipboard operation
threading copied to clipboard

can't send POD types without `=destroy` warning?

Open JorySchossau opened this issue 1 year ago • 1 comments

The compiler currently implicitly suggests I should box all my sends of POD types with objects so I can create null destructors (discard), which feels unnecessary. Isn't it isolated by definition?

var input = newChan[int]()
input.send(1) # isolation.nim(29, 13) Warning: `=destroy`(dest.value) can raise an unlisted exception: Exception [Effect]

JorySchossau avatar Apr 22 '24 21:04 JorySchossau

The compiler currently implicitly suggests I should box all my sends of POD types with objects so I can create null destructors (discard)

I don't think that's what it is. but also I can't reproduce from your code sample.

planetis-m avatar Aug 01 '24 14:08 planetis-m