opened
emilwestergren
username_0
How do I modify ownership? Accessing `_owner` doesn't seem right. @username_2 @username_1 

```ooc
Closure: cover {
	thunk: Pointer
	context: Pointer
	_owner: Owner
	owner ::= this _owner
	isOwned ::= this _owner != Owner Unknown && this _owner != Owner Static && this _owner != Owner Stack && this context != null
	take: func -> This { // call by value -> modifies copy of cover
		if (this _owner == Owner Receiver && this context != null)
			this _owner = Owner Sender
		this
	}
	give: func -> This { // call by value -> modifies copy of cover
		if (this _owner == Owner Sender && this context != null)
			this _owner = Owner Receiver
		this
	}
	free: func@ ~withCriteria (criteria: Owner) -> Bool {
		this _owner == criteria && this free()
	}
	free: func@ -> Bool {
		result := this context != null
		if (result) {
			gc_free(this context)
			this context = null
			this thunk = null
		}
		result
	}
}
```
Ownership for Closure incomplete
issue
created
sebastianbaginski
username_1
Typically owner is modified by `take / give`. `Owner Static / Unknown` is set only in constructor. What do you need ?
comment
created
emilwestergren
username_0
owner is defaulted to Unknown for closures, so `take / give`  have no effect.
comment
created
sebastianbaginski
username_1
In OwnedBuffer there is a `claim` method
```ooc
claim: func -> This {
	this isOwned ? this : this copy()
}
```
which sets owner to Receiver, but I don't know how to copy a closure.
comment
created
simonmika
username_2
Owner needs to default to `Owner Receiver` in this case.
comment
closed
marcusnaslund
username_3
issue