Fix crash caused by assertion with evolving array type (#38398)

* Properly finalize evolving array type in getTypeAtFlowCall

* Add regression test
This commit is contained in:
Anders Hejlsberg
2020-05-07 14:05:57 -07:00
committed by GitHub
parent f08863d2fc
commit 7798f532df
5 changed files with 89 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
// @strict: true
export function unsafeCast<T>(_value: unknown): asserts _value is T { }
function yadda() {
let out = [];
out.push(100)
unsafeCast<any>(out);
return out;
}