fix skslc crash when ternary parameter types don't match

BUG=skia:5968

Change-Id: I541c7925ac83e830bd53015961312810042046c5
Reviewed-on: https://skia-review.googlesource.com/6545
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index 4dd92f3..a33e6f1 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -307,6 +307,9 @@
     test_failure(r,
                  "void main() { int x = 5 > 2 ? true : 1.0; }",
                  "error: 1: ternary operator result mismatch: 'bool', 'float'\n1 error\n");
+    test_failure(r,
+                 "void main() { int x = 5 > 2 ? vec3(1) : 1.0; }",
+                 "error: 1: ternary operator result mismatch: 'vec3', 'float'\n1 error\n");
 }
 
 DEF_TEST(SkSLInterfaceBlockStorageModifiers, r) {