impls_to_string drops mut and the colon of let mut
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #218 by @Lfan-ke — merged
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 87/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- tooling
Research direction
Start with the LetMut case in fmt/internal/format/syntax2doc.mbt, which the issue identifies as producing the malformed output. Check how that case renders let mut and the type separator, then run the formatter’s relevant round-trip check with a function containing let mut. Done when formatting preserves valid let mut x : Int = 1 syntax and the round-trip check accepts it.
Written by the indexing model from the issue text.
Description
impls_to_string prints
let mut x : Int = 1
as
let x Int = 1
which does not parse. format is affected as well: its round-trip check rejects that output, so a function containing let mut is left unformatted.
The LetMut case in fmt/internal/format/syntax2doc.mbt writes text("let") and no : before the type.
- Dominant language
- MoonBit
- Stars
- 35
- Forks
- 10
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moonbitlang/parser
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
moonbitlang/parser#202 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
moonbitlang/parser#201 ·
Maintainers usually reply within 1 day
-
CST lowering widens constraint-pattern locations through redundant parenthesesMay be free again @myfreess claimed this 37 days ago, and no pull request is open. Open
moonbitlang/parser#189 · 1 comment · 2 assignees ·
Maintainers usually reply within 1 day
-
Negative constant pattern locations exclude the minus sign in Handrolled and CST loweringMay be free again @Yoorkin claimed this 37 days ago, and no pull request is open. Openbug good first issue
moonbitlang/parser#188 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in moonbitlang/parser
Similar issues
-
bug good first issue help wanted workshop
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 65/100
EclipseFdn/open-vsx.org#15057 ·
Maintainers usually reply within 1 day
-
docs(prompts): IF BLOCKED workflow-scope branch says to comment on the issue on jira/local trackersOpenagent-butler-finding bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
jordansmall/spindrift#6238 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
midudev/better-claude#42 ·
Maintainers usually reply within 1 day
-
build
Difficulty 1/5 Under an hour Newbie friendliness 85/100
MetricsHub/metricshub-community#1472 ·
Maintainers usually reply within 1 day