This is interpreted as a trailing closure, instead of being interpreted as an error where you are trying to have a computed property with an initial value (computed properties don't have initial values).
We should check if the test/Parse directory has a test case which checks for this. If not, we should add this test case and leave a comment indicating why this test case is present.
The text was updated successfully, but these errors were encountered:
The correct thing is that the code should be regareded as a trailing closure, right?
Yes, that's correct.
Do we expect an error to occur when testing?
We don't expect any error to happen during testing, but the reason to add the test case (in case it doesn't exist already) is to avoid regressing this edge case when changing the parser. Sometimes one might forget to realize all the edge cases that one needs to consider, and make some change assuming that it won't break anything, but in reality there is some edge case which does break. So it's helpful to have tests for edge cases even if the code is working alright.