In a unit I use the function DeleteFile
and the compiler outputs a hint:
\"H2443 Inline function \'DeleteFile\' has not been expanded because
It's an inlining restriction.
See Hallvard Vassbotn's article about Inlined Routines.
Extracted from that site:
The rest of the inlining restrictions are common for both platforms and the most important ones are
- no inlining across package boundaries
- the inlined routine cannot access implementation section identifiers
- the call site must have access to all identifiers used in the inlined routine
Note The last point means that unless the call site unit uses the units required by the routine, the routine cannot be inlined. When this happens, the compiler emits a hint like this
[Pascal Hint] InlinedRoutinesU.pas(14): H2443 Inline function 'InlineMe' has not been expanded because unit 'RequiredUnit' is not specified in USES list
To resolve the issue, add the missing unit name to the call site's uses clause.