Commit 725b6f96 authored by Stefan Behnel's avatar Stefan Behnel

scope isn't always set for new classes

parent 069b800a
...@@ -919,7 +919,7 @@ class ModuleScope(Scope): ...@@ -919,7 +919,7 @@ class ModuleScope(Scope):
entry = None # Will cause redeclaration and produce an error entry = None # Will cause redeclaration and produce an error
else: else:
scope = type.scope 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) self.check_previous_typedef_flag(entry, typedef_flag, pos)
if (scope and scope.defined) or (base_type and type.base_type): if (scope and scope.defined) or (base_type and type.base_type):
if base_type and base_type is not type.base_type: if base_type and base_type is not type.base_type:
......
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