Skip to content

abandon f(param N): the abandonment path names the parameter that receives the resource (#3177) - #3493

Merged
ehartford merged 2 commits into
mainfrom
abandon-position
Nov 21, 2026
Merged

ehartford merged 2 commits into
mainfrom
abandon-position

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Closes #3177. Eric's ruling of 2026-11-20; the §31 words are blessed as written (spec v7.76).

drop f(param N) and destroys f(param N) already existed (D209). abandon now has the same form and the same rule:

  • abandon f(param N): the resource is parameter N, the first when the parentheses are absent;
  • every other parameter is fixed or discarded on fn f, since the abandonment path has only the representation to pass. The refusal names the parameter that is neither.

The abandonment path calls it through a rendered helper, as a positioned drop does, before the destroyer.

Spec (§31): the destruction production (( "drop" | "destroys" | "abandon" ) c_name [ "(" param_ref ")" ]), the abandon f row, and verification rule 2 (Shapes).

Tests: behav_3177_abandon_position (an abandon function that takes an error out-pointer first and the resource second: it runs once, then the destroyer once); err_3129_abandon_takes_more re-expected to the new message.

Battery green; :release-checks green.

@ehartford
ehartford merged commit de4270c into main Nov 21, 2026
@ehartford
ehartford deleted the abandon-position branch November 21, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Facade grammar: a destroyer whose resource is not its first parameter (20 functions, 6 libraries: BZ2_bzReadClose(int*, BZFILE*))

1 participant