From 2017884431afef48850526f2a16d365407efea36 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Wed, 28 Oct 2009 16:25:32 +0100 Subject: [PATCH] Testcase: Coercing typedef float to complex miscompiles --- tests/run/complex_numbers_T305.pyx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/run/complex_numbers_T305.pyx b/tests/run/complex_numbers_T305.pyx index e25a4b35..6f0ac0c0 100644 --- a/tests/run/complex_numbers_T305.pyx +++ b/tests/run/complex_numbers_T305.pyx @@ -63,6 +63,10 @@ __doc__ = u""" >>> test_conjugate_double(2+3j) (2-3j) + + >>> test_coerce_typedef_multiply(3, 1j) + (3j) + """ #cdef extern from "complex.h": @@ -121,3 +125,6 @@ ctypedef double complex cdouble def test_conjugate_typedef(cdouble z): return z.conjugate() +ctypedef double mydouble +def test_coerce_typedef_multiply(mydouble x, double complex z): + return x * z -- 2.26.2