playframework / playframework/twirl
Disallow block args in `if`/`else if`/`else` expressin
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 561
- Forks
- 118
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 29
Description
Not urgent, but currently you can write things like:
@if(true) { (something: SomeType) =>
foo
}
I don't think that makes sense in twirl (?).
Also check other statements where we should disallow that.
Contributor 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.
Research direction
Start by locating the parser or validation entry point for Twirl if/else expressions and reproduce the block-argument example from the issue. Check the corresponding handling of other statements, then add coverage showing that invalid block arguments are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100