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.
- Who owns the widget in this example? Stefan_Salewski
- Re: Who owns the widget in this example? Araq
- Re: Who owns the widget in this example? GordonBGood
- Re: Who owns the widget in this example? GordonBGood
- Re: Who owns the widget in this example? Araq
- Re: Who owns the widget in this exam... GordonBGood
- Re: Who owns the widget in this ... Sixte
- Re: Who owns the widget in t... Araq
- Re: Who owns the widget in t... GordonBGood
- Re: Who owns the widget in t... GordonBGood
- Re: Who owns the widget in t... gemath
- Re: Who owns the widget in t... GordonBGood
- Re: Who owns the widget in t... Araq
- Re: Who owns the widget in t... Sixte
- Re: Who owns the widget in t... GordonBGood
- Re: Who owns the widget in t... Sixte
- Re: Who owns the widget in t... GordonBGood
