Created
June 29, 2014 06:48
-
-
Save zen0wu/dc7922efa9df10f1ef6b 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
{ | |
val $u: `package`.this.universe.type = `package`.this.universe; | |
val $m: $u.Mirror = `package`.this.universe.runtimeMirror(this.getClass.getClassLoader); | |
$u.Expr.apply($m, { | |
final class $treecreator1 extends TreeCreator { | |
def apply[U >: Nothing <: Universe with Singleton]($m$untyped: Mirror[U]): (U)#Tree = { | |
val $u: U = $m$untyped.universe; | |
val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror]; | |
$u.Literal($u.Constant(3)) | |
} | |
}; | |
new $treecreator1() | |
})($u.TypeTag.apply($m, { | |
final class $typecreator2 extends TypeCreator { | |
def apply[U >: Nothing <: Universe with Singleton]($m$untyped: Mirror[U]): (U)#Type = { | |
val $u: U = $m$untyped.universe; | |
val $m: $u.Mirror = $m$untyped.asInstanceOf[$u.Mirror]; | |
$u.internal.reificationSupport.ConstantType($u.Constant(3)) | |
} | |
}; | |
new $typecreator2() | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment