Created
June 20, 2014 18:12
-
-
Save retronym/c97eb74f8c780f4f8fec to your computer and use it in GitHub Desktop.
Block vs q"{ ... }"
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> q"{0; val x = 0}" | |
res6: $r.intp.global.Tree = | |
{ | |
0; | |
val x = 0; | |
() | |
} | |
scala> Block(q"0" :: Nil, q"val x = 0") | |
res7: $r.intp.global.Block = | |
{ | |
0; | |
val x = 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment