Compiler inconsistent reporting between Xcode and GitHub CI/CD

The compiler has been complaining about this for as long as I can remember, even in Xcode, so I have simply learned never to write that. However, I can think of no reason why the compiler couldn’t be improved to support it. Indeed, if you can build it with Xcode, then I guess that very improvement was made recently.

Instead of renaming the variable, I usually dodge the error by making the scope explicit: self.level(...), WhateverType.level(...), WhateverModule.level(...), etc.

If the two are behaving differently, then they are using different versions of Swift. Synchronizing the versions should erase any differences.

Test it in each environment. If there is also e.g. macOS vs Linux at play, then even using the same patch number cannot guarantee that any platform related bugs will be triggered in the opposite environment.

1 Like