Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic-merge committed Apr 29, 2024
2 parents e8e897b + 641aef7 commit 6238f99
Show file tree
Hide file tree
Showing 3 changed files with 916 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/gpr/lsp-gpr_files.adb
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,10 @@ package body LSP.GPR_Files is

New_Symbol : Symbol :=
(New_Id,
Current_Symbol.Id,
(if Kind = K_When
and then Current_Symbol.Kind = K_When
then Current_Symbol.Parent_Id
else Current_Symbol.Id),
Token.Ref,
Kind,
To_Valid_Name (Name),
Expand Down
42 changes: 42 additions & 0 deletions testsuite/gpr_lsp/get_symbols_hierarchy/case_support.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
project Case_Support is
A := "";
case A is
when "a" =>
B := "";
when others =>
C := "";
case A is
when "a" =>
D := "";
when others =>
E := "";
end case;
F := "";
end case;
G := "";
case G is
when "" =>
H := "";
-- testing auto case/when closing on package declaration
package Compiler is
I := "";
case H is
when "" =>
J := "";
case J is
-- testing auto case closing on package declaration
package Linker is
K := "";
-- testing package auto closing on package declaration
package Builder is
L := "";
-- testing package auto closing on type declaration
type T1 is ("a");
M := "";
case M is
when "" =>
N := "";
-- testing case auto closing on type declaration
type T2 is ("");
O := "";
end Case_Support;
Loading

0 comments on commit 6238f99

Please sign in to comment.