summaryrefslogtreecommitdiff
path: root/tests/errors/builtin_type_inheritance.pyx
blob: 1c6ad31e17bb8b96b3d3561ed6a6beadffb099c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# mode: error

# current restriction: cannot inherit from PyVarObject (see ticket #152)

cdef class MyTuple(tuple):
    pass

cdef class MyBytes(bytes):
    pass

cdef class MyStr(str): # only in Py2, but can't know that during compilation
    pass

_ERRORS = """
5:19: inheritance from PyVarObject types like 'tuple' is not currently supported
8:19: inheritance from PyVarObject types like 'bytes' is not currently supported
11:17: inheritance from PyVarObject types like 'str' is not currently supported
"""