From 77476d6ecc45f1761125524cbdeddfe74e3b157a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 13 Sep 2021 21:51:43 +0200 Subject: ortho: for slices, get element size from the result type and not from the object type. Fix #1862 --- src/ortho/debug/ortho_debug.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ortho/debug') diff --git a/src/ortho/debug/ortho_debug.adb b/src/ortho/debug/ortho_debug.adb index 9961fd2e0..2feda5932 100644 --- a/src/ortho/debug/ortho_debug.adb +++ b/src/ortho/debug/ortho_debug.adb @@ -1122,7 +1122,7 @@ package body Ortho_Debug is raise Type_Error; end if; -- The element type of ARR must be constrained. - Check_Constrained_Type (Get_Array_El_Type (Arr.Rtype)); + Check_Constrained_Type (Get_Array_El_Type (Res_Type)); -- The result is an array. if Res_Type.Kind not in ON_Array_Kinds then raise Type_Error; -- cgit v1.2.3