lowercase variant constructor: Syntax error
Open
Nobody has claimed this yet.
Error messages
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
When you start a variant constructor with a lowercase letter you get a syntax error. It would be nice to show a clear warning instead. I.e.: Error: variant constructor must always start with a capital letter.
type fruit =
| Apple /* this works */
| pear; /* Error: 3557: <UNKNOWN SYNTAX ERROR> */
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Reproduce the issue with the provided fruit variant example, then locate the parser or diagnostic entry point for lowercase variant constructors. The work is done when the example produces a clear error stating that variant constructors must start with a capital letter, rather than an unknown syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100