Created
December 5, 2011 08:04
-
-
Save ymnk/1432802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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