_ERRORS = u'''
-2:0: break statement not inside loop
-5:4: break statement not inside loop
-8:4: break statement not inside loop
-11:4: break statement not inside loop
-16:5: break statement not inside loop
-20:4: break statement not inside loop
-22:4: break statement not inside loop
+3:0: break statement not inside loop
+6:4: break statement not inside loop
+9:4: break statement not inside loop
+12:4: break statement not inside loop
+17:5: break statement not inside loop
+21:4: break statement not inside loop
+23:4: break statement not inside loop
'''
ctypedef object[float] mybuffer
_ERRORS = u"""
-1:23: Syntax error in ctypedef statement
+4:23: Syntax error in ctypedef statement
"""
pass
_ERRORS = """
-4:5: inheritance from PyVarObject types like 'tuple' is not currently supported
-7:5: inheritance from PyVarObject types like 'bytes' is not currently supported
-10:5: inheritance from PyVarObject types like 'str' is not currently supported
+5:5: inheritance from PyVarObject types like 'tuple' is not currently supported
+8:5: inheritance from PyVarObject types like 'bytes' is not currently supported
+11:5: inheritance from PyVarObject types like 'str' is not currently supported
"""
# too bad we don't get more errors here ...
_ERRORS = u"""
-8:13: Non-keyword arg following star-arg
+10:13: Non-keyword arg following star-arg
"""
nonexisting(3, with_kw_arg=4)
_ERRORS = u"""
-1:11: undeclared name not builtin: nonexisting
+4:11: undeclared name not builtin: nonexisting
"""
pass
_ERRORS = u"""
-5:24: C attribute of type 'VoidP' cannot be accessed from Python
-5:24: Cannot convert 'VoidP' to Python object
-6:24: C attribute of type 'VoidP' cannot be accessed from Python
-6:24: Cannot convert 'VoidP' to Python object
-6:24: Cannot convert Python object to 'VoidP'
-14:22: C attribute of type 'Foo' cannot be accessed from Python
-14:22: Cannot convert Python object to 'Foo'
+8:24: C attribute of type 'VoidP' cannot be accessed from Python
+8:24: Cannot convert 'VoidP' to Python object
+9:24: C attribute of type 'VoidP' cannot be accessed from Python
+9:24: Cannot convert 'VoidP' to Python object
+9:24: Cannot convert Python object to 'VoidP'
+17:22: C attribute of type 'Foo' cannot be accessed from Python
+17:22: Cannot convert Python object to 'Foo'
"""
cdef nogil class test: pass
_ERRORS = u"""
- 2: 5: Expected an identifier, found 'pass'
- 3: 9: Empty declarator
- 4:11: Expected ':', found 'class'
+3: 5: Expected an identifier, found 'pass'
+4: 9: Empty declarator
+5:11: Expected ':', found 'class'
"""
pass
_ERRORS = u"""
-2:5:Call with wrong number of arguments (expected at most 4, got 5)
+4:5:Call with wrong number of arguments (expected at most 4, got 5)
"""
pass
_ERRORS = u"""
-3:9: Special methods must be declared with 'def', not 'cdef'
-6:9: Special methods must be declared with 'def', not 'cdef'
+4:9: Special methods must be declared with 'def', not 'cdef'
+7:9: Special methods must be declared with 'def', not 'cdef'
"""
pass
_ERRORS = u"""
-6: 9: Signature not compatible with previous declaration
-2: 9: Previous declaration is here
+8: 9: Signature not compatible with previous declaration
+4: 9: Previous declaration is here
"""
return True
_ERRORS = u'''
-2:0: continue statement not inside loop
-5:4: continue statement not inside loop
-8:4: continue statement not inside loop
-11:4: continue statement not inside loop
-16:5: continue statement not inside loop
-20:4: continue statement not inside loop
-22:4: continue statement not inside loop
+3:0: continue statement not inside loop
+6:4: continue statement not inside loop
+9:4: continue statement not inside loop
+12:4: continue statement not inside loop
+17:5: continue statement not inside loop
+21:4: continue statement not inside loop
+23:4: continue statement not inside loop
'''
cpdef nogil class test: pass
_ERRORS = u"""
- 2: 6: cdef blocks cannot be declared cpdef
- 3: 6: cdef blocks cannot be declared cpdef
- 3:12: Expected ':', found 'class'
+3: 6: cdef blocks cannot be declared cpdef
+4: 6: cdef blocks cannot be declared cpdef
+4:12: Expected ':', found 'class'
"""
new Foo(1, 2)
_ERRORS = u"""
-6:7: no suitable method found
+9:7: no suitable method found
"""
invalid = b'abcüöä'
_ERRORS = """
-5:10: bytes can only contain ASCII literal characters.
+6:10: bytes can only contain ASCII literal characters.
"""
# in 0.11.1 these are warnings
FUTURE_ERRORS = u"""
-4:13: cdef variable 's' declared after it is used
-4:16: cdef variable 'vv' declared after it is used
-9:14: cdef variable 'i' declared after it is used
-15:14: cdef variable 'i' declared after it is used
-21:14: cdef variable 'i' declared after it is used
-24:9: cdef variable 's' declared after it is used
-30:17: cdef variable 't' declared after it is used
-34:13: cdef variable 'r' declared after it is used
-40:17: cdef variable 't' declared after it is used
-47:10: cdef variable 'baz' declared after it is used
-50:24: cdef variable 'var' declared after it is used
+6:13: cdef variable 's' declared after it is used
+6:16: cdef variable 'vv' declared after it is used
+11:14: cdef variable 'i' declared after it is used
+17:14: cdef variable 'i' declared after it is used
+23:14: cdef variable 'i' declared after it is used
+26:9: cdef variable 's' declared after it is used
+32:17: cdef variable 't' declared after it is used
+36:13: cdef variable 'r' declared after it is used
+42:17: cdef variable 't' declared after it is used
+49:10: cdef variable 'baz' declared after it is used
+52:24: cdef variable 'var' declared after it is used
"""
syntax error
_ERRORS = u"""
-40:17: cdef variable 't' declared after it is used
-47:10: cdef variable 'baz' declared after it is used
-50:24: cdef variable 'var' declared after it is used
-67:7: Syntax error in simple statement list
+42:17: cdef variable 't' declared after it is used
+49:10: cdef variable 'baz' declared after it is used
+52:24: cdef variable 'var' declared after it is used
+70:7: Syntax error in simple statement list
"""
pass
_ERRORS = """
-2:0: Python function cannot be declared nogil
+3:0: Python function cannot be declared nogil
"""
pass
_ERRORS = u"""
-1:12: Expected 'struct', found 'foo'
+4:12: Expected 'struct', found 'foo'
"""
ptr1 = ptr2 + ptr3 # error
_ERRORS = u"""
-4:13: Invalid operand types for '+' (int *; int *)
+6:13: Invalid operand types for '+' (int *; int *)
"""
pass
_ERRORS = u"""
-1:10: Non-default argument follows default argument
-1:36: Non-default argument following default argument
-4:23: Non-default argument following default argument
-9:16: This argument cannot have a default value
+3:10: Non-default argument follows default argument
+3:36: Non-default argument following default argument
+6:23: Non-default argument following default argument
+11:16: This argument cannot have a default value
"""
obj = p2 # error
_ERRORS = u"""
-5:16: Cannot assign type 'char *' to 'int'
-6:17: Cannot convert Python object to 'int *'
-8:17: Cannot convert 'int *' to Python object
+7:16: Cannot assign type 'char *' to 'int'
+8:17: Cannot convert Python object to 'int *'
+10:17: Cannot convert 'int *' to Python object
"""
cdef void spam():
None = 42
_ERRORS = u"""
-2:1: Cannot assign to or delete this
+4:1: Cannot assign to or delete this
"""
pass
_ERRORS = u"""
-4:0: The autotestdict compiler directive is not allowed in function scope
+6:0: The autotestdict compiler directive is not allowed in function scope
"""
pass
_ERRORS = u"""
-1:26: Cannot assign type 'long' to 'char *'
-1:26: Exception value incompatible with function return type
+3:26: Cannot assign type 'long' to 'char *'
+3:26: Exception value incompatible with function return type
"""
pass
_ERRORS = u"""
-3:21: Use spam() rather than spam(void) to declare a function with no arguments.
-4:29: Use spam() rather than spam(void) to declare a function with no arguments.
-5:16: Argument type 'Spam' is incomplete
+5:21: Use spam() rather than spam(void) to declare a function with no arguments.
+6:29: Use spam() rather than spam(void) to declare a function with no arguments.
+7:16: Argument type 'Spam' is incomplete
"""
def f(Foo *p):
pass
_ERRORS = u"""
-3:6: Cannot convert Python object argument to type 'Foo *'
+5:6: Cannot convert Python object argument to type 'Foo *'
"""
ptr = None # This should not produce another error
_ERRORS = u"""
-3:19: Python object cannot be declared extern
-4:16: Array element cannot be a Python object
-5:12: Pointer base type cannot be a Python object
-7:13: Variable type 'int []' is incomplete
-8:11: Variable type 'Grail' is incomplete
-9:10: Variable type 'void' is incomplete
-11:15: Array element type 'int []' is incomplete
-12:14: Array element type 'Grail' is incomplete
-13:16: Array element type 'void' is incomplete
-16:9: Variable type 'int []' is incomplete
+5:19: Python object cannot be declared extern
+6:16: Array element cannot be a Python object
+7:12: Pointer base type cannot be a Python object
+9:13: Variable type 'int []' is incomplete
+10:11: Variable type 'Grail' is incomplete
+11:10: Variable type 'void' is incomplete
+13:15: Array element type 'int []' is incomplete
+14:14: Array element type 'Grail' is incomplete
+15:16: Array element type 'void' is incomplete
+18:9: Variable type 'int []' is incomplete
#19:1: Function argument cannot be void
-19:1: Use spam() rather than spam(void) to declare a function with no arguments.
-18:7: Argument type 'Grail' is incomplete
-19:1: Invalid use of 'void'
-23:5: 'NoSuchType' is not a type identifier
+21:1: Use spam() rather than spam(void) to declare a function with no arguments.
+20:7: Argument type 'Grail' is incomplete
+21:1: Invalid use of 'void'
+25:5: 'NoSuchType' is not a type identifier
"""
cdef char *ptr
int1 = int2 | ptr # error
_ERRORS = u"""
-4:13: Invalid operand types for '|' (int; char *)
+6:13: Invalid operand types for '|' (int; char *)
"""
_ERRORS = u"""
-5:26: 'struct_type_not_boolean' is not a constant, variable or function identifier
-5:26: Type 'struct_type_not_boolean' not acceptable as a boolean
+7:26: 'struct_type_not_boolean' is not a constant, variable or function identifier
+7:26: Type 'struct_type_not_boolean' not acceptable as a boolean
-12:21: 'struct_not_boolean' is not a constant, variable or function identifier
-12:21: Type 'struct_not_boolean' not acceptable as a boolean
+14:21: 'struct_not_boolean' is not a constant, variable or function identifier
+14:21: Type 'struct_not_boolean' not acceptable as a boolean
-19:25: 'union_type_not_boolean' is not a constant, variable or function identifier
-19:25: Type 'union_type_not_boolean' not acceptable as a boolean
+21:25: 'union_type_not_boolean' is not a constant, variable or function identifier
+21:25: Type 'union_type_not_boolean' not acceptable as a boolean
-26:20: 'union_not_boolean' is not a constant, variable or function identifier
-26:20: Type 'union_not_boolean' not acceptable as a boolean
+28:20: 'union_not_boolean' is not a constant, variable or function identifier
+28:20: Type 'union_not_boolean' not acceptable as a boolean
"""
cdef object[x, 1] buf0
_ERRORS = u"""
-1:17: Buffer types only allowed as function local variables
-3:21: Buffer types only allowed as function local variables
-6:31: "fakeoption" is not a buffer option
+3:17: Buffer types only allowed as function local variables
+5:21: Buffer types only allowed as function local variables
+8:31: "fakeoption" is not a buffer option
"""
#TODO:
#7:22: "ndim" must be non-negative
buf = x
_ERRORS = u"""
-3:9: 'nothing' is not a type identifier
-10:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive
-22:11: Cannot access buffer with object dtype without gil
-22:11: Assignment of Python object not allowed without gil
-27:12: Assignment of Python object not allowed without gil
+ 3: 9: 'nothing' is not a type identifier
+12:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive
+24:11: Cannot access buffer with object dtype without gil
+24:11: Assignment of Python object not allowed without gil
+29:12: Assignment of Python object not allowed without gil
"""
x()()
_ERRORS = u"""
-2:1: Calling non-function type 'int'
-5:1: Calling non-function type 'float'
-14:3: Calling non-function type 'int'
+4:1: Calling non-function type 'int'
+7:1: Calling non-function type 'float'
+16:3: Calling non-function type 'int'
"""
#p2 = h4 # fail
_ERRORS = u"""
-16:22: cannot have both '__stdcall' and '__cdecl' calling conventions
-19:23: cannot have both '__fastcall' and '__cdecl' calling conventions
+18:22: cannot have both '__stdcall' and '__cdecl' calling conventions
+21:23: cannot have both '__fastcall' and '__cdecl' calling conventions
"""
#31:14: Cannot assign type 'void (__cdecl )(void)' to 'void (*)(void)'
#32:14: Cannot assign type 'void (__stdcall )(void)' to 'void (*)(void)'
a.some_method(1, y=2)
_ERRORS = u"""
-9:13: Keyword and starred arguments not allowed in cdef functions.
-14:13: Keyword and starred arguments not allowed in cdef functions.
+12:13: Keyword and starred arguments not allowed in cdef functions.
+17:13: Keyword and starred arguments not allowed in cdef functions.
"""
cdef extern from *:
void f(int)
_ERRORS = u"""
-1:8: Empty declarator
+3:8: Empty declarator
"""
int value = 3
_ERRORS = u"""
-2:13: Cannot assign default value to fields in cdef classes, structs or unions
-6:12: Cannot assign default value to fields in cdef classes, structs or unions
+4:13: Cannot assign default value to fields in cdef classes, structs or unions
+8:12: Cannot assign default value to fields in cdef classes, structs or unions
"""
cdef enum ham:
pass
_ERRORS = u"""
-1:5: Empty struct or union definition not allowed outside a 'cdef extern from' block
-4:0: Empty struct or union definition not allowed outside a 'cdef extern from' block
-7:5: Empty enum definition not allowed outside a 'cdef extern from' block
+3:5: Empty struct or union definition not allowed outside a 'cdef extern from' block
+6:0: Empty struct or union definition not allowed outside a 'cdef extern from' block
+9:5: Empty enum definition not allowed outside a 'cdef extern from' block
"""
a = 42 # assignment to non-lvalue
_ERRORS = u"""
-6:3: Assignment to non-lvalue 'a'
+8:3: Assignment to non-lvalue 'a'
"""
cdef void f(self, int x):
pass
_ERRORS = u"""
-6:6: Signature not compatible with previous declaration
-2:6: Previous declaration is here
+8:6: Signature not compatible with previous declaration
+4:6: Previous declaration is here
"""
bool = 1 in 2 in 3
_ERRORS = u"""
- 8:13: Invalid types for '==' (int *, Python object)
- 9:13: Invalid types for '==' (int, char *)
-10:13: Invalid types for '==' (char *, int *)
+10:13: Invalid types for '==' (int *, Python object)
+11:13: Invalid types for '==' (int, char *)
+12:13: Invalid types for '==' (char *, int *)
"""
_ERRORS = u"""
-5:36: C struct/union member cannot be a Python object
-15:6: Object of type 'Spam' has no attribute 'k'
-16:6: Cannot assign type 'float *[42]' to 'int'
-17:21: Cannot assign type 'int' to 'float *[42]'
-20:7: Cannot select attribute of incomplete type 'Grail'
-21:3: Cannot select attribute of incomplete type 'Grail'
+7:36: C struct/union member cannot be a Python object
+17:6: Object of type 'Spam' has no attribute 'k'
+18:6: Cannot assign type 'float *[42]' to 'int'
+19:21: Cannot assign type 'int' to 'float *[42]'
+22:7: Cannot select attribute of incomplete type 'Grail'
+23:3: Cannot select attribute of incomplete type 'Grail'
"""
ctypedef struct Spam
_ERRORS = u"""
-1:0: Forward-referenced type must use 'cdef', not 'ctypedef'
+3:0: Forward-referenced type must use 'cdef', not 'ctypedef'
"""
cdef Blarg b
_ERRORS = u"""
-3:0: 'Foo' previously declared using 'cdef'
-9:5: 'Blarg' previously declared using 'ctypedef'
+5:0: 'Foo' previously declared using 'cdef'
+11:5: 'Blarg' previously declared using 'ctypedef'
"""
_ERRORS = u"""
-1:19: Array element cannot be a function
-3:18: Function cannot return a function
-8:10: Function cannot return a function
-8:5: Cannot cast to a function type
+3:19: Array element cannot be a function
+5:18: Function cannot return a function
+10:10: Function cannot return a function
+10:5: Cannot cast to a function type
"""
del x[i] # error: deletion of non-Python object
del s.m # error: deletion of non-Python object
_ERRORS = u"""
-8:6: Cannot assign to or delete this
-9:45: Deletion of non-Python, non-C++ object
-11:6: Deletion of non-Python, non-C++ object
-12:6: Deletion of non-Python, non-C++ object
+10:6: Cannot assign to or delete this
+11:45: Deletion of non-Python, non-C++ object
+13:6: Deletion of non-Python, non-C++ object
+14:6: Deletion of non-Python, non-C++ object
"""
# cython: boundscheck = true
_ERRORS = u"""
-3:0: boundscheck directive must be set to True or False, got 'true'
-4:0: boundscheck directive must be set to True or False, got '9'
+4:0: boundscheck directive must be set to True or False, got 'true'
+5:0: boundscheck directive must be set to True or False, got '9'
"""
pass
_ERRORS = u"""
-8:0: default 'except:' must be last
-10:0: default 'except:' must be last
+9:0: default 'except:' must be last
+11:0: default 'except:' must be last
"""
grail = spam # type mismatch
spam = grail # type mismatch
_ERRORS = u"""
-7:28: Cannot assign type 'spamfunc' to 'grailfunc'
-8:28: Cannot assign type 'grailfunc' to 'spamfunc'
+9:28: Cannot assign type 'spamfunc' to 'grailfunc'
+10:28: Cannot assign type 'grailfunc' to 'spamfunc'
"""
x = c.__weakref__
c.__weakref__ = x
_ERRORS = u"""
-5:20: Illegal use of special attribute __weakref__
-5:20: Illegal use of special attribute __weakref__
-5:20: Illegal use of special attribute __weakref__
-5:20: Special attribute __weakref__ cannot be exposed to Python
-8:22: Illegal use of special attribute __weakref__
-8:22: Special attribute __weakref__ cannot be exposed to Python
-13:6: Illegal use of special attribute __weakref__
-14:2: Illegal use of special attribute __weakref__
+7:20: Illegal use of special attribute __weakref__
+7:20: Illegal use of special attribute __weakref__
+7:20: Illegal use of special attribute __weakref__
+7:20: Special attribute __weakref__ cannot be exposed to Python
+10:22: Illegal use of special attribute __weakref__
+10:22: Special attribute __weakref__ cannot be exposed to Python
+15:6: Illegal use of special attribute __weakref__
+16:2: Illegal use of special attribute __weakref__
"""
+# mode: error
+
def foo():
yield
return 0
yield
_ERRORS = u"""
-3:4: 'return' with argument inside generator
-7:4: 'yield' outside function
-9:0: 'yield' not supported here
-12:4: 'yield' not supported here
+5:4: 'return' with argument inside generator
+9:4: 'yield' outside function
+11:0: 'yield' not supported here
+14:4: 'yield' not supported here
"""
int1 = int2[int3] # error
obj1 = obj2[ptr1] # error
_ERRORS = u"""
-5:14: Invalid index type 'float'
-6:14: Invalid index type 'float *'
-7:12: Attempting to index non-array type 'int'
-8:17: Cannot convert 'float *' to Python object
+7:14: Invalid index type 'float'
+8:14: Invalid index type 'float *'
+9:12: Attempting to index non-array type 'int'
+10:17: Cannot convert 'float *' to Python object
"""
_ERRORS = """
-6:8: illegal integer literal syntax in Python source file
7:8: illegal integer literal syntax in Python source file
8:8: illegal integer literal syntax in Python source file
+9:8: illegal integer literal syntax in Python source file
"""
_ERRORS = """
-4:8: illegal integer literal syntax in Python source file
5:8: illegal integer literal syntax in Python source file
6:8: illegal integer literal syntax in Python source file
7:8: illegal integer literal syntax in Python source file
8:8: illegal integer literal syntax in Python source file
+9:8: illegal integer literal syntax in Python source file
"""
cdef int *ptr2
int1, int3, obj1a = int2, ptr2, obj1b # error
_ERRORS = u"""
-4:31: Cannot assign type 'int *' to 'int'
+6:31: Cannot assign type 'int *' to 'int'
"""
spam() # too few args
spam("blarg") # too few args
_ERRORS = u"""
-5:6: Call with wrong number of arguments (expected 2, got 0)
-6:6: Call with wrong number of arguments (expected 2, got 1)
-7:6: Call with wrong number of arguments (expected 2, got 3)
-8:5: Call with wrong number of arguments (expected at least 2, got 0)
-9:5: Call with wrong number of arguments (expected at least 2, got 1)
+7:6: Call with wrong number of arguments (expected 2, got 0)
+8:6: Call with wrong number of arguments (expected 2, got 1)
+9:6: Call with wrong number of arguments (expected 2, got 3)
+10:5: Call with wrong number of arguments (expected at least 2, got 0)
+11:5: Call with wrong number of arguments (expected at least 2, got 1)
"""
pass
_ERRORS = u"""
-2:6: Signature not compatible with previous declaration
2:12: Previous declaration is here
+4: 6: Signature not compatible with previous declaration
"""
fp = f
_ERRORS = u"""
-5:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
+7:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
"""
_ERRORS = u"""
-3:4: no binding for nonlocal 'no_such_name' found
+ 3:4: no binding for nonlocal 'no_such_name' found
10:8: 'x' redeclared as nonlocal
15:4: no binding for nonlocal 'global_name' found
27:8: 'x' redeclared as nonlocal
_ERRORS = u"""
-1:5: Unrecognised type modifier combination
-2:5: Unrecognised type modifier combination
3:5: Unrecognised type modifier combination
4:5: Unrecognised type modifier combination
5:5: Unrecognised type modifier combination
6:5: Unrecognised type modifier combination
+7:5: Unrecognised type modifier combination
+8:5: Unrecognised type modifier combination
"""
cdef void spam(Shrubbery sh not None):
pass
_ERRORS = u"""
-3:15: 'not None' only allowed in Python functions
+5:15: 'not None' only allowed in Python functions
"""
def eggs(int x not None, char* y not None):
pass
_ERRORS = u"""
-1: 9: Only Python type arguments can have 'not None'
-1:25: Only Python type arguments can have 'not None'
+3: 9: Only Python type arguments can have 'not None'
+3:25: Only Python type arguments can have 'not None'
"""
cdef int *ptr
int1 = int2 * ptr # error
_ERRORS = u"""
-4:13: Invalid operand types for '*' (int; int *)
+6:13: Invalid operand types for '*' (int; int *)
"""
char a
_ERRORS = u"""
-2:9: Cannot declare extern struct as 'packed'
+5:9: Cannot declare extern struct as 'packed'
"""
flt1 = flt2 ** str1 # error
_ERRORS = u"""
-4:13: Invalid operand types for '**' (char *; float)
-5:13: Invalid operand types for '**' (float; char *)
+6:13: Invalid operand types for '**' (char *; float)
+7:13: Invalid operand types for '**' (float; char *)
"""
cimport e_pxdimpl_imported
_ERRORS = u"""
-6:4: function definition in pxd file must be declared 'cdef inline'
+ 6:4: function definition in pxd file must be declared 'cdef inline'
18:4: function definition in pxd file must be declared 'cdef inline'
23:8: function definition in pxd file must be declared 'cdef inline'
"""
cdef spam s
s.parrot = x
_ERRORS = u"""
-4:8: C struct/union member cannot be a Python object
+6:8: C struct/union member cannot be a Python object
"""
return # error
return p # error
_ERRORS = u"""
-3:17: Return with value in void function
-7:1: Return value required
-8:17: Cannot assign type 'int *' to 'int'
+5:17: Return with value in void function
+9:1: Return value required
+10:17: Cannot assign type 'int *' to 'int'
"""
cdef int n
n = sizeof(unbekannt)
_ERRORS = u"""
-3:4: Cannot take sizeof incomplete type 'unbekannt'
+5:4: Cannot take sizeof incomplete type 'unbekannt'
"""
pass
_ERRORS = u"""
-3:20: Cannot convert 'int *' to Python object
-4:21: Cannot convert 'int *' to Python object
-5:22: Cannot convert 'int *' to Python object
-10:16: C array iteration requires known end index
+5:20: Cannot convert 'int *' to Python object
+6:21: Cannot convert 'int *' to Python object
+7:22: Cannot convert 'int *' to Python object
12:16: C array iteration requires known end index
-14:22: C array iteration requires known step size and end index
+14:16: C array iteration requires known end index
+16:22: C array iteration requires known step size and end index
"""
_ERRORS = """
-2:14: Only single-character string literals can be coerced into ints.
-3:14: Only single-character string literals can be coerced into ints.
-6:15: Only single-character string literals can be coerced into ints.
-9:14: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4.
+4:14: Only single-character string literals can be coerced into ints.
+5:14: Only single-character string literals can be coerced into ints.
+8:15: Only single-character string literals can be coerced into ints.
+11:14: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4.
"""
ptr1 = int2 - ptr3 # error
ptr1 = ptr2 - ptr3 # error
_ERRORS = u"""
-4:13: Invalid operand types for '-' (int; char *)
-5:13: Cannot assign type 'int' to 'char *'
+6:13: Invalid operand types for '-' (int; char *)
+7:13: Cannot assign type 'int' to 'char *'
"""
print 34
_ERRORS = u"""
-3:19: undeclared name not builtin: NONEXISTING
+5:19: undeclared name not builtin: NONEXISTING
"""
p = <void *>(obj + blarg) # error - temporary
_ERRORS = u"""
-6:5: Casting temporary Python object to non-numeric non-Python type
+8:5: Casting temporary Python object to non-numeric non-Python type
"""
cdef class Spam
cdef extern class external.Eggs
_ERRORS = u"""
-1:5: C class 'Spam' is declared but not defined
-2:5: C class 'Eggs' is declared but not defined
+3:5: C class 'Spam' is declared but not defined
+4:5: C class 'Eggs' is declared but not defined
"""
int1 = -str2 # error
int1 = ~str2 # error
_ERRORS = u"""
-4:8: Invalid operand type for '-' (char *)
-5:8: Invalid operand type for '~' (char *)
+6:8: Invalid operand type for '-' (char *)
+7:8: Invalid operand type for '~' (char *)
"""
break # error
continue # error
_ERRORS = u"""
-3:1: break statement not inside loop
-4:1: continue statement not inside loop
+5:1: break statement not inside loop
+6:1: continue statement not inside loop
"""
-# mode: error
# coding=ASCII
+# mode: error
"""
Tr\8fs bien.
"""
_ERRORS = u"""
-0:0:Decoding error, missing or incorrect coding=<encoding-name> at top of source ('ascii' codec can't decode byte 0x8f in position 22: ordinal not in range(128))
+0:0:Decoding error, missing or incorrect coding=<encoding-name> at top of source ('ascii' codec can't decode byte 0x8f in position 36: ordinal not in range(128))
"""
_attribute = 5 # FIXME: this is not currently handled!!!
_ERRORS = u"""
-8:13: Cannot assign default value to fields in cdef classes, structs or unions
+10:13: Cannot assign default value to fields in cdef classes, structs or unions
"""
_ERRORS = u"""
# syntax1()
- 7: 4: can use starred expression only as assignment target
- 9: 4: can use starred expression only as assignment target
-11: 4: can use starred expression only as assignment target
-13: 4: can use starred expression only as assignment target
-15: 5: can use starred expression only as assignment target
-15: 9: can use starred expression only as assignment target
-17:11: can use starred expression only as assignment target
-17:24: can use starred expression only as assignment target
+ 8: 4: can use starred expression only as assignment target
+10: 4: can use starred expression only as assignment target
+12: 4: can use starred expression only as assignment target
+14: 4: can use starred expression only as assignment target
+16: 5: can use starred expression only as assignment target
+16: 9: can use starred expression only as assignment target
+18:11: can use starred expression only as assignment target
+18:24: can use starred expression only as assignment target
# syntax2()
-23:11: more than 1 starred expression in assignment
+24:11: more than 1 starred expression in assignment
# types()
-29:15: Cannot coerce list to type 'int'
-30:10: starred target must have Python object (list) type
+30:15: Cannot coerce list to type 'int'
+31:10: starred target must have Python object (list) type
"""
_ERRORS = u"""
- 5:4: too many values to unpack (expected 2, got 3)
- 8:4: need more than 1 value to unpack
-11:4: need more than 0 values to unpack
-14:4: need more than 0 values to unpack
-17:4: need more than 0 values to unpack
-18:4: need more than 1 value to unpack
-21:6: need more than 1 value to unpack
+6:4: too many values to unpack (expected 2, got 3)
+9:4: need more than 1 value to unpack
+12:4: need more than 0 values to unpack
+15:4: need more than 0 values to unpack
+18:4: need more than 0 values to unpack
+19:4: need more than 1 value to unpack
+22:6: need more than 1 value to unpack
"""
_ERRORS = u"""
-5:4: more than 1 starred expression in assignment
-5:8: more than 1 starred expression in assignment
+6:4: more than 1 starred expression in assignment
+6:8: more than 1 starred expression in assignment
"""
from __future__ import braces
_ERRORS = u"""
-1:23: not a chance
+3:23: not a chance
"""
a = <foao>True
_ERRORS = u"""
-2:9: 'foao' is not a type identifier
+4:9: 'foao' is not a type identifier
"""
'\x'
_ERRORS = '''
-2:1: Invalid hex escape '\x'
+3:1: Invalid hex escape '\x'
'''
'\x1'
_ERRORS = '''
-2:1: Invalid hex escape '\x'
+3:1: Invalid hex escape '\x'
'''
u'\uXYZ'
_ERRORS = '''
-2:2: Invalid unicode escape '\u'
+3:2: Invalid unicode escape '\u'
'''
u'\u'
_ERRORS = '''
-2:2: Invalid unicode escape '\u'
+3:2: Invalid unicode escape '\u'
'''
u'\u12'
_ERRORS = '''
-2:2: Invalid unicode escape '\u'
+3:2: Invalid unicode escape '\u'
'''
return False
_ERRORS = u"""
-4:10: Literal list must be assigned to pointer at time of declaration
+6:10: Literal list must be assigned to pointer at time of declaration
"""
pass
_ERRORS = u"""
-3:10: C method has no self argument
+5:10: C method has no self argument
"""
pass
_ERRORS = u"""
-3:10: Self argument (int) of C method 'a' does not match parent type (A)
+5:10: Self argument (int) of C method 'a' does not match parent type (A)
"""
# except these: 29, 34, 44, 56, 58, 60, 62-64
_ERRORS = u"""
-1:5: Function with Python return type cannot be declared nogil
-4:5: Function declared nogil has Python locals or temporaries
-6:6: Assignment of Python object not allowed without gil
-9:5: Discarding owned Python object not allowed without gil
-11:5: Function with Python return type cannot be declared nogil
-15:5: Calling gil-requiring function not allowed without gil
-24:9: Calling gil-requiring function not allowed without gil
-26:12: Assignment of Python object not allowed without gil
-28:8: Discarding owned Python object not allowed without gil
-28:16: Constructing complex number not allowed without gil
-30:8: Backquote expression not allowed without gil
+3:5: Function with Python return type cannot be declared nogil
+6:5: Function declared nogil has Python locals or temporaries
+8:6: Assignment of Python object not allowed without gil
+11:5: Discarding owned Python object not allowed without gil
+13:5: Function with Python return type cannot be declared nogil
+17:5: Calling gil-requiring function not allowed without gil
+26:9: Calling gil-requiring function not allowed without gil
+28:12: Assignment of Python object not allowed without gil
30:8: Discarding owned Python object not allowed without gil
-30:9: Operation not allowed without gil
-31:15: Assignment of Python object not allowed without gil
-31:15: Operation not allowed without gil
-31:15: Python import not allowed without gil
-32:8: Operation not allowed without gil
-32:13: Python import not allowed without gil
-32:25: Constructing Python list not allowed without gil
-32:25: Operation not allowed without gil
-33:17: Iterating over Python object not allowed without gil
-35:11: Discarding owned Python object not allowed without gil
-35:11: Indexing Python object not allowed without gil
-36:11: Discarding owned Python object not allowed without gil
-36:11: Slicing Python object not allowed without gil
-37:11: Constructing Python slice object not allowed without gil
+30:16: Constructing complex number not allowed without gil
+32:8: Backquote expression not allowed without gil
+32:8: Discarding owned Python object not allowed without gil
+32:9: Operation not allowed without gil
+33:15: Assignment of Python object not allowed without gil
+33:15: Operation not allowed without gil
+33:15: Python import not allowed without gil
+34:8: Operation not allowed without gil
+34:13: Python import not allowed without gil
+34:25: Constructing Python list not allowed without gil
+34:25: Operation not allowed without gil
+35:17: Iterating over Python object not allowed without gil
37:11: Discarding owned Python object not allowed without gil
37:11: Indexing Python object not allowed without gil
-37:13: Converting to Python object not allowed without gil
-37:15: Converting to Python object not allowed without gil
-37:17: Converting to Python object not allowed without gil
-38:11: Accessing Python attribute not allowed without gil
38:11: Discarding owned Python object not allowed without gil
-39:9: Constructing Python tuple not allowed without gil
-39:9: Discarding owned Python object not allowed without gil
-40:8: Constructing Python list not allowed without gil
-40:8: Discarding owned Python object not allowed without gil
-41:8: Constructing Python dict not allowed without gil
-41:8: Discarding owned Python object not allowed without gil
-42:12: Discarding owned Python object not allowed without gil
-42:12: Truth-testing Python object not allowed without gil
-43:13: Python type test not allowed without gil
-45:10: Discarding owned Python object not allowed without gil
-45:10: Operation not allowed without gil
-46:8: Discarding owned Python object not allowed without gil
-46:8: Operation not allowed without gil
-47:10: Assignment of Python object not allowed without gil
-47:14: Assignment of Python object not allowed without gil
-48:9: Assignment of Python object not allowed without gil
-48:13: Assignment of Python object not allowed without gil
-48:16: Creating temporary Python reference not allowed without gil
-48:19: Creating temporary Python reference not allowed without gil
-49:11: Assignment of Python object not allowed without gil
-49:11: Indexing Python object not allowed without gil
-50:11: Accessing Python attribute not allowed without gil
-50:11: Assignment of Python object not allowed without gil
-51:8: Constructing Python tuple not allowed without gil
-51:8: Python print statement not allowed without gil
-52:8: Deleting Python object not allowed without gil
-53:8: Returning Python object not allowed without gil
-54:8: Raising exception not allowed without gil
-55:14: Truth-testing Python object not allowed without gil
-57:17: Truth-testing Python object not allowed without gil
-59:8: For-loop using object bounds or target not allowed without gil
-61:8: Try-except statement not allowed without gil
-65:8: Try-finally statement not allowed without gil
-82:8: For-loop using object bounds or target not allowed without gil
+38:11: Slicing Python object not allowed without gil
+39:11: Constructing Python slice object not allowed without gil
+39:11: Discarding owned Python object not allowed without gil
+39:11: Indexing Python object not allowed without gil
+39:13: Converting to Python object not allowed without gil
+39:15: Converting to Python object not allowed without gil
+39:17: Converting to Python object not allowed without gil
+40:11: Accessing Python attribute not allowed without gil
+40:11: Discarding owned Python object not allowed without gil
+41:9: Constructing Python tuple not allowed without gil
+41:9: Discarding owned Python object not allowed without gil
+42:8: Constructing Python list not allowed without gil
+42:8: Discarding owned Python object not allowed without gil
+43:8: Constructing Python dict not allowed without gil
+43:8: Discarding owned Python object not allowed without gil
+44:12: Discarding owned Python object not allowed without gil
+44:12: Truth-testing Python object not allowed without gil
+45:13: Python type test not allowed without gil
+47:10: Discarding owned Python object not allowed without gil
+47:10: Operation not allowed without gil
+48:8: Discarding owned Python object not allowed without gil
+48:8: Operation not allowed without gil
+49:10: Assignment of Python object not allowed without gil
+49:14: Assignment of Python object not allowed without gil
+50:9: Assignment of Python object not allowed without gil
+50:13: Assignment of Python object not allowed without gil
+50:16: Creating temporary Python reference not allowed without gil
+50:19: Creating temporary Python reference not allowed without gil
+51:11: Assignment of Python object not allowed without gil
+51:11: Indexing Python object not allowed without gil
+52:11: Accessing Python attribute not allowed without gil
+52:11: Assignment of Python object not allowed without gil
+53:8: Constructing Python tuple not allowed without gil
+53:8: Python print statement not allowed without gil
+54:8: Deleting Python object not allowed without gil
+55:8: Returning Python object not allowed without gil
+56:8: Raising exception not allowed without gil
+57:14: Truth-testing Python object not allowed without gil
+59:17: Truth-testing Python object not allowed without gil
+61:8: For-loop using object bounds or target not allowed without gil
+63:8: Try-except statement not allowed without gil
+67:8: Try-finally statement not allowed without gil
+84:8: For-loop using object bounds or target not allowed without gil
"""
pass
_ERRORS = u"""
-2:9: Signature not compatible with previous declaration
2:15: Previous declaration is here
+4:9: Signature not compatible with previous declaration
"""
fp = f
_ERRORS = u"""
-10:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
+12:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
"""
DEF ospath = os.path
_ERRORS = u"""
-2:15: Compile-time name 'os' not defined
-2:15: Error in compile-time expression: AttributeError: 'NoneType' object has no attribute 'path'
+4:15: Compile-time name 'os' not defined
+4:15: Error in compile-time expression: AttributeError: 'NoneType' object has no attribute 'path'
"""
cdef somemod.child.something x
_ERRORS = u"""
-3:5: 'somemod.child' is not a cimported module
+6:5: 'somemod.child' is not a cimported module
"""
_ERRORS = """
- 7:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
-10:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
-13:21: Only single-character string literals can be coerced into ints.
-16:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
+ 8:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
+11:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
+14:21: Only single-character string literals can be coerced into ints.
+17:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
"""
_ERRORS = """
- 7:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
-10:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
-13:24: Only single-character string literals can be coerced into ints.
-16:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
+ 8:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
+11:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
+14:24: Only single-character string literals can be coerced into ints.
+17:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
"""
cdef double* disallowed = <double*>a
_ERRORS = u"""
-5:26: Python objects cannot be cast to pointers of primitive types
+7:26: Python objects cannot be cast to pointers of primitive types
"""
_ERRORS = u'''
- 5:0: Return not inside a function body
- 8:4: Return not inside a function body
-11:4: Return not inside a function body
-13:5: Return not inside a function body
-16:5: Return not inside a function body
-20:4: Return not inside a function body
-23:4: Return not inside a function body
-26:4: Return not inside a function body
+7:0: Return not inside a function body
+10:4: Return not inside a function body
+13:4: Return not inside a function body
+15:5: Return not inside a function body
+18:5: Return not inside a function body
+22:4: Return not inside a function body
+25:4: Return not inside a function body
28:4: Return not inside a function body
+30:4: Return not inside a function body
'''
a = b # space space
c = d # space tab
_ERRORS = u"""
-3:0: Mixed use of tabs and spaces
+5:0: Mixed use of tabs and spaces
"""
a = b
c = d
_ERRORS = u"""
-3:0: Possible inconsistent indentation
-3:0: Expected an identifier or literal
+5:0: Possible inconsistent indentation
+5:0: Expected an identifier or literal
"""
a = b # space space
c = d # tab
_ERRORS = u"""
-3:0: Mixed use of tabs and spaces
+5:0: Mixed use of tabs and spaces
"""
obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b)
_ERRORS = u"""
-2:9: too many values to unpack (expected 2, got 3)
+4:9: too many values to unpack (expected 2, got 3)
"""
cdef list l_f3 = u1
_ERRORS = u"""
-25:20: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4.
-26:22: Unicode objects do not support coercion to C types.
-27:22: 'str' objects do not support coercion to C types (use 'bytes'?).
-
-29:20: Cannot convert Unicode string to 'bytes' implicitly, encoding required.
-30:22: Cannot convert Unicode string to 'bytes' implicitly, encoding required.
-31:22: Cannot convert 'str' to 'bytes' implicitly. This is not portable.
-
-33:17: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.
-34:19: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.
-35:17: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.
-36:19: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.
-
-38:20: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
-39:22: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
-40:20: Cannot convert 'bytes' object to unicode implicitly, decoding required
-41:22: Cannot convert 'bytes' object to unicode implicitly, decoding required
-42:22: Cannot convert 'char*' to unicode implicitly, decoding required
-
-44:19: Cannot assign type 'str object' to 'tuple object'
-45:18: Cannot assign type 'unicode object' to 'tuple object'
-46:18: Cannot assign type 'bytes object' to 'tuple object'
+26:20: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4.
+27:22: Unicode objects do not support coercion to C types.
+28:22: 'str' objects do not support coercion to C types (use 'bytes'?).
+
+30:20: Cannot convert Unicode string to 'bytes' implicitly, encoding required.
+31:22: Cannot convert Unicode string to 'bytes' implicitly, encoding required.
+32:22: Cannot convert 'str' to 'bytes' implicitly. This is not portable.
+
+34:17: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.
+35:19: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.
+36:17: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.
+37:19: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.
+
+39:20: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
+40:22: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
+41:20: Cannot convert 'bytes' object to unicode implicitly, decoding required
+42:22: Cannot convert 'bytes' object to unicode implicitly, decoding required
+43:22: Cannot convert 'char*' to unicode implicitly, decoding required
+
+45:19: Cannot assign type 'str object' to 'tuple object'
+46:18: Cannot assign type 'unicode object' to 'tuple object'
+47:18: Cannot assign type 'bytes object' to 'tuple object'
"""
pass
_ERRORS = """
-8:5: Base class 'FinalClass' of type 'SubType' is final
+9:5: Base class 'FinalClass' of type 'SubType' is final
"""
_ERRORS = u"""
-8:0: Expected path '//ComprehensionNode' not found in result tree
-8:0: Expected path '//ComprehensionNode//FuncDefNode' not found in result tree
-8:0: Unexpected path '//NameNode' found in result tree
-8:0: Unexpected path '//SimpleCallNode' found in result tree
+9:0: Expected path '//ComprehensionNode' not found in result tree
+9:0: Expected path '//ComprehensionNode//FuncDefNode' not found in result tree
+9:0: Unexpected path '//NameNode' found in result tree
+9:0: Unexpected path '//SimpleCallNode' found in result tree
"""
print assert sizeof(int) == sizof(short) == sizeof(long)
_ERRORS = u"""
-3:10: Expected an identifier or literal
+5:10: Expected an identifier or literal
"""
return _this_local_name_does_not_exist_
_ERRORS = u"""
-1:37:undeclared name not builtin: _this_global_name_does_not_exist_
-4:43:undeclared name not builtin: _this_local_name_does_not_exist_
+3:37:undeclared name not builtin: _this_global_name_does_not_exist_
+6:43:undeclared name not builtin: _this_local_name_does_not_exist_
"""
void foo(void)
_ERRORS = u"""
-2:13:Use spam() rather than spam(void) to declare a function with no arguments.
+4:13:Use spam() rather than spam(void) to declare a function with no arguments.
"""