@dibblego Because you created object Person. If you'd let compiler autogenerate it, it'd've implemented Function2[Whateva, Whateva] aptly.
Why does line 16 of this #scala code compile but line 12 does not? https://gist.github.com/3088749
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@dibblego Method is still auto-generated, but the responsibility to mix in the apt traits is on you. Not sure if that's good or bad. -
@missingfaktor +1 (StackOverflow style) for your answer ;) - Show replies
New conversation -
-
-
@dibblego in such case I tend to do ap(Person.apply _) ... but I would really like to know what's happen. drive me nuts :-(Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@dibblego Add "extends ((String, Int) => Person)" to your "object Person" definition. This is what case class companions normally have. -
@erikrozendaal normally? You sure it is normal?
End of conversation
New conversation -
-
-
@asflierl thank you! :)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.