Commit 789e4565 authored by jhugues's avatar jhugues

* Refine tests for name collision in alias declaration

git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@6250 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3464c3df
......@@ -163,12 +163,27 @@ package body Ocarina.Analyzer.AADL.Names is
if Name (Alias) = Name (Build_Package_Identifier
(Package_Name (Package_Node)))
and then Is_All (List_Node)
then
Display_Analyzer_Error
(Alias, "alias definition refer to self package",
(Alias, "alias definition refers to self package",
Loc => Loc (Name_Visibility_Node));
Success := False;
elsif Present
(Ocarina.ME_AADL.AADL_Tree.Nodes.Identifier
(List_Node)) and then
Name
(Ocarina.ME_AADL.AADL_Tree.Nodes.Identifier
(List_Node)) = Name (Build_Package_Identifier
(Package_Name (Package_Node)))
then
Success := False;
Display_Analyzer_Error
(List_Node,
"name conflicts with current package name",
Loc => Loc (List_Node));
else
In_Node := Node_Explicitly_In_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