mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-08 02:46:15 -05:00
Add regression test
This commit is contained in:
@@ -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; } }));
|
||||
|
||||
Reference in New Issue
Block a user