Closed shibukawa closed 10 years ago
IMO this is the correct behavior and the compiler should continue to work as such.
In case of _Main.func2
the returning type is declared explicitly and thus implicit conversion from string to variant is performed.
In the other two cases, the returning type needs to be deducted from either of function expression or the argument types of the called function, and compiler is reporting errors since the two differ.
OK. I understand.
This code is invalid for compiler: