Skip to content

Commit 7598089

Browse files
committed
Fix exception in the lsp-ada_inline_value.adb
Rised LANGKIT_SUPPORT.ERRORS.PRECONDITION_FAILURE For eng/ide/ada_language_server#1727
1 parent a7ee5e3 commit 7598089

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/ada/lsp-ada_inline_value.adb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ package body LSP.Ada_Inline_Value is
8888

8989
function Is_String
9090
(Tipe : Libadalang.Analysis.Base_Type_Decl) return Boolean is
91-
(Ends_With (Libadalang.Text.To_Lower (Tipe.F_Name.Text), "string"));
91+
((if Tipe.F_Name.Is_Null
92+
then False
93+
else Ends_With (Libadalang.Text.To_Lower (Tipe.F_Name.Text), "string")));
9294
-- Check if Tipe has "String" suffix
9395

9496
function Find_Scalar_Expr_After_Stop

0 commit comments

Comments
 (0)