Fixed IndexNode.is_lvalue
authorGerald Dalley <dalleyg@deshaw.com>
Fri, 19 Jul 2013 17:50:00 +0000 (13:50 -0400)
committerGerald Dalley <dalleyg@deshaw.com>
Fri, 19 Jul 2013 18:27:36 +0000 (14:27 -0400)
commitbcba92512d63f02a6711e0e2307eb395562d8540
treec0f7408a92f5ff2579d4d14e512e08df9ff40f55
parentcbc0665c95ff461df9d1e1066da7628d640547c2
Fixed IndexNode.is_lvalue

In C/C++, almost all index operator expressions return lvalues. We now
allow anything that doesn't look like it resolves to assigning to a
whole array object to be considered an lvalue.

Before this commit, using the index operator on containers that return
references would crash the Cython compiler.  run/tests/lvalue_refs.pyx
contains an example of code that previously crashed the compiler.

Author: Gerald Dalley
Cython/Compiler/ExprNodes.py
tests/run/lvalue_refs.pyx [new file with mode: 0644]