Skip to content

Commit

Permalink
Fix undefined variable error processing
Browse files Browse the repository at this point in the history
Do not raise exception when not all imported projects were parsed.

Change-Id: Ica3b0f5b30e2d8babbcf77db88fac9509ee41c76
TN: U927-010
(cherry picked from commit 65db064)
  • Loading branch information
anisimkov committed Sep 28, 2021
1 parent 1d4937d commit ddc94d2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions gpr/src/gpr-proc.adb
Original file line number Diff line number Diff line change
Expand Up @@ -2547,15 +2547,22 @@ package body GPR.Proc is

-- Get the case variable

The_Variable := Shared.Variable_Elements. Table (Var_Id).Value;
The_Variable := Shared.Variable_Elements.Table (Var_Id).Value;

if The_Variable.Kind /= Single then
if Node_Tree.Incomplete_With
and then The_Variable.Kind = Undefined
then
return;
end if;

-- Should never happen, because this has already been checked
-- during parsing.

Write_Line ("variable""" & Get_Name_String (Name) &
""" is not a single string variable");
Write_Line
("variable """ & Get_Name_String (Name)
& """ is not a single string variable");

raise Program_Error;
end if;

Expand Down

0 comments on commit ddc94d2

Please sign in to comment.