Well, it is not an implementation bug. The x:=w assignment converts the 
"only-owned" w into a "shared-owned" ptr. In Pony-Lang-speak an `iso` becomes a 
`trn`. Therefore, as long as addWidget requires an owned ref ptr, the compiler 
should throw an error message. Alternatively, the compiler would "know" that x 
is an alias for the owned ptr w. If the w is given away, any access to x should 
be forbidden, resulting in a compiler error. Despite this, an owned ptr can't 
be passed to a non-owned field. Therefore, addWidget must not compile. 

Reply via email to