Advertisement
Guest User

Untitled

a guest
Mar 15th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.20 KB | None | 0 0
  1. class FooBar {
  2.    
  3.     def Foo(s: String): Unit = println(s)
  4.    
  5.     // This does not work
  6.     Foo "Bar"
  7.    
  8.     // This works
  9.     this Foo "Bar"
  10.    
  11.     // Equivalent to
  12.     Foo("Bar")
  13.    
  14.     // ... or
  15.     this.Foo("Bar")
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement