return None
def c_types_okay(self, type1, type2):
- return type1.is_float or type2.is_float
+ return (type1.is_float or type2.is_float) and \
+ NumBinopNode.c_types_okay(self, type1, type2)
def type_error(self):
if not (self.operand1.type.is_error or self.operand2.type.is_error):
+cdef object x
+
cdef struct spam:
object parrot
cdef spam s
s.parrot = x
_ERRORS = u"""
-/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_pyobinstruct.pyx:2:8: C struct/union member cannot be a Python object
+/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_pyobinstruct.pyx:4:8: C struct/union member cannot be a Python object
"""
+cdef object foo, blarg
+
def foo(obj):
cdef int *p
p = <int *>blarg # okay
p = <int *>(foo + blarg) # error - temporary
_ERRORS = u"""
-/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_tempcast.pyx:4:5: Casting temporary Python object to non-Python type
+/Local/Projects/D/Pyrex/Source/Tests/Errors1/e_tempcast.pyx:6:5: Casting temporary Python object to non-numeric non-Python type
"""
cdef int i
break # error
continue # error
- _ERRORS = u"""
+_ERRORS = u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_while.pyx:3:1: break statement not inside loop
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_while.pyx:4:1: continue statement not inside loop
"""
--- /dev/null
+cdef class C:
+ cdef void f(self) nogil
pass
_ERRORS = u"""
-2:6: Signature does not match previous declaration
+nogilcmeth.pyx:2:9: Signature not compatible with previous declaration
+nogilcmeth.pxd:2:15: Previous declaration is here
"""