xref: /aosp_15_r20/external/skia/resources/sksl/errors/IllegalRecursionSimple.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1// Expect 1 error
2
3// Simple recursion is not allowed, even with branching:
4int fibonacci(int n) { return n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2); }
5
6/*%%*
7potential recursion (function call cycle) not allowed:
8	int fibonacci(int n)
9	int fibonacci(int n)
10*%%*/
11