TypeError: Cannot convert typetest_T417.Bar to typetest_T417.Foo
"""
cdef val = <Foo?>arg
+
+
+cdef int count = 0
+
+cdef object getFoo():
+ global count
+ count += 1
+ return Foo()
+
+def test_getFoo():
+ """
+ >>> test_getFoo()
+ 1
+ """
+ cdef int old_count = count
+ cdef Foo x = getFoo()
+ return count - old_count
+
+def test_getFooCast():
+ """
+ >>> test_getFooCast()
+ 1
+ """
+ cdef int old_count = count
+ cdef Foo x = <Foo?>getFoo()
+ return count - old_count