From: Stefan Behnel Date: Fri, 17 Apr 2009 05:52:53 +0000 (+0200) Subject: added test case for T284 X-Git-Tag: 0.11.2.rc1~62 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=095fe826f8f73287e087802f0b39d083871159db;p=cython.git added test case for T284 --- diff --git a/tests/run/cdef_setitem_T284.pyx b/tests/run/cdef_setitem_T284.pyx new file mode 100644 index 00000000..3fd4c6d9 --- /dev/null +++ b/tests/run/cdef_setitem_T284.pyx @@ -0,0 +1,17 @@ +__doc__ = u''' +>>> no_cdef() +>>> with_cdef() +''' +def no_cdef(): + lst = range(11) + ob = 10L + lst[ob] = -10 + dd = {} + dd[ob] = -10 + +def with_cdef(): + cdef list lst = range(11) + ob = 10L + lst[ob] = -10 + cdef dict dd = {} + dd[ob] = -10