Skip to content

Instantly share code, notes, and snippets.

@alexarchambault
Created April 23, 2015 11:50
Show Gist options
  • Select an option

  • Save alexarchambault/105c705d03d6ee4fd6b7 to your computer and use it in GitHub Desktop.

Select an option

Save alexarchambault/105c705d03d6ee4fd6b7 to your computer and use it in GitHub Desktop.
@ object ODef { case class Foo(i: Int, s: String) }
defined object ODef
@ ODef.Foo(2, "ba")
res1: cmd0.ODef.Foo = Foo(2, "ba")
@ class CDef { case class Foo(i: Int, s: String) }
defined class CDef
@ object CDef extends CDef
defined object CDef
@ CDef.Foo(2, "ba")
res4: cmd3.CDef.Foo = Foo(2, "ba")
@ val cVal = new CDef
Compilation Failed
Main.scala:26: not found: type CDef
val cVal = new CDef
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment