mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 21:49:15 +02:00
compiler: Don't allow duplicate property/procedure identifiers inside object declaration. The code which allowed this for delphi mode was initially written based on invalid test from mantis #0009176. Fixes bug #0020580.
git-svn-id: trunk@19564 -
This commit is contained in:
parent
f685d67647
commit
b8589d98cc
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11002,6 +11002,7 @@ tests/webtbf/tw2037.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw2046.pp svneol=native#text/plain
|
tests/webtbf/tw2046.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2053.pp svneol=native#text/plain
|
tests/webtbf/tw2053.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2053b.pp svneol=native#text/plain
|
tests/webtbf/tw2053b.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw20580.pp svneol=native#text/pascal
|
||||||
tests/webtbf/tw2070.pp svneol=native#text/plain
|
tests/webtbf/tw2070.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2128.pp svneol=native#text/plain
|
tests/webtbf/tw2128.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2129.pp svneol=native#text/plain
|
tests/webtbf/tw2129.pp svneol=native#text/plain
|
||||||
|
@ -1295,11 +1295,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
|
||||||
if not(m_duplicate_names in current_settings.modeswitches) then
|
|
||||||
result:=inherited checkduplicate(hashedid,sym);
|
result:=inherited checkduplicate(hashedid,sym);
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
|
15
tests/webtbf/tw20580.pp
Normal file
15
tests/webtbf/tw20580.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{%fail}
|
||||||
|
{$ifdef fpc}
|
||||||
|
{$mode delphi}
|
||||||
|
{$endif}
|
||||||
|
type
|
||||||
|
TTestObject = class(TObject)
|
||||||
|
private
|
||||||
|
fValue: integer;
|
||||||
|
protected
|
||||||
|
property Value: integer read fValue write fValue;
|
||||||
|
property Value: integer read fValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user