The code question compiles and runs fine without
{$MODESWITCH ADVANCEDRECORDS}It is the PParser unit that can't parse it.
However, I added
{$MODESWITCH ADVANCEDRECORDS}.
It compiles and runs as expected, but PParser unit still can't parse it.
So far PParser parses every other unit I've thrown at it, except for:
- types with <T: class> in them
- strict private
- types with function references in them
I filed an issue on the first,
types with <T: class> in them**s://gitlab.com/freepascal.org/fpc/source/-/issues/39931