Can you show compiler warnings for error:nil?
Is there a compiler setting that can warn about these? Currently I'm reviewing code and putting in #warning don't use error:nil
whenever I see them.
(I know it's sometimes appropriate to do, but maybe there is a better way to have the开发者_JAVA百科 compiler check sloppy error handling?)
No, since error:nil is completely legal and totally legit (as you even say), there is no way for the compiler to check it.
精彩评论