Skip to content

Instantly share code, notes, and snippets.

@arturaz
Created January 27, 2012 16:37
Show Gist options
  • Save arturaz/1689657 to your computer and use it in GitHub Desktop.
Save arturaz/1689657 to your computer and use it in GitHub Desktop.
scala> arturas@zeus:~/work/spacegame/server$ scala
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :paste
// Entering paste mode (ctrl-D to finish)
object A { def t = 3 }
class A { def t = 4 }
// Exiting paste mode, now interpreting.
defined module A
defined class A
scala> A.t
res0: Int = 3
scala> (new A).t
res1: Int = 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment