Skip to content
Snippets Groups Projects
Commit 52af11d2 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Add correct type inference for struct member lookup.

parent f55f17e0
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,11 @@ class TypeInferenceMapper(CombineMapper): ...@@ -69,6 +69,11 @@ class TypeInferenceMapper(CombineMapper):
raise RuntimeError("type inference: nothing known about '%s'" % expr.name) raise RuntimeError("type inference: nothing known about '%s'" % expr.name)
def map_lookup(self, expr):
agg_result = self.rec(expr.aggregate)
dtype, offset = agg_result.fields[expr.name]
return dtype
# }}} # }}}
# {{{ C code mapper # {{{ C code mapper
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment