Created
December 7, 2014 12:23
-
-
Save PkmX/e3e47e59655f29344d6e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Welcome to Scala version 2.11.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_71). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
object A { sealed trait B ; case object C extends B } | |
import A._ | |
class A(val b: B) | |
// Exiting paste mode, now interpreting. | |
defined object A | |
import A._ | |
defined class A | |
scala> :reset | |
Resetting interpreter state. | |
Forgetting all expression results and named terms: $intp, A | |
Forgetting defined types: A | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
object A { sealed trait B ; case object C extends B } | |
import A._ | |
class A(val b: B = C) | |
// Exiting paste mode, now interpreting. | |
<console>:9: error: not found: type B | |
class A(val b: B = C) | |
^ | |
<console>:9: error: not found: value C | |
class A(val b: B = C) | |
^ | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
object A { sealed trait B ; case object C extends B } | |
import A._ | |
class A(val b: A.B = A.C) | |
// Exiting paste mode, now interpreting. | |
defined object A | |
import A._ | |
defined class A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment