Commit c1131235 authored by Robert Bradshaw's avatar Robert Bradshaw

type narrowing for pxd files

parent cbd2a528
......@@ -1074,12 +1074,10 @@ class CClassScope(ClassScope):
else:
if defining and entry.func_cname:
error(pos, "'%s' already defined" % name)
if not entry.type.same_as(type, as_cmethod = 1):
old_type = entry.type
if type.narrower_c_signature_than(entry.type, as_cmethod = 1):
entry.type = type
else:
error(pos, "Signature not compatible with previous declaration")
if type.narrower_c_signature_than(entry.type, as_cmethod = 1):
entry.type = type
else:
error(pos, "Signature not compatible with previous declaration")
else:
if self.defined:
error(pos,
......
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