Hello, I'm a new contributor and I've been looking into https://bugs.swift.org/browse/SR-10988 for the past week and I seem to be stuck. Can I get some pointers for that?
My actions to take would be:
- Visit brace statement
- Get last statement and cast it to an expression
- Check if expression is unused
- If it is unused then check if is a valid return type
- If it is a valid return type then proceed with fix-it
Anything that should be different? Also, I have seen that the existing diagnostic missing return last expression is emitted in SIL, but typeChecking occurs in Sema, how should I approach this?
Or maybe I am completely on a wrong path here...