@mh
I have the following IF THEN EXPRESSION code that gives me error E698: Untyped null values not allowed in tuple
method GetOperationByName(const aName: not nullable String): Tuple of (Boolean, Operation);
begin
var opPtr := TF_GraphOperationByName(ObjectPtr, aName.ToAnsiChars(true));
result := if assigned(opPtr) then
(true, new Operation withObjectPtr(opPtr) Name(aName))
else
(false, nil);
end;
However, it compiles fine, for the following code that uses normal IF THEN statements:
method GetOperationByName(const aName: not nullable String): Tuple of (Boolean, Operation);
begin
var opPtr := TF_GraphOperationByName(ObjectPtr, aName.ToAnsiChars(true));
if assigned(opPtr) then
result := (true, new Operation withObjectPtr(opPtr) Name(aName))
else
result := (false, nil);
end;
Is this expected?