jacks
jacks copied to clipboard
Case classes with companions are not always recognized
Case classes with companion objects are sometimes not recognized by Jacks. It seems that the problem is in ScalaTypeSig.cls computation — it selects the first available ClassSymbol, but the first one is something synthetic generated by a companion object. Here is a list of class symbols I have:
[info] ClassSymbol(CaseClass, owner=com.my.package, flags=400, info=25 ,None)
[info] ClassSymbol(CaseClass, owner=com.my.package, flags=40, info=43 ,None)
I use scala 2.10.4, jacks 2.3.3.
I solved the issue by adding && !c.isModule condition, but may be there are better alternatives