comparison python/c3/typecheck.py @ 168:49f1ab80d040

Added awesome icons
author Windel Bouwman
date Fri, 22 Mar 2013 19:09:38 +0100
parents 0b5b2ee6b435
children 4348da5ca307
comparison
equal deleted inserted replaced
167:0b5b2ee6b435 168:49f1ab80d040
85 pass 85 pass
86 elif type(sym) is Constant: 86 elif type(sym) is Constant:
87 if not equalTypes(sym.typ, sym.value.typ): 87 if not equalTypes(sym.typ, sym.value.typ):
88 self.diag.error('Cannot assign {0} to {1}'.format(sym.value.typ, sym.typ), sym.loc) 88 self.diag.error('Cannot assign {0} to {1}'.format(sym.value.typ, sym.typ), sym.loc)
89 89
90 elif type(sym) in [EmptyStatement, CompoundStatement, Package, Function]: 90 elif type(sym) in [EmptyStatement, CompoundStatement, Package, Function, FunctionType]:
91 pass 91 pass
92 else: 92 else:
93 print('Unknown type check', sym) 93 print('Unknown type check', sym)
94 94