From: Robert Bradshaw Date: Thu, 7 Jun 2007 02:02:58 +0000 (-0700) Subject: type narrowing for pxd files X-Git-Tag: 0.9.6.14~29^2~182 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c113123565a4d076808f7d3f385ffd5798bb95b7;p=cython.git type narrowing for pxd files --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 2e97dfcd..9c114657 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -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,