Last active
August 29, 2015 14:22
-
-
Save tmlbl/a6541e33b094c463f63c to your computer and use it in GitHub Desktop.
Macro problems
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
macro stringall(msg...) | |
return :(join(map((i) -> string(eval(i)), $msg), " ")) | |
end | |
x = "foo" | |
function test() | |
x = "bar" | |
global y = "baz" | |
@stringall x y | |
end | |
@assert test()=="bar baz" # fails: returns "foo baz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment