Commit 32538b37 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'extra-asserts-sympy-issue' into 'master'

Extra asserts sympy issue

See merge request pycodegen/pystencils!58
parents 0a8c16b0 9a3e57aa
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment