skia2/resources/sksl/errors/InvalidUnary.sksl
Brian Osman 6c3b23fcf3 SkSL: Ensure struct declarations contain at least one member
Bug: skia:11314
Change-Id: I66476543462ae378a5bfb6cbd902dfa2f5fc45f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369917
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-12 20:57:56 +00:00

10 lines
411 B
Plaintext

struct Foo { float x; } bar;
void preincrement_matrix() { float4x4 x = float4x4(1); ++x; }
void predecrement_vector() { float3 x = float3(1); --x; }
void postincrement_matrix() { float4x4 x = float4x4(1); x++; }
void postdecrement_vector() { float3 x = float3(1); x--; }
void not_integer() { int x = !12; }
void positive_struct() { Foo x = +bar; }
void negative_struct() { Foo x = -bar; }