playframework / playframework/twirl
Support for Type Parameters
Open
Nobody has claimed this yet.
help wanted
status:backlog
- Dominant language
- Scala
- Stars
- 561
- Forks
- 118
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 29
Description
At the moment it is only possible to use Type classes with a wildcard, thus loosing all type information
@import TypedCaseClass
@(typedCaseClass: TypedCaseClass[_])(implicit request: RequestHeader,
messages: Messages){
//...
}
It would be nice, if something like this would be possible:
@import TypedCaseClass
@[T](typedCaseClass: TypedCaseClass[T])(implicit request: RequestHeader,
messages: Messages){
//...
}
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
No files, tests, or entry points are identified. Start by reproducing the two template snippets and determine how the requested generic parameter syntax should preserve type information while keeping wildcard usage valid; done means the second example is supported without regressing the first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100