# Keyword arguments not allowed on left-hand side of broadcast assignments?

**URL:** <https://discourse.julialang.org/t/keyword-arguments-not-allowed-on-left-hand-side-of-broadcast-assignments/133920>\
**Category:** General Usage\
**Tags:** broadcast, keyword-arguments, assignment\
**Created:** [November 17, 2025, 2:32am UTC](https://discourse.julialang.org/t/keyword-arguments-not-allowed-on-left-hand-side-of-broadcast-assignments/133920 "2025-11-17T02:32:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Post date:** [November 17, 2025, 2:32am UTC](https://discourse.julialang.org/t/keyword-arguments-not-allowed-on-left-hand-side-of-broadcast-assignments/133920/1 "2025-11-17T02:32:35Z")

</div>

Broadcasting with assignment works with a function call on the left-hand side. However, function calls with keyword arguments do not work for some reason:

```julia-auto
julia> f(v; a = 0) = copy(v)
f (generic function with 1 method)

julia> f([1, 2, 3]) .*= 2
3-element Vector{Int64}:
 2
 4
 6

julia> f([1, 2, 3]; a = 1) .*= 2
ERROR: syntax: invalid syntax ; (thismodule).a = 1
Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

```

Is this a known issue? I don’t see why one form should be allowed and the other one not.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [November 17, 2025, 3:18am UTC](https://discourse.julialang.org/t/keyword-arguments-not-allowed-on-left-hand-side-of-broadcast-assignments/133920/3 "2025-11-17T03:18:44Z")

</div>

> [@matthias314](#):
>
> Is this a known issue? I don’t see why one form should be allowed and the other one not.

I agree that it seems like this should work. I haven’t seen the issue reported before, probably because using the syntax this way is a bit unusual.

(A similar error occurs with Julia 1.9.4, which uses the old Scheme parser, so the problem doesn’t seem specific to the new JuliaSyntax.jl. In fact, `Meta.parse("f([1,2,3]; a=1) .*= 2")` succeeds so it doesn’t seem to be a parser issue at all, but rather a problem in the lowering phase.)
