From: Stefan Behnel Date: Wed, 11 Jun 2008 19:51:25 +0000 (+0200) Subject: scope isn't always set for new classes X-Git-Tag: 0.9.8rc1~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=725b6f9646559bd94369301f0ac2e37a058d4d80;p=cython.git scope isn't always set for new classes --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 313f4fc7..ffe2ebbc 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -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.defined: + if typedef_flag and (scope and 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: