Ticket #638 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Error in index type inference.

Reported by: robertwb Owned by: robertwb
Priority: major Milestone: 0.14.1
Component: Type Analysis Keywords:
Cc:

Description

 def bar(foo):
     qux = foo
     quux = foo[qux.baz]

The error message:

       $ cython bar.py

       Error compiling Cython file:
       ------------------------------------------------------------
       ...
       def bar(foo):
               qux = foo
               quux = foo[qux.baz]
                     ^
       ------------------------------------------------------------

       /Users/daniel/Desktop/cython-test/bar.py:3:15: Object of type '<unspecified>' has no attribute 'baz'

Change History

Changed 4 years ago by robertwb

  • owner changed from somebody to robertwb

The problem was that the indexing operator inference was changed to depend on the index type, but its type_dependencies method wasn't updated to reflect this.

Changed 4 years ago by robertwb

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.