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>
diff --git a/gn/sksl_tests.gni b/gn/sksl_tests.gni
index a408897..77651c2 100644
--- a/gn/sksl_tests.gni
+++ b/gn/sksl_tests.gni
@@ -220,6 +220,7 @@
"/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",
diff --git a/resources/sksl/errors/VoidConstructor.sksl b/resources/sksl/errors/VoidConstructor.sksl
new file mode 100644
index 0000000..a2a2d1b
--- /dev/null
+++ b/resources/sksl/errors/VoidConstructor.sksl
@@ -0,0 +1,3 @@
+void main() {
+ void();
+}
diff --git a/tests/sksl/errors/VoidConstructor.glsl b/tests/sksl/errors/VoidConstructor.glsl
new file mode 100644
index 0000000..ed3eb61
--- /dev/null
+++ b/tests/sksl/errors/VoidConstructor.glsl
@@ -0,0 +1,4 @@
+### Compilation failed:
+
+error: 2: cannot construct 'void'
+1 error