Ticket #460 (closed enhancement: fixed)
Always type-infer floating point types
| Reported by: | dagss | Owned by: | scoder |
|---|---|---|---|
| Priority: | major | Milestone: | 0.13 |
| Component: | Code Generation | Keywords: | |
| Cc: |
Description
Depends on #236.
Since Python uses double for its float and complex types and all important operations on it can map directly to C space, and since Python<->C conversions are 1:1, we can safely turn on type-inference in this case without breaking anything.
This requires that #236 is implemented first though so that any use of attributes or methods goes through.
Note that, at least if typeinference is turned off, this means that
cdef float x = 3.2
y = x # y will be typed as double,
# so as to behave as if y was a Python
# object
Unresolved issue: If typeinference is turned on, perhaps y should be typed as float instead.
Change History
Note: See
TracTickets for help on using
tickets.
