Commit 5bc442c6 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix bugs for rhs -> default and exception handling.

parent 920a8f1a
......@@ -70,9 +70,9 @@ class CodeWriter(TreeVisitor):
if len(items) > 0:
for item in items[:-1]:
self.visit(item)
if output_rhs and item.rhs is not None:
if output_rhs and item.default is not None:
self.put(u" = ")
self.visit(item.rhs)
self.visit(item.default)
self.put(u", ")
self.visit(items[-1])
......
......@@ -1670,7 +1670,7 @@ class SimpleCallNode(CallNode):
return func_type
def exception_checks(self):
func_type = self.function.type
func_type = self.function_type()
exc_val = func_type.exception_value
exc_check = func_type.exception_check
if exc_val is None and self.function.entry.visibility != 'extern':
......
......@@ -358,6 +358,8 @@ class CNameDeclaratorNode(CDeclaratorNode):
child_attrs = ['default']
default = None
def analyse(self, base_type, env, nonempty = 0):
if nonempty and self.name == '':
# Must have mistaken the name for the type.
......
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