2014-03-24 71 views
2

當定義油滑表突起這樣的:Scala中,如何通過同伴避免類方法的隱藏對象

def * = (id.?, email, human, langUser, langLearn) <> (User2.tupled, User2.unapply) 

我觀察到tupled方法只要我限定object User2變得不可見。

我的問題是怎麼回事,以及如何避免伴侶對象的方法隱藏。的

+0

[使用.tupled方法時伴隨目的是在類]的可能重複(HTTP:/ /stackoverflow.com/questions/22367092/using-tupled-method-when-companion-object-is-in-class) – nemo

回答

相關問題