dart-lang / dart-lang/language
Can class fields be assigned in pattern assignments?
Open
request
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
Trying to decompose a record to class fields gives the error "Only local variables can be assigned in pattern assignments". Is this unavoidable? Couldn't it be solved so that we can assign to class fields as well?
Contributor guide
Research direction
Start by reading the issue discussion and the Dart language specification to understand the current restriction on pattern assignments and class fields. Review the open design question and its trade-offs; done means the language-design decision is documented, with any required specification changes identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100