mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 02:07:53 +02:00
+ problem when passing a typecasted class instance to a var parameter
with -CR git-svn-id: trunk@2741 -
This commit is contained in:
parent
b063d47aa1
commit
b910a5da10
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
19
tests/test/trangeob.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user