Commit 725e2a15 by Javier Miranda Committed by Arnaud Charlet

sem_ch4.adb (Try_Primitive_Operation, [...]): Analyze the object that is…

sem_ch4.adb (Try_Primitive_Operation, [...]): Analyze the object that is accessible through the prefix of the subprogram call...

2005-03-17  Javier Miranda  <miranda@adacore.com>

	* sem_ch4.adb (Try_Primitive_Operation, Class_Wide_Operation and
	Try_Object_Operation): Analyze the object that is accessible
	through the prefix of the subprogram call before we apply
	the transformation of the object-operation notation.

From-SVN: r96674
parent 5b846f5a
...@@ -4805,7 +4805,6 @@ package body Sem_Ch4 is ...@@ -4805,7 +4805,6 @@ package body Sem_Ch4 is
Set_Analyzed (Call_Node, False); Set_Analyzed (Call_Node, False);
Rewrite (Node_To_Replace, Call_Node); Rewrite (Node_To_Replace, Call_Node);
Analyze (Node_To_Replace); Analyze (Node_To_Replace);
end Complete_Object_Operation; end Complete_Object_Operation;
-------------------------------- --------------------------------
...@@ -4920,6 +4919,9 @@ package body Sem_Ch4 is ...@@ -4920,6 +4919,9 @@ package body Sem_Ch4 is
-- Allocate the node only once -- Allocate the node only once
if not Present (Call_Node_Case) then if not Present (Call_Node_Case) then
Analyze_Expression (Obj);
Set_Analyzed (Obj);
Transform_Object_Operation ( Transform_Object_Operation (
Call_Node => Call_Node_Case, Call_Node => Call_Node_Case,
First_Actual => Obj, First_Actual => Obj,
...@@ -5018,6 +5020,9 @@ package body Sem_Ch4 is ...@@ -5018,6 +5020,9 @@ package body Sem_Ch4 is
-- Allocate the node only once -- Allocate the node only once
if not Present (Call_Node_Case) then if not Present (Call_Node_Case) then
Analyze_Expression (Obj);
Set_Analyzed (Obj);
Transform_Object_Operation ( Transform_Object_Operation (
Call_Node => Call_Node_Case, Call_Node => Call_Node_Case,
First_Actual => Obj, First_Actual => Obj,
...@@ -5093,8 +5098,7 @@ package body Sem_Ch4 is ...@@ -5093,8 +5098,7 @@ package body Sem_Ch4 is
if Is_Subprg_Call and then N = Name (Parent (N)) then if Is_Subprg_Call and then N = Name (Parent (N)) then
Actual := First (Parameter_Associations (Parent (N))); Actual := First (Parameter_Associations (Parent (N)));
while Present (Actual) loop while Present (Actual) loop
Analyze (Actual); Analyze_Expression (Actual);
Check_Parameterless_Call (Actual);
Next (Actual); Next (Actual);
end loop; end loop;
end if; end if;
...@@ -5110,6 +5114,9 @@ package body Sem_Ch4 is ...@@ -5110,6 +5114,9 @@ package body Sem_Ch4 is
First_Actual := Obj; First_Actual := Obj;
end if; end if;
Analyze_Expression (First_Actual);
Set_Analyzed (First_Actual);
-- Build a subprogram call node -- Build a subprogram call node
Transform_Object_Operation ( Transform_Object_Operation (
......
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