From 725b6f9646559bd94369301f0ac2e37a058d4d80 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 11 Jun 2008 21:51:25 +0200 Subject: [PATCH] scope isn't always set for new classes --- Cython/Compiler/Symtab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.26.2