Skip to content

Fix issue 5010 - improve error for property assignment used as void value - #23817

Merged
thewilsonator merged 1 commit into
dlang:masterfrom
usefahmed07:fix-5010-property-assign-void
Sep 9, 2026
Merged

Fix issue 5010 - improve error for property assignment used as void value#23817
thewilsonator merged 1 commit into
dlang:masterfrom
usefahmed07:fix-5010-property-assign-void

Conversation

@usefahmed07

Copy link
Copy Markdown
Contributor

Fixes #18308

…alue

When a @Property setter is used in an assignment expression whose
result is then used as a value (e.g. `int a = prop = 6;` where
`prop` is a void-returning setter), the error message showed the
desugared call syntax `prop(6)` instead of the original assignment
syntax `prop = 6`, which was confusing.

https://issues.dlang.org/show_bug.cgi?id=5010
@thewilsonator
thewilsonator merged commit 82bca44 into dlang:master Sep 9, 2026
42 of 43 checks passed
@usefahmed07
usefahmed07 deleted the fix-5010-property-assign-void branch September 9, 2026 09:34
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.

Error messages for properties could be improved

2 participants