Closed
Description
The compiler already behaves as per spec, and variables referenced directly or indirectly in their initializers resolve to any. The previous implementation did not just assign them to any, by attempted to go deeper one level, here are some examples;
var a = { f: a };
Now:
a : any
Was:
a: { f: any };
var fibonacci = _.memoize(n => n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); } );
Now:
fibonacci : any
Was:
fibonacci : (n: any) => any
var n1 = n1++;
Now:
n1 : any
Was:
n1 : number
see tests:
- tests/cases/compiler/recursiveObjectLiteral.ts
- tests/cases/compiler/underscoreTest1_underscoreTests.ts
- tests/cases/conformance/statements/VariableStatements/recursiveInitializer.ts