Closed da-woods closed 8 months ago
I think the mistake is using strings to represent
exception_value
Not entirely a mistake. You can have an exception value that is an enum name, for example. So, if we start using numeric values, we'll still have to deal with strings, but then in combination with different numeric data types.
Describe the bug
This is something I'm running into while trying to sort out implicit exception_value for fused types. But it's a general problem not related to fused functions.
Essentially for floating point types, Cython uses a number of different representations of the exception value, and this leads to mismatches where there should be no mismatch
Code to reproduce the behaviour:
This fails with
The reason is that the type for
return_double
has anexception_value
of'-1'
(note astr
). The type forfunc_ptr1
has anexception_value
of'-1.0'
(note also astr
).Therefore they're "incompatible" and the assignment fails.
Expected behaviour
No response
OS
No response
Python version
No response
Cython version
Current master
Additional context
I think the mistake is using strings to represent
exception_value