Hello,

struct Value
{
    int value;
    string data;
    string[] text;
}

void test(const ref Value value)
{
    Value other = void;
    other.text = value.text;
}

void main()
{
    Value row;
    row.value = 10;
    row.data = "ttttggg";

    test(row);
}

I want to pass variable "row" inside function "test" as a read only parameter.
Inside I create another variable and try to assign field "text".
On that line I get:
Error: cannot implicitly convert expression value.text of type const(string[]) to string[].

1. How to assign correctly (and without dup/ugly cast())?
2. Or how to pass "row" correctly?

Reply via email to