Repository navigation
-mm=own: union-of-shapes field returned as a borrow; methods throwing objects through a yielding finally (TSLANG 181) - #1018
Merged
Merged
Conversation
…borrow; methods throwing objects through a yielding finally (TSLANG 181) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two -mm=own items left after TSLANG 180 (TSLANG_ISSUES.md item 181).
Fixed
function getBox(s: Sq | Ci): Box { return s.box; }, 164): "a value is merged from several branches".ts.GetValueFromUnionOp, thents.ExtractProperty).borrowedParamnow follows both ops, so the function returns a borrow of its argument, as it does with one shape.trywhosefinallyyields (try { yield 1; w.boom(); } finally { yield 2; }): it stopped at run time.ts.ThisSymbolRef, a static'sts.SymbolRef, and a virtual one by the class the call goes through.Still open
for (const s of this.items) yield sin a generator method (158) needs a ruling. The loop keeps the field's array in the generator's state across its yields.Verified
00own_union_shape_field_borrow.tspasses under gc, rc, own and none.getBox's result into a field is refused exactly as for the one-shape getter.🤖 Generated with Claude Code