| Age | Commit message (Collapse) | Author | 
 | 
The idea is to store the end position of the first defer closure that
assigns an error variable from the outer scope. Then, we can check the
`return` statements in the rest of the function after that position to
ensure they use the error variable.
 | 
 | 
Clarify intended contents.
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
Give the check a name.
 | 
 | 
We don't want to report error variables that were declared inside the
closure, as those don't depend on the outside scope.
 | 
 | 
 | 
 | 
Give it a name.
 | 
 | 
Trying to make this easier to read.
 | 
 | 
 | 
 | 
While looking at the assignments in the `defer`, if we encounter an
`error`-type assignment, emit a diagnostic if the error named in the lhs
of the assignment is not present in the return signature's names.
Not sure if this makes sense to me yet. I probably only want to report a
problem for a non-declare assignment of an error value when the error
type in the return signature is _not_ named at all.
 | 
 | 
Store the index where we find the `error` type in the function
signature's return list so we can use it later to get the corresponding
variable names, if any.
 | 
 | 
And add a test function that does have named returned values.
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
I didn't read the docs carefully, it turns out `FuncType` only gives us
the signature. If we want access to the function body as well to be able
to walk its AST, we need a `FuncDecl`.
 | 
 | 
I was having a hard time figuring out how to get the function where a
`defer` occurs from the defer, so I decided to look at all functions
first instead, and find out if they contain `defer`s.
 | 
 | 
Still working out how to traverse the AST to be able to see the objects
I need.
 |