From c6bb3174c7c0d8ac7f0a3eca442dec4601d3625c Mon Sep 17 00:00:00 2001
From: Kristof Szabados <Kristof.Szabados@ericsson.com>
Date: Sat, 18 Aug 2018 08:10:24 +0200
Subject: [PATCH] minor simplification.

Signed-off-by: Kristof Szabados <Kristof.Szabados@ericsson.com>
---
 compiler2/Type.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler2/Type.cc b/compiler2/Type.cc
index 8943ce32f..b5bd3e1c4 100644
--- a/compiler2/Type.cc
+++ b/compiler2/Type.cc
@@ -1774,7 +1774,7 @@ namespace Common {
                 pt->get_typename().c_str());
               return 0;
             }
-            len = pt->get_sub_type()->get_length_restriction();
+            len = sub->get_length_restriction();
             if (len == -1) {
               ref->error("The type `%s' must have single size length restriction when used as a short-hand notation for nested indexes.",
                 pt->get_typename().c_str());
-- 
GitLab