errors and warnings / parsing / E0111
E0111 error
Compound assignment with multiple targets
- area
- parsing (x01xx)
- fails the build
- yes
A compound assignment (+=, ..=, ??=, …) has several targets, as in
a, b += 1. Compound assignment takes exactly one target; write one
statement per variable.
Example
local kills, deaths = 0, 0kills, deaths += 1print(kills, deaths)local kills, deaths = 0, 0kills += 1deaths += 1print(kills, deaths)The compiler reports it like this:
error[E0111]: compound assignment has a single target ┌─ src/main.wowlua:2:15 │ 2 │ kills, deaths += 1 │ ^^ here
Offline
$ wowlua explain E0111 E0111 (error): Compound assignment with multiple targets