softwaremill / softwaremill/macwire
Unclear compilation error using valsByClass
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 77
- Avg merge
- 9m
- Merged PRs (30d)
- 4
Description
I get the following error trying to compile Global.scala for play framework
[error] C:\Trader\app\Global.scala:7: type mismatch;
[error] found : Any
[error] required: AnyRef
[error] val instanceLookup = InstanceLookup(valsByClass(ProdModule))
[error] ^
ProdModule is an object and inherits from other traits. My problem is I cannot understand what causes this error or how to debug it.
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
Start with the compilation error in Global.scala, especially the valsByClass(ProdModule) expression passed to InstanceLookup. Trace the inferred types of ProdModule and valsByClass and compare them with the type InstanceLookup accepts. Done means explaining the Any versus AnyRef mismatch and identifying whether the library or the calling code needs correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100