Guest User

Untitled

a guest
Jul 21st, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. case class User(name: String, id: Long = 0L)
  2.  
  3. object User {
  4. def apply(name: String, id: Long): User =
  5. User(name, (id == 0L) ? <some random number> : id)
  6. }
  7.  
  8. ambiguous reference to overloaded definition
  9. ...
  10. method apply is defined twice
Add Comment
Please, Sign In to add comment