Closed
Description
Found in #24247
TypeScript Version: 2.9.0-dev.201xxxxx
Search Terms:
Code
// @ts-check
var A = {};
A.B = {};
A.B.C = [
{
o: "no",
y: 42
}
];
A.Foo = class {
/**
* @returns {?A}
*/
foo() {
return A.B.C.find(x => !!x);
}
}
Actual behavior:
(2 errors instead of 1 - one without elaboration)
In trying to edit this down further, I've found that removing the nested namespace on B
seems to remove the bug, as does changing the return type of foo
to not reference A
, or changing from a class to an object literal for A.Foo
- so it seems a great deal of things must be kept in place to reproduce this error.