Skip to content

Commit 09bc750

Browse files
committed
Add regression test
1 parent 9c551a1 commit 09bc750

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Repro from #13118
2+
13
interface Foo<A> {
24
a: A;
35
b: (x: A) => void;
@@ -10,4 +12,11 @@ const result = canYouInferThis(() => ({
1012
b: x => { }
1113
}))
1214

13-
result.BLAH;
15+
result.BLAH;
16+
17+
// Repro from #26629
18+
19+
function goofus <ARGS extends any[]> (f: (...args: ARGS) => any ) {}
20+
21+
goofus((a: string) => ({ dog() { return a; } }));
22+
goofus((a: string) => ({ dog: function() { return a; } }));

0 commit comments

Comments
 (0)