Repository navigation
ownership: E250 for a dropped owning struct, migrate Persian magazine and docs examples - #3672
Conversation
Calling a user function whose struct result owns a fresh string, with nothing holding the result, leaks that string the same way an unfreed local does. English and Persian messages and tests.
…perators Also says site instead of website on the style reference line, which textlint flagged.
Migrates the salam blocks and the inline examples in 36 posts. The blog code check goes from 75 of 135 blocks passing to 128 passing.
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
sha=fcbddae1d7c3d1d558df66d892b22a33c9109b3a
🤖 Salam AI reviewVerdict: commit Maximum steps for this agent have been reached. Below is a summary based on the diff and the files I was able to inspect. Summary of review The pull request makes three kinds of changes: (1) a compiler ownership check (E250) that now also rejects a bare statement calling a user function whose returned struct owns a fresh heap string, with English/Persian messages, two error tests, and an OWNERSHIP.md note; (2) a migration of Persian blog posts to word comparison operators; and (3) small SKILL.md/THROW.md doc fixes. What I verified
Remaining concerns / not verified
Decision: merge. The change is focused, follows the project's conventions, and the new behaviour is covered by tests in both languages. The remaining items are explicitly out of scope.
|
ask()on its own). Nothing holds the result, so the string leaks the same way as for a local that is never freed. English and Persian messages, one error test per language, and a row in the ownership doc.==,!=,<,>and friends in their code, which Persian mode has rejected since enforce comparison operator style by language #3352. A block-aware migration (onlysalamblocks that contain Persian code, plus inline examples that name a keyword) updates 36 posts.website/check-blog-code.shon the Persian posts goes from 75 passing blocks to 128.Checked on a build of this branch: the compiler's own source has no new hits,
errorsis 773 passed with the same six failures that also fail on 0.6.16, and the new error tests pass in both languages.Not covered: 7 blog blocks still fail for other reasons (names with spaces in English-mode examples that E234 rejects, a
postpage value, an export that no longer exists). The Persian books underbooks/are out of date and were left alone, andVector<str>elements are still not checked.Summary by CodeRabbit