Community
Participate
Working Groups
Given the following EGL Source: function getData()returns(any) return (null); end No validation message is reported to indicate that null can't be returned through a non-nullable return type.
I have added the missing validation for passing a null to a non-nullable parm. I also added validation for the return statement, so that a function that is defined as returning a non-nullable cannot return a null literal. The following were changed: DefaultProblemRequestor IProblemRequestor EGLValidationResources.properties FunctionArgumentValidator ReturnStatementValidator
What is our general philosophy for validating literals? Since we can't validate code that uses non-literals, I believe we have avoided validating literals in the past as well?
The validation may be a bit inconsistant, but there is precidence for checking literal values.
I think we should try to find as many errors as possible at compile time.
Verified in Version: 0.8.0.v201203300902-1DV-FjuJ6QMOF4nynxT88h8G.