Recent

Author Topic: [Solved] Is it FGL unit error?  (Read 1419 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
[Solved] Is it FGL unit error?
« on: March 04, 2021, 07:21:34 pm »
https://github.com/graemeg/freepascal/blob/master/rtl/objpas/fgl.pp

Code: Pascal  [Select][+][-]
  1. class function TFPGList.ItemIsManaged: Boolean;
  2. begin
  3. {$IFNDEF VER3_0}
  4.   Result:=IsManagedType(T);
  5. {$ELSE}
  6.   Result:=True; // Fallback to old behaviour  
  7. {$ENDIF}
  8. end;
  9.  

Here IsManagedType is called for older FPC before 3.0? is it correct?
« Last Edit: March 04, 2021, 10:13:53 pm by Alextp »

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: Is it FGL unit error?
« Reply #1 on: March 04, 2021, 08:54:23 pm »
Weel, since pre-3.0 is not supported anymore, this is OK.
It simply won't compile in 2.x.

Bart

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Is it FGL unit error?
« Reply #2 on: March 04, 2021, 09:02:34 pm »
I wonder about the use of this if it is virtual method anyway :)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Is it FGL unit error?
« Reply #3 on: March 04, 2021, 09:12:04 pm »
Don't we need to use
Result:=IsManagedType(T);
for 3.2 and 3.3? Now it's failed to do so.

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: Is it FGL unit error?
« Reply #4 on: March 04, 2021, 09:40:41 pm »
ver3_0 is not defined for 3.2 I would guess, so it would indeed use IsManagedType?

Bart

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Is it FGL unit error?
« Reply #5 on: March 04, 2021, 10:13:41 pm »
Sorry, my bad, It's OK.

 

TinyPortal © 2005-2018