Guest User

Untitled

a guest
Apr 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // when can you safely omit parens for functions with args in the repl?
  2.  
  3. // not here
  4. def can(b: Any) = b
  5. can "dance"
  6. <console>:1: error: ';' expected but string literal found.
  7. can "dance"
  8.  
  9. // not here
  10. def can[B](b: B) = b
  11. can "dance"
  12. <console>:1: error: ';' expected but string literal found.
  13. can "dance"
  14.  
  15. // when there is a class binding?
  16. class I {
  17. def can(b: Any) = b
  18. }
  19. new I can "dance" // => "dance"
Add Comment
Please, Sign In to add comment