The library builds on Delphi 10.2 Tokyo through 13
The library builds on older Delphi now: 10.2 Tokyo through 13. Nothing about how
it parses or evaluates has changed - this release is about which compilers will
accept the sources.
A version test the older compilers refused to read
One unit chose between two shapes of an iterator callback by testing a Free
Pascal version constant with an {$IF} expression. The test sat inside a branch
Delphi never takes, which felt safe enough. It is not: Delphi up to and
including 11 evaluates the expression anyway, meets a constant it has never
heard of, and stops with E2026. Measured on 10.2 before the fix: thirty-seven
of the fifty units the compiler is asked for did not build.
The choice is made by generation symbols now. A symbol either exists or it does
not, and nothing inside it has to be evaluated to find out.
An array literal that bound to the wrong type
Before Delphi 12, TStringDynArray and TArray<string> are two distinct types;
from 12 they are the same one. Two calls passed an array literal to a parameter
taken by reference, so on the older compilers the literal bound to the type the
call did not want. Both calls build their array in a variable first.
One unit belongs to Free Pascal alone
WinMem carries a MODE directive in its header, and Delphi cannot read it.
That has always been true. What is new is that it is written down where the
tooling can see it - PLATFORMS.tsv beside the sources - so the unit is excused
by declaration rather than by anyone remembering to excuse it.
The table below is measured, not assumed
Each Delphi version in it is a real installation. Before a release every one of
them compiles the units one at a time: 50 of the 51 build, and the one that does
not is WinMem, above. A version that is not in the table is not claimed.
Compatibility
| Delphi | 10.2 Tokyo through 13, win32 and win64 |
| Free Pascal | 3.2.2 and 3.3.1, win32 and win64 and linux64 |