Add test for variables of type void.
We should, of course, detect this and report an error. Change-Id: I42b3be6e714a1f367d3251842506a384f2afe019 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/472447 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
3b1a71caba
commit
fe3cfc1d4f
@ -221,6 +221,7 @@ sksl_error_tests = [
|
||||
"/sksl/errors/VectorInlinedIndexOutOfRange.sksl",
|
||||
"/sksl/errors/VectorSlice.sksl",
|
||||
"/sksl/errors/VertexEarlyReturn.vert",
|
||||
"/sksl/errors/VoidVariable.sksl",
|
||||
"/sksl/errors/WhileTypeMismatch.sksl",
|
||||
]
|
||||
|
||||
|
5
resources/sksl/errors/VoidVariable.sksl
Normal file
5
resources/sksl/errors/VoidVariable.sksl
Normal file
@ -0,0 +1,5 @@
|
||||
// Expect 2 errors
|
||||
void func();
|
||||
|
||||
void a;
|
||||
void b = func();
|
4
tests/sksl/errors/VoidVariable.glsl
Normal file
4
tests/sksl/errors/VoidVariable.glsl
Normal file
@ -0,0 +1,4 @@
|
||||
### Compilation failed:
|
||||
|
||||
error: 5: opaque type 'void' cannot use initializer expressions
|
||||
1 error
|
Loading…
Reference in New Issue
Block a user