diff python/c3/analyse.py @ 272:e64bae57cda8

refactor ir
author Windel Bouwman
date Sat, 31 Aug 2013 17:58:54 +0200
parents 7416c923a02a
children 6f2423df0675
line wrap: on
line diff
--- a/python/c3/analyse.py	Tue Aug 20 18:56:02 2013 +0200
+++ b/python/c3/analyse.py	Sat Aug 31 17:58:54 2013 +0200
@@ -110,7 +110,7 @@
             raise Exception('Error resolving type {} {}'.format(t, type(t)))
 
     def findRefs(self, sym):
-        if type(sym) in [Variable, Constant]:
+        if type(sym) in [Constant] or isinstance(sym, Variable):
             sym.typ = self.resolveType(sym.typ, sym.scope)
         elif type(sym) is TypeCast:
             sym.to_type = self.resolveType(sym.to_type, sym.scope)