Commit 01568879 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Cpp: Properly set scope in declare_cpp_class

parent 01bf9293
......@@ -640,7 +640,7 @@ class Scope(object):
warning(pos, "'%s' already defined (ignoring second definition)" % name, 0)
else:
if scope:
entry.type.scope = scope
entry.type.set_scope(scope)
self.type_entries.append(entry)
if base_classes:
if entry.type.base_classes and entry.type.base_classes != base_classes:
......@@ -663,6 +663,7 @@ class Scope(object):
declare_inherited_attributes(entry, base_class.base_classes)
entry.type.scope.declare_inherited_cpp_attributes(base_class)
if scope:
entry.type.set_scope(scope)
declare_inherited_attributes(entry, base_classes)
scope.declare_var(name="this", cname="this", type=PyrexTypes.CPtrType(entry.type), pos=entry.pos)
if self.is_cpp_class_scope:
......
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