TypeScript/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt

19 lines
423 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/inferredFunctionReturnTypeIsEmptyType.ts (1 errors) ====
function foo() {
~~~~~~~~~~~~~~~~
if (true) {
~~~~~~~~~~~~~~~
return 42;
~~~~~~~~~~~~~~~~~~
}
~~~~~
else {
~~~~~~~~~~
return "42";
~~~~~~~~~~~~~~~~~~~~
}
~~~~~
};
~
!!! No best common type exists among return expressions.