expand Any assignment

This commit is contained in:
Michael Davidsaver
2020-03-17 09:30:46 -07:00
parent 3596a65afc
commit 0782591053
+5 -1
View File
@@ -684,8 +684,12 @@ void Value::copyIn(const void *ptr, StoreType type)
case StoreType::Compound:
if(desc->code==TypeCode::Any) {
// assigning variant union.
auto& val = store->as<Value>();
if(type==StoreType::Compound) {
store->as<Value>() = *reinterpret_cast<const Value*>(ptr);
val = *reinterpret_cast<const Value*>(ptr);
break;
} else {
val = Value::Helper::build(ptr, type);
break;
}
}