Skip to content

[proposal] lazy initializers for accessor macros#3349

Open
nilsgrabenhorst wants to merge 1 commit into
swiftlang:mainfrom
nilsgrabenhorst:lazy-accessor-macros
Open

[proposal] lazy initializers for accessor macros#3349
nilsgrabenhorst wants to merge 1 commit into
swiftlang:mainfrom
nilsgrabenhorst:lazy-accessor-macros

Conversation

@nilsgrabenhorst

@nilsgrabenhorst nilsgrabenhorst commented Jul 7, 2026

Copy link
Copy Markdown

A proposal to enable accessor macros with lazy property initializers. The compiler currently type-checks these initializer expressions in their original context before macro expansion, where self is not available. The proposed implementation removes this limitation.

Pitch

Rendered proposal

This is my first contribution. The implementation still needs a bit of cleanup and fixing of tests. I will finish it as soon as possible, but I wanted to make the proposal available first to get some feedback. I hope this is OK!

@rjmccall rjmccall added LSG Contains topics under the domain of the Language Steering Group new proposal Adds a new proposal document labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LSG Contains topics under the domain of the Language Steering Group new proposal Adds a new proposal document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants