diff --git a/tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts b/tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts index 59dfb3ff447..8092e909df6 100644 --- a/tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts +++ b/tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts @@ -1,3 +1,5 @@ +// Repro from #13118 + interface Foo { a: A; b: (x: A) => void; @@ -10,4 +12,11 @@ const result = canYouInferThis(() => ({ b: x => { } })) -result.BLAH; \ No newline at end of file +result.BLAH; + +// Repro from #26629 + +function goofus (f: (...args: ARGS) => any ) {} + +goofus((a: string) => ({ dog() { return a; } })); +goofus((a: string) => ({ dog: function() { return a; } }));