Here @code_warntype foo() shows a problem. The issue is that you’re using the same name for two objects of differing type, which sometimes the compiler is smart enough to understand, but not always. If you give the first one a different name, the problem goes away.
5 Likes