- changed status to resolved
Invalid value Boolean when array of record
Issue #223
resolved
I am using an up-to-date version of DwScript, I found a case that my scripts stopped working. I found the cause which is demonstrated below.
When I define an array of record and the Boolean field is at least second in order, the value of the Boolean variable will be invalid.
type
TRec = record
S: String; // comment to be OK
B: Boolean;
end;
var tmpA: array of TRec;
tmpA.SetLength(1);
tmpA[0].B := True;
Assert(tmpA[0].B = True);
Comments (1)
-
repo owner - Log in to comment
Fixed Issue
#223incorrect implementation in TArrayElementDataContext.GetAsBoolean which would manifest when a boolean field of a record in a dynamic array was read-accessed as a boolean + test→ <<cset a1ffb463a156>>