jacks icon indicating copy to clipboard operation
jacks copied to clipboard

Case classes with companions are not always recognized

Open rtimush opened this issue 12 years ago • 1 comments

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.

rtimush avatar Apr 29 '14 12:04 rtimush

I solved the issue by adding && !c.isModule condition, but may be there are better alternatives

rtimush avatar Apr 29 '14 12:04 rtimush