Is the Compiler Wrong? - Part II
Here’s a simpler example of the previous post. This won’t compile either. Once again, the compiler reports that not all code paths return a value. Is it wrong?
string ThisWillNotCompile(bool input) { if (input) return "Hello, world."; if (!input) return "Howdy, world."; }







Write a comment