+ test that should fail compilation and already fails (mantis #28355)

git-svn-id: trunk@38731 -
This commit is contained in:
Jonas Maebe 2018-04-10 19:34:22 +00:00
parent 1f9d518c57
commit dfb0869656
2 changed files with 33 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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
View 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.