aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-04 19:46:28 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-04 19:46:28 +0100
commitd37e2bd3acb591c06c3c3a3ad7dd99b712acda5d (patch)
treeb451c52bf7567a50d23f44cb8aecf7e5fc8920af
parentf254978c5531b28d8b4f9a1d674b3465ec363b6e (diff)
downloadghdl-d37e2bd3acb591c06c3c3a3ad7dd99b712acda5d.tar.gz
ghdl-d37e2bd3acb591c06c3c3a3ad7dd99b712acda5d.tar.bz2
ghdl-d37e2bd3acb591c06c3c3a3ad7dd99b712acda5d.zip
vhdl-errors(disp_node): fix a crash on protected type body
-rw-r--r--src/vhdl/vhdl-errors.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb
index 8410cb767..7877fd8de 100644
--- a/src/vhdl/vhdl-errors.adb
+++ b/src/vhdl/vhdl-errors.adb
@@ -334,7 +334,8 @@ package body Vhdl.Errors is
when Iir_Kind_Protected_Type_Declaration =>
return Disp_Type (Node, "protected type");
when Iir_Kind_Protected_Type_Body =>
- return Disp_Type (Node, "protected type body");
+ return Disp_Type (Get_Protected_Type_Declaration (Node),
+ "protected type body");
when Iir_Kind_Subtype_Definition =>
return "subtype definition";
when Iir_Kind_Foreign_Vector_Type_Definition =>