From 9a3e57aa5b87de0873777c587edfb504a8c9f3e4 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Wed, 25 Sep 2019 14:22:18 +0200
Subject: [PATCH] Add extra assertions related to sympy issue
 [#17652](https://github.com/sympy/sympy/issues/17652)

---
 pystencils/astnodes.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pystencils/astnodes.py b/pystencils/astnodes.py
index b2413828..a0ca26fd 100644
--- a/pystencils/astnodes.py
+++ b/pystencils/astnodes.py
@@ -569,7 +569,9 @@ class SympyAssignment(Node):
 class ResolvedFieldAccess(sp.Indexed):
     def __new__(cls, base, linearized_index, field, offsets, idx_coordinate_values):
         if not isinstance(base, sp.IndexedBase):
+            assert isinstance(base, TypedSymbol)
             base = sp.IndexedBase(base, shape=(1,))
+            assert isinstance(base.label, TypedSymbol)
         obj = super(ResolvedFieldAccess, cls).__new__(cls, base, linearized_index)
         obj.field = field
         obj.offsets = offsets
-- 
GitLab