mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 08:19:27 +02:00
parent
b05992b8a2
commit
47702aa3a5
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -8601,6 +8601,7 @@ tests/webtbf/tw13563a.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw1365.pp svneol=native#text/plain
|
tests/webtbf/tw1365.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw13815.pp svneol=native#text/plain
|
tests/webtbf/tw13815.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw1395.pp svneol=native#text/plain
|
tests/webtbf/tw1395.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw13992.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw1407.pp svneol=native#text/plain
|
tests/webtbf/tw1407.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw1432.pp svneol=native#text/plain
|
tests/webtbf/tw1432.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw1467.pp svneol=native#text/plain
|
tests/webtbf/tw1467.pp svneol=native#text/plain
|
||||||
@ -9161,6 +9162,7 @@ tests/webtbs/tw13872.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw13890.pp svneol=native#text/plain
|
tests/webtbs/tw13890.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw13948.pp svneol=native#text/plain
|
tests/webtbs/tw13948.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1398.pp svneol=native#text/plain
|
tests/webtbs/tw1398.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw13992a.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1401.pp svneol=native#text/plain
|
tests/webtbs/tw1401.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1407.pp svneol=native#text/plain
|
tests/webtbs/tw1407.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1408.pp svneol=native#text/plain
|
tests/webtbs/tw1408.pp svneol=native#text/plain
|
||||||
|
39
tests/webtbf/tw13992.pp
Normal file
39
tests/webtbf/tw13992.pp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{ new(property) should fail }
|
||||||
|
|
||||||
|
program test_prop;
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type
|
||||||
|
TMyRec = record
|
||||||
|
s: string;
|
||||||
|
end;
|
||||||
|
PMyRec = ^TMyRec;
|
||||||
|
|
||||||
|
TSomeClass = class
|
||||||
|
private
|
||||||
|
FMyRec: PMyRec;
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
|
property MyRec: PMyRec read FMyRec write FMyRec;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TSomeClass }
|
||||||
|
|
||||||
|
constructor TSomeClass.Create;
|
||||||
|
begin
|
||||||
|
New(MyRec);
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TSomeClass.Destroy;
|
||||||
|
begin
|
||||||
|
// Dispose(MyRec);
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
39
tests/webtbs/tw13992a.pp
Normal file
39
tests/webtbs/tw13992a.pp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ %norun }
|
||||||
|
|
||||||
|
{ dispose(property) should be accepted }
|
||||||
|
|
||||||
|
program test_prop;
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type
|
||||||
|
TMyRec = record
|
||||||
|
s: string;
|
||||||
|
end;
|
||||||
|
PMyRec = ^TMyRec;
|
||||||
|
|
||||||
|
TSomeClass = class
|
||||||
|
private
|
||||||
|
FMyRec: PMyRec;
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
|
property MyRec: PMyRec read FMyRec write FMyRec;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TSomeClass }
|
||||||
|
|
||||||
|
constructor TSomeClass.Create;
|
||||||
|
begin
|
||||||
|
// New(MyRec);
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TSomeClass.Destroy;
|
||||||
|
begin
|
||||||
|
Dispose(MyRec);
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user