skia2/resources/sksl/errors/SwitchWithContinueInside.sksl
John Stiles 1c5eb4b371 Disallow continue inside a switch.
This fails on several platforms in practice, and is of very limited
real-world utility.

Change-Id: Ib476396fc33cb51af6bbcf7fe822d30703ed995d
Bug: skia:12467
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450993
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-21 19:26:40 +00:00

11 lines
320 B
Plaintext

uniform int value;
void main() {
while (true) switch (value) { default: continue; }
for (;;) switch (value) { case 5: continue; }
// Static switches are flattened out so they should not generate an error.
while (true) @switch (0) { default: continue; }
for (;;) @switch (5) { case 5: continue; }
}