mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 19:39:45 +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;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{****************************************************************************
|
||||||
|
TCustomAttribute
|
||||||
|
****************************************************************************}
|
||||||
|
|
||||||
|
|
||||||
|
constructor TUnimplementedAttribute.Create;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TCustomStoredAttribute
|
TCustomStoredAttribute
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
@ -502,10 +502,16 @@
|
|||||||
constructor Create;
|
constructor Create;
|
||||||
end;
|
end;
|
||||||
{$POP}
|
{$POP}
|
||||||
WeakAttribute = class(TCustomAttribute);
|
|
||||||
UnsafeAttribute = class(TCustomAttribute);
|
TUnimplementedAttribute = class(TCustomAttribute)
|
||||||
RefAttribute = class(TCustomAttribute);
|
public
|
||||||
VolatileAttribute = class(TCustomAttribute);
|
constructor Create; unimplemented;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WeakAttribute = class(TUnimplementedAttribute);
|
||||||
|
UnsafeAttribute = class(TUnimplementedAttribute);
|
||||||
|
RefAttribute = class(TUnimplementedAttribute);
|
||||||
|
VolatileAttribute = class(TUnimplementedAttribute);
|
||||||
|
|
||||||
StoredAttribute = Class(TCustomAttribute)
|
StoredAttribute = Class(TCustomAttribute)
|
||||||
Private
|
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