skia2/resources/sksl/errors/ArrayConstructorElementCount.sksl
John Stiles 248f57b39b Reject array constructors with the wrong number of elements.
We now catch this error at IR generation time; previously we'd send it
to the driver (where it would fail to compile).

Change-Id: I45890214ffa164be1c0f359320f942bc4dc479ca
Bug: skia:11265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365697
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-03 22:33:02 +00:00

7 lines
212 B
Plaintext

// Expect 3 errors
float noElements[2] = float[2]();
float notEnoughElements[2] = float[2](1);
float rightNumberOfElements[2] = float[2](1, 2);
float tooManyElements[2] = float[2](1, 2, 3);