skia2/resources/sksl/runtime_errors/LoopStructureErrors.rts
Brian Osman 552fcb9a1b Remove flexible runtime effects entirely
All internal usage has migrated to MakeFor..., this removes the old
program kind, and updates some tests.

Bug: skia:11813
Change-Id: I56733b071270e1ae3fab5d851e23acf6c02e3361
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402536
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-29 16:02:27 +00:00

13 lines
508 B
Plaintext

// Expect 5 errors
void loop_length_ok() { for (int i = 0; i < 128; i++) {} } // LEGAL: See kMaxUnrollableLoopLength
void loop_too_long() { for (int i = 0; i < 129; i++) {} }
void infinite_loop() { for (int i = 0; i < 1; i += 0) {} }
void set(out int x) { x = 1; }
void inc(inout int x) { x++; }
void index_modified() { for (int i = 0; i < 2; i++) { i++; } }
void index_out_param() { for (int i = 0; i < 1; i++) { set(i); } }
void index_inout_param() { for (int i = 0; i < 1; i++) { inc(i); } }