Add test for construction of void.

This fails exactly as it should, but we had no test for it.

Change-Id: I0aa3307c444f2c9bc3512ff43b784a56a7c09856
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/472449
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
John Stiles 2021-11-17 09:46:28 -05:00 committed by SkCQ
parent 3868636fb8
commit bcd6d4901d
3 changed files with 8 additions and 0 deletions

View File

@ -220,6 +220,7 @@ sksl_error_tests = [
"/sksl/errors/VectorInlinedIndexOutOfRange.sksl",
"/sksl/errors/VectorSlice.sksl",
"/sksl/errors/VertexEarlyReturn.vert",
"/sksl/errors/VoidConstructor.sksl",
"/sksl/errors/VoidInStruct.sksl",
"/sksl/errors/VoidVariable.sksl",
"/sksl/errors/WhileTypeMismatch.sksl",

View File

@ -0,0 +1,3 @@
void main() {
void();
}

View File

@ -0,0 +1,4 @@
### Compilation failed:
error: 2: cannot construct 'void'
1 error