48c763c098
The prestate for calls was getting set incorrectly to the poststate for the operator in the call. This worked before since most of the time, operator expressions are pure. Issue 1895 shows how this breaks when the operator is a closure that has a move-in capture clause. (I had a several-day, multi-file patch for this that didn't work... and then it turned out to be a one-line fix. The joys of programming.) Closes #1895
8 lines
91 B
Rust
8 lines
91 B
Rust
fn main() {
|
|
let x = 1;
|
|
let y = fn@[move x]() -> int {
|
|
x
|
|
}();
|
|
}
|
|
|