TypeScript/tests/baselines/reference/genericContextualTypingSpecialization.js

8 lines
240 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [genericContextualTypingSpecialization.ts]
var b: number[];
b.reduce<number>((c, d) => c + d, 0); // should not error on '+'
//// [genericContextualTypingSpecialization.js]
var b;
b.reduce(function (c, d) { return c + d; }, 0);