On Wed Jun 7 21:22:00 2023 +0000, Giovanni Mascellani wrote:
It seems so, but my fear is about future maintainability. I'd like the code to have as fewer "non-obvious assumptions" as possible, so that even in the future people can play with it reducing the risk of being burnt (or, say, generate misleading error messages). If what we need is to return a void expression, then let's return a void expression. Though if that's a problem for you I can pass on this.
I get the fear, but I think functionality is important enough in this case. We *probably* want to skip individual parameter type checks if the parameter count doesn't match, but I don't think we want to skip parameter type checks if earlier parameter type checks failed.
Perhaps more saliently, I don't think there's a need to be worried about the assumptions we're making. All we need to do is shove the arguments into IR structures. Only after we've finished parsing, and discarded the shader if it already fails, then we can start making assumptions about what the types of arguments are for well-formed IR.