Ian Branch 127 Posted August 29, 2023 (edited) Hi Uwe, D11.3, latest MMX. If I have this code in my type declaration: {code} .... procedure FormShow(Sender: TObject); procedure IndexOrdChange(Sender: TObject); private const iWidth = 920; end; implementation '''' {code} The function changes it to this: {code} .... procedure FormShow(Sender: TObject); procedure IndexOrdChange(Sender: TObject); private const <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< const iWidth = 920; end; implementation '''' {code} Which of course causes an error. If I have this: {code} .... procedure FormShow(Sender: TObject); {$IFDEF MyTest} procedure IndexOrdChange(Sender: TObject); {$ENDIF} private const iWidth = 920; end; implementation '''' {code} It removes the $IFDEF/$ENDIF block totally. Regards, Ian Edited August 29, 2023 by Ian Branch Share this post Link to post
Uwe Raabe 2058 Posted August 30, 2023 Thanks for reporting. I know that MMX has problems with those one-line declarations and conditional defines. I have added these two to the bug tracker. Share this post Link to post