Skip to content

Commit 4076e2b

Browse files
committed
fix #2378
1 parent 18a9e5c commit 4076e2b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

base/client.jl

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function eval_user_input(ast::ANY, show_value)
5858
println()
5959
iserr, lasterr = false, ()
6060
else
61+
ast = expand(ast)
6162
value = eval(Main,ast)
6263
global ans = value
6364
if !is(value,nothing) && show_value

src/jlfrontend.scm

+4-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@
135135
(parser-wrap (lambda ()
136136
(let* ((inp (make-token-stream (open-input-string s)))
137137
(expr (julia-parse inp)))
138-
(expand-toplevel-expr expr)))))
138+
;; delay expansion so macros run in the Task executing
139+
;; the input, not the task parsing it (issue #2378)
140+
expr
141+
#;(expand-toplevel-expr expr)))))
139142

140143
;; parse file-in-a-string
141144
(define (jl-parse-string-stream str)

0 commit comments

Comments
 (0)