Files
moxa/_test/issue-1181.go
Marc Vertes 4fcf90edae interp: fix swap assign with extra operation
The optimization in unary operaror bypasses the necessary temporary
variable in that case and must be disabled.

Fixes #1181.
2021-07-12 18:00:09 +02:00

11 lines
93 B
Go

package main
func main() {
a, b := 1, 2
a, b = b, -a
println(a, b)
}
// Output:
// 2 -1