Skip to content

Instantly share code, notes, and snippets.

@lrytz
Created September 18, 2019 20:09
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 lrytz/c0ab2cf7fe9c69343ee554ed11d8617d to your computer and use it in GitHub Desktop.
Save lrytz/c0ab2cf7fe9c69343ee554ed11d8617d to your computer and use it in GitHub Desktop.
scala> import annotation.unchecked.uncheckedStable
import annotation.unchecked.uncheckedStable
scala> class A { class B }
defined class A
scala> @uncheckedStable var a = new A
a: A = A@6885f3f7
scala> println(new a.B)
$line24.$read$$iw$$iw$A$B@38d308e7
scala> object O { @uncheckedStable def N = None }
defined object O
scala> def m(a: Any) = a match { case O.N => "rien" }
m: (a: Any)String
scala> m(None)
res2: String = rien
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment