Community
Participate
Working Groups
I have the following records (note 'c' is marked as nullable): record CustomerWithResults r Results; c Customer?; end record Results succeeded boolean; returnCode int; end record Customer id int; name string; end If I define a function that populates a CustomerWithResults (i.e. sets a new Results on the 'r' field and a Customer on the 'c' field) and returns it, the 'c' (Customer) value is returned as null (regardless of whether the value was null or not). If I make the 'c' field non-nullable, the field's value is not lost when returned. So, something is happening with record fields marked as nullable. See TestRecords.egl, TestService.egl, and TestHandler.egl in the attached project. TestService.getCustomerWithResults() demonstrates the problem.
Created attachment 208650 [details] Sample project that demonstrates the issue.
If I add a nullable primitive (see 'test') to the CustomerWithResults record ... record CustomerWithResults r Results; c Customer?; test int?; end The value of 'test' is not lost when returned from my function. So, it seems the issue may be specific to nullable record fields in a record, not necessarily nullable primitive fields.
fixed
Verified in 2/20 nightly build.