Add regression test

This commit is contained in:
Anders Hejlsberg
2018-08-25 16:09:18 -07:00
parent 9c551a107a
commit 09bc7505a7

View File

@@ -1,3 +1,5 @@
// Repro from #13118
interface Foo<A> {
a: A;
b: (x: A) => void;
@@ -10,4 +12,11 @@ const result = canYouInferThis(() => ({
b: x => { }
}))
result.BLAH;
result.BLAH;
// Repro from #26629
function goofus <ARGS extends any[]> (f: (...args: ARGS) => any ) {}
goofus((a: string) => ({ dog() { return a; } }));
goofus((a: string) => ({ dog: function() { return a; } }));