"""
cdef int i
return <int>sum((i*i for i in seq), start)
+
+
+@cython.test_assert_path_exists(
+ '//ForInStatNode',
+ "//InlinedGeneratorExpressionNode")
+@cython.test_fail_if_path_exists(
+ '//SimpleCallNode',
+ "//InlinedGeneratorExpressionNode//CoerceToPyTypeNode")
+def return_typed_sum_cond_exp(seq):
+ """
+ >>> return_typed_sum_cond_exp([1,2,3,4])
+ 2
+ """
+ cdef int i
+ return <int>sum( 0 if i%2 else 1
+ for i in seq )
+
+
+@cython.test_assert_path_exists(
+ '//ForInStatNode',
+ "//InlinedGeneratorExpressionNode")
+@cython.test_fail_if_path_exists(
+ '//SimpleCallNode',
+ "//InlinedGeneratorExpressionNode//CoerceToPyTypeNode")
+def return_typed_sum_cond_exp_in(seq):
+ """
+ >>> return_typed_sum_cond_exp_in([1,2,3,4,5,6,7,8,9])
+ 3
+ """
+ cdef int i
+ return <int>sum( 0 if i%3 in (0,1) else 1
+ for i in seq )