Skip to content

Instantly share code, notes, and snippets.

@ymnk
Created December 5, 2011 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymnk/1432802 to your computer and use it in GitHub Desktop.
Save ymnk/1432802 to your computer and use it in GitHub Desktop.
$ scala
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) Client VM, Java 1.6.0_16).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :paste
// Entering paste mode (ctrl-D to finish)
trait X {
val a = ""
println(a)
}
trait Y extends {
override val a="?"
} with X
class Z extends Y
new Z
// Exiting paste mode, now interpreting.
null
defined trait X
defined trait Y
defined class Z
res0: Z = Z@151fe8a
scala>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment