mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
The optimization in unary operaror bypasses the necessary temporary variable in that case and must be disabled. Fixes #1181.
11 lines
93 B
Go
11 lines
93 B
Go
package main
|
|
|
|
func main() {
|
|
a, b := 1, 2
|
|
a, b = b, -a
|
|
println(a, b)
|
|
}
|
|
|
|
// Output:
|
|
// 2 -1
|