Codetools parsing for garbage in {$IF } blocks
Original Reporter info from Mantis: zpeterson @boramis
-
Reporter name: Zoë Peterson
Original Reporter info from Mantis: zpeterson @boramis
- Reporter name: Zoë Peterson
Description:
The new macOS headers in FPC includes this apparently malformed line that the compiler accepts:
{$if defined(OBJC2)defined(interface)defined(NSExtensionContext)defined(NSObject)}
According to Jonas ( https://lists.freepascal.org/pipermail/fpc-pascal/2019-August/056637.html ):
"Borland-style compilers (and hence FPC as well) ignore all invalid tokens/characters at the end of an if/
if(n)def directive. So the above is equivalent to {$if defined(OBJC2)}."
Currently it breaks the code tools and prevents accessing any of the inherited Objective C classes when working with the Lazarus LCLCOCOA widgetset. See also https://bugs.freepascal.org/view.php?id=35995
Mantis conversion info:
- Mantis ID: 36026
- Assignee Gitlab user: @PascalRiekenberg
- Assignee Mantis username: PascalR
- Assignee name: Pascal Riekenberg
- Version: 2.0.4