clever-lang/clever — Issue #94: Value::copy() does not work with non-primitive types
Author: muriloadriano
Created: 2012-02-08 01:56:15+00:00
State: open
Labels: Compiler, Type

Actualy, `Value::copy()` works as follows:

```
void copy(const Value* const value) {
std::memcpy(&m_data, value->getData(), sizeof(ValueData));
m_type_ptr = value->getTypePtr();
}
```

But when copying non-primitive types, a deep copy of members of `ValueData` like `dv_value` and `v_value` is required.