xref: /aosp_15_r20/external/skia/resources/sksl/errors/IllegalRecursionMutual.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1// Expect 1 error
2
3// Straightforward mutual recursion (not allowed)
4bool is_even(int n);
5bool is_odd (int n) { return n == 0 ? false : is_even(n - 1); }
6bool is_even(int n) { return n == 0 ? true  : is_odd (n - 1); }
7
8/*%%*
9potential recursion (function call cycle) not allowed:
10	bool is_odd(int n)
11	bool is_even(int n)
12	bool is_odd(int n)
13*%%*/
14