mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 13:45:58 +02:00
+ test that should fail compilation and already fails (mantis #28355)
git-svn-id: trunk@38731 -
This commit is contained in:
parent
1f9d518c57
commit
dfb0869656
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14386,6 +14386,7 @@ tests/webtbf/tw2752.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2787.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2795.pp svneol=native#text/plain
|
||||
tests/webtbf/tw28338.pp svneol=native#text/plain
|
||||
tests/webtbf/tw28355.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2853.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2853a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2853b.pp svneol=native#text/plain
|
||||
|
32
tests/webtbf/tw28355.pp
Normal file
32
tests/webtbf/tw28355.pp
Normal file
@ -0,0 +1,32 @@
|
||||
{ %fail }
|
||||
|
||||
Program FPC30821_Bug;
|
||||
{$mode objfpc}
|
||||
{$modeswitch advancedrecords}
|
||||
|
||||
type
|
||||
TStringWithCounter = record
|
||||
Data : String;
|
||||
Counter : Integer;
|
||||
function Create( Const s : String; i : Integer) : TStringWithCounter;
|
||||
end;
|
||||
|
||||
ttest = class
|
||||
public
|
||||
procedure test();
|
||||
end;
|
||||
|
||||
function TStringWithCounter.Create( Const s : String; i : Integer) : TStringWithCounter;
|
||||
begin
|
||||
Result.Data := s;
|
||||
Result.Counter := i;
|
||||
end;
|
||||
|
||||
procedure ttest.test();
|
||||
begin
|
||||
TStringWithCounter.Create('aa', 5); // => no error, but I think should be an error
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user