Commit 5449f98b authored by Robert Bradshaw's avatar Robert Bradshaw

Fixed trac-17, default values as class members.

parent 3e0a3b71
......@@ -328,7 +328,7 @@ class Context:
errors_occurred = True
if errors_occurred and result.c_file:
try:
Utils.castrate_file(result.c_file, os.stat(source))
Utils.castrate_file(result.c_file, os.stat(source.filename))
except EnvironmentError:
pass
result.c_file = None
......
......@@ -790,7 +790,7 @@ class FuncDefNode(StatNode, BlockNode):
if arg.default:
if arg.is_generic:
if not hasattr(arg, 'default_entry'):
arg.default.analyse_types(genv)
arg.default.analyse_types(env)
arg.default = arg.default.coerce_to(arg.type, genv)
if arg.default.is_literal:
arg.default_entry = arg.default
......
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