return 1
return 0
+ def assignable_from_resolved_type(self, other_type):
+ # TODO: handle operator=(...) here?
+ return other_type.is_cpp_class and other_type.is_subclass(self)
+
def attributes_known(self):
return self.scope is not None
finally:
del sqr
+cdef double get_area(Rectangle s):
+ return s.area()
+
+def test_value_call(int w):
+ """
+ >>> test_value_call(5)
+ (25.0, 25.0)
+ """
+ cdef Square *sqr = new Square(w)
+ cdef Rectangle *rect = sqr
+ try:
+ return get_area(sqr[0]), get_area(rect[0])
+ finally:
+ del sqr