Value::copyIn() add Array -> Array w/ implied alloc+convert

This commit is contained in:
Michael Davidsaver
2023-02-19 10:01:25 -08:00
parent 4029f5ac3c
commit af3c870b7a
2 changed files with 16 additions and 1 deletions
+4 -1
View File
@@ -635,8 +635,11 @@ void Value::copyIn(const void *ptr, StoreType type)
// assign array of scalar w/o convert
dest = src;
} else if(src.original_type()!=ArrayType::Value) {
// assign array of scalar w/ implicit conversion
dest = detail::copyAs(desc->code.arrayType(), src.original_type(), src.data(), src.size()).freeze();
} else {
// TODO: alloc and convert
throw NoConvert(SB()<<"Unable to assign "<<desc->code<<" with "<<type);
}
break;