mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Reset return value flag on reference assignment
This commit is contained in:
parent
04e2256c92
commit
8f98e16e5e
@ -436,6 +436,7 @@ namespace chaiscript
|
|||||||
else if (this->children[1]->text == ":=") {
|
else if (this->children[1]->text == ":=") {
|
||||||
if (lhs.is_undef() || Boxed_Value::type_match(lhs, rhs)) {
|
if (lhs.is_undef() || Boxed_Value::type_match(lhs, rhs)) {
|
||||||
lhs.assign(rhs);
|
lhs.assign(rhs);
|
||||||
|
lhs.reset_return_value();
|
||||||
} else {
|
} else {
|
||||||
throw exception::eval_error("Mismatched types in equation");
|
throw exception::eval_error("Mismatched types in equation");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user