Skip to content

Commit 6f175d3

Browse files
committed
Adapt @with to work with minor change from JuliaSyntax.jl
The reference parser parses the `=` in `@x(y=1)` as `Expr(:(=))` but the `=` in `@x(y=1) do y end` as `Expr(:kw)`. In JuliaSyntax, we've corrected this inconsistency as a minor change to the parsing rules, but this breaks the `@with` macro in this package (And one macro in `Fluxperimental` - the only two cases in General.) Found as part of the integration work in JuliaLang/julia#46372
1 parent 87858a7 commit 6f175d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/internal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macro with(doblock::Expr, bindings...)
3636
@gensym err ans handled context
3737
if b isa Symbol
3838
value = resource = b
39-
elseif Meta.isexpr(b, :kw, 2)
39+
elseif Meta.isexpr(b, (:kw,:(=)), 2)
4040
value, resource = b.args
4141
if value === :_
4242
@gensym value

0 commit comments

Comments
 (0)