Commit graph

6 commits

Author SHA1 Message Date
Sheetal Nandi 9d31631fd7 Test cases of function infering return type of functions
if f is a contextually typed function expression (section 4.9.3), the inferred return type is the union type (section 3.3.4) of the types of the return statement expressions in the function body, ignoring return statements with no expressions.
Otherwise, the inferred return type is the first of the types of the return statement expressions in the function body that is a supertype (section 3.8.3) of each of the others, ignoring return statements with no expressions. A compile-time error occurs if no return statement expression has a type that is a supertype of each of the others.
2014-11-04 16:40:56 -08:00
Anders Hejlsberg 3d92adec7b Fix widening in object literal property assignments 2014-09-10 12:58:30 -07:00
Jason Freeman 44c2453ec6 Don't use UseTypeOfFunction in typeWriter 2014-08-28 12:52:44 -07:00
Jason Freeman cc20bb19d0 Baseline and harness changes 2014-08-25 10:55:22 -07:00
Jason Freeman f72ceab987 Accept recent changes in typeWriter baselines 2014-08-18 14:29:42 -07:00
Jason Freeman 27bf9b702e Accept type baselines 2014-08-15 14:37:48 -07:00