TypeScript/tests/cases/compiler/errorElaboration.ts
rChaser53 d75de60548 Fix Cannot read property 'text' of undefined crash (#32734)
* Fix Cannot read property 'text' of undefined crash

* fix condition for tsx

* Rename and improve the method
2019-08-19 12:08:34 -07:00

24 lines
423 B
TypeScript

// Repro for #5712
interface Ref<T> {
prop: T;
}
interface Container<T> {
m1: Container<Ref<T>>;
m2: T;
}
declare function foo(x: () => Container<Ref<number>>): void;
let a: () => Container<Ref<string>>;
foo(a);
// Repro for #25498
function test(): {[A in "foo"]: A} {
return {foo: "bar"};
}
// Repro for #32358
const foo = { bar: 'a' };
const x = ({ [foo.bar]: c }) => undefined;