Skip to content
Snippets Groups Projects
Commit 8532ccdb authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix: PsBufferAcc is a legal argument to PsAddressOf

parent 3f32ceca
No related branches found
No related tags found
1 merge request!421Refactor Field Modelling
Pipeline #69764 passed
......@@ -472,7 +472,7 @@ class Typifier:
self._handle_idx(idx)
case PsAddressOf(arg):
if not isinstance(arg, (PsSymbolExpr, PsSubscript, PsMemAcc, PsLookup)):
if not isinstance(arg, (PsSymbolExpr, PsSubscript, PsMemAcc, PsBufferAcc, PsLookup)):
raise TypificationError(
f"Illegal expression below AddressOf operator: {arg}"
)
......@@ -489,7 +489,7 @@ class Typifier:
match arg:
case PsSymbolExpr(s):
pointed_to_type = s.get_dtype()
case PsSubscript(ptr, _) | PsMemAcc(ptr, _):
case PsSubscript(ptr, _) | PsMemAcc(ptr, _) | PsBufferAcc(ptr, _):
arr_type = ptr.get_dtype()
assert isinstance(arr_type, PsDereferencableType)
pointed_to_type = arr_type.base_type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment