Consider the following snippet:
requires
designide,
rtl,
vcl,
{$IF RTLVersion < 19.0} // E2026 Constant expression expected
//{$IF CompilerVersion = 22.0} // same as above
vcljpg;
{$ELSE}
vclimg;
{$IFEND}
It seems to be absolutely syntactically correct. However, the compiler chokes on it and reports Constant expression expected
. What really happens here?
Technical: currently tested on XE (15.0.3953.35171) only.
Of course, workaround suggestions are welcome too.
{$IF RTLVersion < 19.0}
test works if used after thecontains
clause. – Hibernicism