Commit aae6c5c9 authored by Robert Bradshaw's avatar Robert Bradshaw

More complete test and fix for template specialization issues.

Partial workaround for Github Issue #1852.
parent 97d39fea
......@@ -1924,7 +1924,7 @@ class FuncDefNode(StatNode, BlockNode):
code.mark_pos(self.pos, trace=False)
code.putln("")
code.putln("/* function exit code */")
code.putln("/* function exit codeX */")
# ----- Default return value
if not self.body.is_terminator:
......
......@@ -3666,8 +3666,11 @@ class CppClassType(CType):
if other_type.is_cpp_class:
if self == other_type:
return 1
elif (self.cname == other_type.cname
and (self.templates or other_type.templates)):
# This messy logic is needed due to GH Issue #1852.
elif (self.cname == other_type.cname and
(self.template_type and other_type.template_type
or self.templates
or other_type.templates)):
if self.templates == other_type.templates:
return 1
for t1, t2 in zip(self.templates, other_type.templates):
......
......@@ -125,3 +125,16 @@ def test_GH1599(a, b):
(1, 2.0)
"""
return public_return_pair(a, b)
# Related to GH Issue #1852.
cdef cppclass Callback[T]:#(UntypedCallback):
pass
cdef cppclass MyClass[O]:
void Invoke(Callback[O]*)
cdef cppclass MySubclass[T](MyClass[T]):
void Invoke(Callback[T]* callback):
pass
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