Last active
August 29, 2015 14:26
-
-
Save jsuereth/bf94458a0d03035b58c3 to your computer and use it in GitHub Desktop.
Frustrating case class issue
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> case class Foo private(x: Int) | |
defined class Foo | |
scala> Foo(5) | |
res5: Foo = Foo(5) |
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> :paste | |
// Entering paste mode (ctrl-D to finish) | |
case class Foo private(x: Int) | |
Foo.apply(5) | |
// Exiting paste mode, now interpreting. | |
<console>:10: error: constructor Foo in class Foo cannot be accessed in object $iw | |
Foo.apply(5) | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment