-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In expressions/expressions_in_templates.zs there is an optional field with default value:
struct ArrayExpressions<T>
{
T array[2];
bool isZeroArrayValid = true if array[0] == 0 && array[1] == 0;
};
During write operation validate() enforces the condition so isZeroArrayValid has to be nullopt when array elements are nonzero.
But during read operation isZeroArrayValid is first initialized to true in the ctor. Then the read operation doesn't reset it so it stays true. Therefore
writeReadTest comparison and validate both fails after a read operation.
Optional fields should be reset during read op.
mikir
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working