Closed mike000000000 closed 1 year ago
I had to mark src/afw/generate/object/AdaptiveFunctionTest/compiler_assert.json as "implemented": false
because the result value needed to be undefined and there's not a way to put that in json.
@JeremyGrieshop I didn't see anything in the app that needed to change to support function return type 'void', but just mentioning it here in case you think of anything. Other than that, all of the built-in functions that used to return 'null' now return 'undefined' and their return data type is 'void'. So it can be closed after any doc changes (if there are any) are made.
One other note, see the comment above about compiler_assert.json. I didn't know if you want to have a way to say result is undefined or just not worry about it.
Do we need to do something similar to how we came up with result
and resultDataType
in order for other languages to turn JSON back into workable values, such as undefined
, NaN
, Infinity
?
Do we need to do something similar to how we came up with
result
andresultDataType
in order for other languages to turn JSON back into workable values, such asundefined
,NaN
,Infinity
?
This is a JSON object that your python code reads and generates tests, so libafw is not involved in this particular case. However, let's discuss when it is.
Fix so that expect: undefined does not match on thrown error.
The impacted test for compiler_assert
has been fixed and moved into src/afw/tests/generated
now. I believe this issue can be closed.
Currently, 'null' is returned when there is not a 'return' statement or anything else that produces a return value. This should be changed to 'undefined' in these situations. It also might be that 'undefined' should be returned in some other cases as well which will be documented in this issues as found.
As a note, 'null' was historically being returned because we didn't have an 'undefined'. Now that we do, 'undefined' is more appropriate.
Also, change functions that currently have a data type of 'null' to be 'void' as appropriate.