mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 17:59:25 +02:00
* for tp mode don't allow unitname reuse
git-svn-id: trunk@8158 -
This commit is contained in:
parent
5e60b52f28
commit
0fc65c5eec
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7365,6 +7365,7 @@ tests/webtbf/tw6631.pp svneol=native#text/plain
|
||||
tests/webtbf/tw6686.pp svneol=native#text/plain
|
||||
tests/webtbf/tw6796.pp svneol=native#text/plain
|
||||
tests/webtbf/tw6922.pp svneol=native#text/plain
|
||||
tests/webtbf/tw6957.pp -text
|
||||
tests/webtbf/tw6970.pp svneol=native#text/plain
|
||||
tests/webtbf/tw7070.pp svneol=native#text/plain
|
||||
tests/webtbf/tw7322.pp svneol=native#text/plain
|
||||
|
@ -787,8 +787,9 @@ implementation
|
||||
else
|
||||
begin
|
||||
{ when the other symbol is a unit symbol then hide the unit
|
||||
symbol }
|
||||
if (srsym.typ=unitsym) then
|
||||
symbol, this is not supported in tp7 }
|
||||
if not(m_tp7 in current_settings.modeswitches) and
|
||||
(srsym.typ=unitsym) then
|
||||
begin
|
||||
HideSym(srsym);
|
||||
searchagain:=true;
|
||||
|
@ -1256,10 +1256,10 @@ implementation
|
||||
hsym:=tsym(FindWithHash(hashedid));
|
||||
if assigned(hsym) then
|
||||
begin
|
||||
{ Delphi you can have a symbol with the same name as the
|
||||
{ Delphi (contrary to TP) you can have a symbol with the same name as the
|
||||
unit, the unit can then not be accessed anymore using
|
||||
<unit>.<id>, so we can hide the symbol }
|
||||
if (m_duplicate_names in current_settings.modeswitches) and
|
||||
if (m_delphi in current_settings.modeswitches) and
|
||||
(hsym.typ=symconst.unitsym) then
|
||||
HideSym(hsym)
|
||||
else
|
||||
@ -1310,10 +1310,10 @@ implementation
|
||||
hsym:=tsym(FindWithHash(hashedid));
|
||||
if assigned(hsym) then
|
||||
begin
|
||||
{ Delphi you can have a symbol with the same name as the
|
||||
{ Delphi (contrary to TP) you can have a symbol with the same name as the
|
||||
unit, the unit can then not be accessed anymore using
|
||||
<unit>.<id>, so we can hide the symbol }
|
||||
if (m_duplicate_names in current_settings.modeswitches) and
|
||||
if (m_delphi in current_settings.modeswitches) and
|
||||
(hsym.typ=symconst.unitsym) then
|
||||
HideSym(hsym)
|
||||
else
|
||||
|
19
tests/webtbf/tw6957.pp
Normal file
19
tests/webtbf/tw6957.pp
Normal file
@ -0,0 +1,19 @@
|
||||
{ %fail }
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$MODE TP}
|
||||
{$ENDIF FPC}
|
||||
unit tw6957;
|
||||
|
||||
interface
|
||||
|
||||
function tw6957: boolean;
|
||||
|
||||
implementation
|
||||
|
||||
function tw6957: boolean;
|
||||
begin
|
||||
tw6957 := true;
|
||||
end;
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user