19 lines
No EOL
423 B
Text
19 lines
No EOL
423 B
Text
==== tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts (1 errors) ====
|
|
function foo() {
|
|
~~~~~~~~~~~~~~~~
|
|
if (true) {
|
|
~~~~~~~~~~~~~~~
|
|
return 42;
|
|
~~~~~~~~~~~~~~~~~~
|
|
}
|
|
~~~~~
|
|
else {
|
|
~~~~~~~~~~
|
|
return "42";
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
}
|
|
~~~~~
|
|
};
|
|
~
|
|
!!! No best common type exists among return expressions.
|
|
|