Alias creation => avoid name clash with containing module.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4626 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa 2016-04-22 08:56:05 +00:00
parent 4134c3a7be
commit fc29551d2c

View File

@ -805,7 +805,8 @@ var
baseName := ExtractNameFromQName(AName);
internalName := ExtractIdentifier(baseName);
hasInterName := IsReservedKeyWord(internalName) or
( not IsValidIdent(internalName) );
not(IsValidIdent(internalName)) or
SameText(internalName,Self.Module.Name);
if hasInterName then begin
internalName := '_' + internalName;
end;