Fixed trac-17, default values as class members.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 7 Jun 2008 06:03:29 +0000 (23:03 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 7 Jun 2008 06:03:29 +0000 (23:03 -0700)
Cython/Compiler/Main.py
Cython/Compiler/Nodes.py

index d308457571b86e32501c744faaf6d9805d491652..1a6080493ef0add9714d464539e1cd323e8eefbf 100644 (file)
@@ -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
index 829c4ffb841d3d7cd35b4ee14e00d7bdc369ebc6..3975588595b4d6abc1ecff6a2bcf11f1b97b9457 100644 (file)
@@ -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