From 6e303efe5b1e3b6ab9f4f37d2e35c645496c03d7 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 7 Oct 2020 18:55:30 +0200 Subject: synth-expr: improve error message for length mismatch --- src/synth/synth-expr.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 3cc92cf1d..2282d48b2 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -23,6 +23,7 @@ with Name_Table; with Std_Names; with Str_Table; with Mutils; use Mutils; +with Errorout; use Errorout; with Vhdl.Types; with Vhdl.Ieee.Std_Logic_1164; use Vhdl.Ieee.Std_Logic_1164; @@ -829,7 +830,9 @@ package body Synth.Expr is pragma Assert (Vtype.Kind = Type_Vector or Vtype.Kind = Type_Slice); if Dtype.W /= Vtype.W then - Error_Msg_Synth (+Loc, "mismatching vector length"); + Error_Msg_Synth + (+Loc, "mismatching vector length; got %v, expect %v", + (Errorout."+" (Vtype.W), +Dtype.W)); return No_Valtyp; end if; if Bounds then -- cgit v1.2.3