Commit 789e4565 authored by jhugues's avatar jhugues
Browse files

* Refine tests for name collision in alias declaration

git-svn-id: 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3464c3df
...@@ -163,12 +163,27 @@ package body Ocarina.Analyzer.AADL.Names is ...@@ -163,12 +163,27 @@ package body Ocarina.Analyzer.AADL.Names is
if Name (Alias) = Name (Build_Package_Identifier if Name (Alias) = Name (Build_Package_Identifier
(Package_Name (Package_Node))) (Package_Name (Package_Node)))
and then Is_All (List_Node)
then then
Display_Analyzer_Error Display_Analyzer_Error
(Alias, "alias definition refer to self package", (Alias, "alias definition refers to self package",
Loc => Loc (Name_Visibility_Node)); Loc => Loc (Name_Visibility_Node));
Success := False; Success := False;
elsif Present
(List_Node)) and then
(List_Node)) = Name (Build_Package_Identifier
(Package_Name (Package_Node)))
Success := False;
"name conflicts with current package name",
Loc => Loc (List_Node));
else else
In_Node := Node_Explicitly_In_Scope In_Node := Node_Explicitly_In_Scope
(Alias, Current_Scope); (Alias, Current_Scope);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment