Error: access of union field 'Pointer' while field 'Optional' is active

input is an optional so you have to access its value via .? in the free call:

defer allocator.free(input.?);

The error message most definitely does not help.

4 Likes