Fix e_ctypedefornot
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Jun 2008 21:47:03 +0000 (14:47 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Jun 2008 21:47:03 +0000 (14:47 -0700)
Cython/Compiler/Symtab.py

index ffe2ebbc4bfae1ff85fc5f773e7ff11b09fac219..141c7c838f722b381799d9b488e7614277e06ae8 100644 (file)
@@ -919,7 +919,7 @@ class ModuleScope(Scope):
                 entry = None # Will cause redeclaration and produce an error
             else:
                 scope = type.scope
-                if typedef_flag and (scope and scope.defined):
+                if typedef_flag and (not scope or scope.defined):
                     self.check_previous_typedef_flag(entry, typedef_flag, pos)
                 if (scope and scope.defined) or (base_type and type.base_type):
                     if base_type and base_type is not type.base_type: