+ problem when passing a typecasted class instance to a var parameter

with -CR

git-svn-id: trunk@2741 -
This commit is contained in:
Jonas Maebe 2006-03-04 20:17:29 +00:00
parent b063d47aa1
commit b910a5da10
2 changed files with 20 additions and 0 deletions

1
.gitattributes vendored
View File

@ -5710,6 +5710,7 @@ tests/test/trange2.pp svneol=native#text/plain
tests/test/trange3.pp svneol=native#text/plain
tests/test/trange4.pp svneol=native#text/plain
tests/test/trange5.pp svneol=native#text/plain
tests/test/trangeob.pp svneol=native#text/plain
tests/test/tresstr.pp svneol=native#text/plain
tests/test/trtti1.pp svneol=native#text/plain
tests/test/trtti2.pp svneol=native#text/plain

19
tests/test/trangeob.pp Normal file
View File

@ -0,0 +1,19 @@
{ %opt=-CR -S2 }
type
tc1 = class
end;
tc2 = class(tc1)
end;
procedure t(var c: tc2);
begin
end;
var
c: tc1;
begin
c := tc2.create;
t(tc2(c));
end.