mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-29 07:59:20 +02:00
* allow reintroduce for objects, resolves #14743
git-svn-id: trunk@13832 -
This commit is contained in:
parent
44aed2af60
commit
b8a83fd997
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9320,6 +9320,7 @@ tests/webtbs/tw14617.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1470.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1472.pp svneol=native#text/plain
|
||||
tests/webtbs/tw14740.pp svneol=native#text/plain
|
||||
tests/webtbs/tw14743.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw1477.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1479.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1485.pp svneol=native#text/plain
|
||||
|
@ -1376,7 +1376,7 @@ procedure pd_reintroduce(pd:tabstractprocdef);
|
||||
begin
|
||||
if pd.typ<>procdef then
|
||||
internalerror(200401211);
|
||||
if not(is_class_or_interface(tprocdef(pd)._class)) then
|
||||
if not(is_class_or_interface_or_object(tprocdef(pd)._class)) then
|
||||
Message(parser_e_no_object_reintroduce);
|
||||
end;
|
||||
|
||||
|
22
tests/webtbs/tw14743.pp
Normal file
22
tests/webtbs/tw14743.pp
Normal file
@ -0,0 +1,22 @@
|
||||
{$mode delphi}
|
||||
program tbreintroduce;
|
||||
|
||||
type
|
||||
parent = object
|
||||
constructor init;
|
||||
end;
|
||||
|
||||
child = object(parent)
|
||||
constructor init(a : byte);reintroduce;
|
||||
end;
|
||||
|
||||
constructor parent.init;
|
||||
begin
|
||||
end;
|
||||
|
||||
constructor child.init(a : byte);
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user