Skip to content

Add support for multiple method modifiers#861

Merged
reese merged 1 commit into
trunkfrom
reese-multi-access-modifiers
May 8, 2026
Merged

Add support for multiple method modifiers#861
reese merged 1 commit into
trunkfrom
reese-multi-access-modifiers

Conversation

@reese
Copy link
Copy Markdown
Collaborator

@reese reese commented May 8, 2026

Closes #859

We currently support access modifiers (or any method that takes a DefNode as its sole argument) by rendering them inline with the definition, e.g.

private def not_the_bees! = !bees

but we should also support arbitrarily many modifiers. This adds a check to recurse into the arguments of these single calls, and if all the calls are either (a) a DefNode or (b) another modifier whose argument is a DefNode, then we also treat those as modifiers. This allows us to do things like

memoize private def not_the_bees! = !bees

@reese reese merged commit 25bc06a into trunk May 8, 2026
8 checks passed
@reese reese deleted the reese-multi-access-modifiers branch May 8, 2026 15:16
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.

Support multiple nested method modifiers

2 participants