-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)macros@macros@macros
Description
Maybe this is simpler than I think, but ChrisRackauckas/ParallelDataTransfer.jl#14 seems to demonstrate that using @sync from outside the Main module gives an issue with let. MWE:
module Tester
macro tester()
quote
@sync for i in 1:5
println(i)
end
end
end
end
using Main.Tester
Tester.@testerthrows
syntax: invalid let syntax
include_string(::Module, ::String, ::String) at loading.jl:1002
include_string(::Module, ::String, ::String, ::Int64) at eval.jl:30
(::getfield(Atom, Symbol("##110#115")){String,Int64,String})() at eval.jl:89
withpath(::getfield(Atom, Symbol("##110#115")){String,Int64,String}, ::String) at utils.jl:30
withpath at eval.jl:46 [inlined]
#109 at eval.jl:88 [inlined]
hideprompt(::getfield(Atom, Symbol("##109#114")){String,Int64,String}) at repl.jl:76
macro expansion at eval.jl:87 [inlined]
(::getfield(Atom, Symbol("##108#113")){Dict{String,Any}})() at task.jl:85Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)macros@macros@macros