Skip to content

Instantly share code, notes, and snippets.

@apskii
Created December 2, 2012 15:10
Show Gist options
  • Save apskii/4189264 to your computer and use it in GitHub Desktop.
Save apskii/4189264 to your computer and use it in GitHub Desktop.
import scala.reflect.runtime.universe._
import scala.tools.reflect.Eval
object O {
type A = {
type B = {
type C = O.type
}
}
}
object Test extends App {
val x: O.A = new {
type B = O.A#B
}
val y: x.B = new {
type C = x.B#C
}
def expr = reify {
val a: O.A = x
val b: x.B = y
val c: y.C = O
}
println(expr.eval)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment