Recent

Author Topic: uses unit decalration order (fpc324RC1)  (Read 446 times)

Paolo

  • Hero Member
  • *****
  • Posts: 694
uses unit decalration order (fpc324RC1)
« on: March 07, 2026, 12:31:56 pm »
hello,

just downloaded and installed Laz 4.6 with fpc324RC1 snapshot (win64).
all went fine, except:

I have a unit with

Code: Pascal  [Select][+][-]
  1. uses
  2.   .., Graphics,.. , Suystem.UITypes,..;
  3.  
  4. and a line with
  5.  
  6. ..
  7. FTitleFont.Style:=[fsBold];
  8. ..
  9.  

this code compile fine with Laz4.2/fpc322,

but to work with fpc324RC1 I have to revert the uses declaration

Code: Pascal  [Select][+][-]
  1. uses
  2.   .., System.UITypes,.. , Graphics,..;
  3.  
  4. and a line with
  5.  
  6. ..
  7. FTitleFont.Style:=[fsBold];
  8. ..
  9.  

any rationale for that ?

for sure there is a conficting declaration inside the two units, but why mu old code with fpc322 works and with fpc324RC1 doesn't ?

Saluti.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12296
  • Debugger - SynEdit - and more
    • wiki
Re: uses unit decalration order (fpc324RC1)
« Reply #1 on: March 07, 2026, 12:55:41 pm »
Probably a problem with the ifdef in graphics
Code: Pascal  [Select][+][-]
  1.   {$IF FPC_FULLVERSION>=30300}

For older fpc graphic defines  a TFontStyle in the unit Graphic. And even if it has the same declaration, it is a distinct type.

For FPC trunk, its just a forward in graphics
  TFontStyle = System.UITypes.TFontStyle;

But FPC 3.2.4 or 3.2.3 is older.

Probably the ifdef needs to check >= 30203


Please report on the issue tracker, I currently don't have the time to make the change. And it will be forgotten if not reported.

Paolo

  • Hero Member
  • *****
  • Posts: 694
Re: uses unit decalration order (fpc324RC1)
« Reply #2 on: March 07, 2026, 01:27:47 pm »
Ok. Later after lunch.
Do I have to open the ticket in laz or fpc bug tracker ?
« Last Edit: March 07, 2026, 02:11:35 pm by Paolo »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12296
  • Debugger - SynEdit - and more
    • wiki

 

TinyPortal © 2005-2018