Throwing an error is to invasive for 0.11.x, and also one needs to be able to subclass/access attributes of builtin types before we get rid of the declaration altogether.
if self.visibility == 'extern':
if self.module_name == '__builtin__' and self.class_name in Builtin.builtin_types:
- error(self.pos, "%s already a builtin Cython type" % self.class_name)
- return
+ warning(self.pos, "%s already a builtin Cython type" % self.class_name, 1)
self.entry = home_scope.declare_c_class(
name = self.class_name,
pass
cdef list foo = []
-_ERRORS = u"""
+
+# This is too invasive for Python 0.11.x, re-enable in 0.12
+NEW_ERRORS = u"""
:2:4: list already a builtin Cython type
"""
+
+_ERRORS = u"""
+:5:16: Cannot coerce list to type 'list'
+"""
+