mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 06:29:32 +02:00
* fix #40592: make the Delphi-compatible attributes usable, but in a way that makes it clear to the user that they won't work
+ added test
This commit is contained in:
parent
1ffef6ed41
commit
dd4f7e9148
@ -1308,6 +1308,18 @@ end;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
TCustomAttribute
|
||||
****************************************************************************}
|
||||
|
||||
|
||||
constructor TUnimplementedAttribute.Create;
|
||||
begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
TCustomStoredAttribute
|
||||
****************************************************************************}
|
||||
|
@ -502,10 +502,16 @@
|
||||
constructor Create;
|
||||
end;
|
||||
{$POP}
|
||||
WeakAttribute = class(TCustomAttribute);
|
||||
UnsafeAttribute = class(TCustomAttribute);
|
||||
RefAttribute = class(TCustomAttribute);
|
||||
VolatileAttribute = class(TCustomAttribute);
|
||||
|
||||
TUnimplementedAttribute = class(TCustomAttribute)
|
||||
public
|
||||
constructor Create; unimplemented;
|
||||
end;
|
||||
|
||||
WeakAttribute = class(TUnimplementedAttribute);
|
||||
UnsafeAttribute = class(TUnimplementedAttribute);
|
||||
RefAttribute = class(TUnimplementedAttribute);
|
||||
VolatileAttribute = class(TUnimplementedAttribute);
|
||||
|
||||
StoredAttribute = Class(TCustomAttribute)
|
||||
Private
|
||||
|
19
tests/webtbs/tw40592.pp
Normal file
19
tests/webtbs/tw40592.pp
Normal file
@ -0,0 +1,19 @@
|
||||
{ %NORUN }
|
||||
|
||||
program tw40592;
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch prefixedattributes}
|
||||
|
||||
type
|
||||
[Volatile]
|
||||
[Unsafe]
|
||||
[Weak]
|
||||
[Ref]
|
||||
TTest = class
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user