Improve DSL error reporting with invalid array sizes

This eliminates an extra "expected int literal" error when the
array size is an invalid expression.

Change-Id: Iaf5d15316df3ec5200d51d73c14d7e428ce17be9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443236
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/dsl/DSLFunction.cpp b/src/sksl/dsl/DSLFunction.cpp
index 12484f2..8eff3e0 100644
--- a/src/sksl/dsl/DSLFunction.cpp
+++ b/src/sksl/dsl/DSLFunction.cpp
@@ -39,7 +39,7 @@
         if (param->fDeclared) {
             DSLWriter::ReportError("parameter has already been used in another function");
         }
-        SkASSERT(!param->fInitialValue.valid());
+        SkASSERT(!param->fInitialValue.hasValue());
         SkASSERT(!param->fDeclaration);
         param->fDeclared = true;
         std::unique_ptr<SkSL::Variable> paramVar = DSLWriter::CreateParameterVar(*param);