View Issue Details

IDProjectCategoryView StatusLast Update
0037601FPCRTLpublic2020-08-20 22:10
Reporterravi dion Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037601: Add TCustomAttribute descendants
DescriptionPlease add the missing classes
  WeakAttribute = class(TCustomAttribute);
  UnsafeAttribute = class(TCustomAttribute);
  RefAttribute = class(TCustomAttribute);
  VolatileAttribute = class(TCustomAttribute);

after
       {$PUSH}
       { disable the warning that the constructor should be public }
       {$WARN 3018 OFF}
       TCustomAttribute = class(TObject)
       private
         { if the user wants to use a parameterless constructor they need to
           explicitely declare it in their type }
         constructor Create;
       end;
       {$POP}
Additional Informatione.g.
http://docwiki.embarcadero.com/Libraries/Sydney/en/System.WeakAttribute
http://docwiki.embarcadero.com/Libraries/Sydney/en/System.RefAttribute
TagsNo tags attached.
Fixed in Revision46505
FPCOldBugId
FPCTarget3.2.2
Attached Files

Activities

Marco van de Voort

2020-08-20 00:45

manager   ~0125003

That documentation is near useless, and doesn't describe at all what the classes are supposed to do (other than inheriting from TCustomAttribute)

Sven Barth

2020-08-20 10:18

manager   ~0125008

You might better look at the Compiler Attributes documentation: http://docwiki.embarcadero.com/RADStudio/Rio/en/Compiler_Attributes

With that said: even if we add those attributes to the RTL this does not mean that the compiler suddenly handles them as that page describes.

Michael Van Canneyt

2020-08-20 13:55

administrator   ~0125016

Including the definitions will allow people to compile their code.
The compiler simply does not honor the special meaning of these attributes - that's another feature request...

ravi dion

2020-08-20 22:10

reporter   ~0125035

Thx!

Issue History

Date Modified Username Field Change
2020-08-19 22:17 ravi dion New Issue
2020-08-20 00:45 Marco van de Voort Note Added: 0125003
2020-08-20 10:18 Sven Barth Note Added: 0125008
2020-08-20 13:55 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-08-20 13:55 Michael Van Canneyt Status new => resolved
2020-08-20 13:55 Michael Van Canneyt Resolution open => fixed
2020-08-20 13:55 Michael Van Canneyt Fixed in Version => 3.3.1
2020-08-20 13:55 Michael Van Canneyt Fixed in Revision => 46505
2020-08-20 13:55 Michael Van Canneyt FPCTarget => 3.2.2
2020-08-20 13:55 Michael Van Canneyt Note Added: 0125016
2020-08-20 22:10 ravi dion Status resolved => closed
2020-08-20 22:10 ravi dion Note Added: 0125035