AssertionError in compiler
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with the Scala 2.13.1 reproducer linked in the issue and inspect the compiler failure during the refchecks phase, especially the transformCaseApply assertion for config. Verify the example and the explicit-type workaround, then confirm that the original code compiles without an AssertionError.
Written by the indexing model from the issue text.
Description
https://scastie.scala-lang.org/OlegYch/BlI4CHhuSGOBXIQdlRJcwg/2
import com.softwaremill.macwire._
case class Config(redis: Int)
case class B(redis: Int)
trait MacWireComponents2 {
def int: Int
lazy val config = wire[Config]
lazy val b = {
val redis = config.redis
B(redis)
}
}
throws
[error] java.lang.AssertionError: assertion failed:
[error] transformCaseApply: name = config tree = config / class scala.reflect.internal.Trees$Ident
[error] while compiling: MacWireComponents2.scala
[error] during phase: refchecks
[error] library version: version 2.13.1
[error] compiler version: version 2.13.1
adding explicit type to config works around it
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 77
- Avg merge
- 9m
- Merged PRs (30d)
- 4
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.
More from softwaremill/macwire
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
softwaremill/macwire#412 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
softwaremill/macwire#391 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
softwaremill/macwire#301 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
softwaremill/macwire#281 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
softwaremill/macwire#278 · 3 comments ·
All issues in softwaremill/macwire
Similar issues
-
ShuffleManagerRegistry.register recursion guard is inverted, permits GlutenShuffleManager subclasses Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
module: unknown type: bug/reported
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenXiangShan/XiangShan#6623 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100