TypeScript/tests/baselines/reference/arrayFilter.symbols
Nima Zahedi 3e2fff2150 Array.prototype.filter.not.forcing.boolean (#7779)
* Add test for issue

* Fix issue

* Add baselines

* fix issue
2016-04-18 12:46:52 -07:00

25 lines
773 B
Plaintext

=== tests/cases/compiler/arrayFilter.ts ===
var foo = [
>foo : Symbol(foo, Decl(arrayFilter.ts, 0, 3))
{ name: 'bar' },
>name : Symbol(name, Decl(arrayFilter.ts, 1, 5))
{ name: null },
>name : Symbol(name, Decl(arrayFilter.ts, 2, 5))
{ name: 'baz' }
>name : Symbol(name, Decl(arrayFilter.ts, 3, 5))
]
foo.filter(x => x.name); //should accepted all possible types not only boolean!
>foo.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --))
>foo : Symbol(foo, Decl(arrayFilter.ts, 0, 3))
>filter : Symbol(Array.filter, Decl(lib.d.ts, --, --))
>x : Symbol(x, Decl(arrayFilter.ts, 6, 11))
>x.name : Symbol(name, Decl(arrayFilter.ts, 1, 5))
>x : Symbol(x, Decl(arrayFilter.ts, 6, 11))
>name : Symbol(name, Decl(arrayFilter.ts, 1, 5))