Skip to content

Commit c75f2c8

Browse files
committed
Don't inferFromIndexTypes() twice
1 parent b968922 commit c75f2c8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17924,7 +17924,6 @@ namespace ts {
1792417924
inferFromProperties(source, target);
1792517925
inferFromSignatures(source, target, SignatureKind.Call);
1792617926
inferFromSignatures(source, target, SignatureKind.Construct);
17927-
inferFromIndexTypes(source, target);
1792817927
}
1792917928
}
1793017929

@@ -17962,6 +17961,7 @@ namespace ts {
1796217961
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
1796317962
}
1796417963
}
17964+
inferFromIndexTypes(source, target);
1796517965
}
1796617966

1796717967
function inferFromSignatures(source: Type, target: Type, kind: SignatureKind) {

tests/baselines/reference/restTupleElements1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ f0([]); // Error
173173
>[] : never[]
174174

175175
f0([1]);
176-
>f0([1]) : [number, number]
176+
>f0([1]) : [number, unknown]
177177
>f0 : <T, U>(x: [T, ...U[]]) => [T, U]
178178
>[1] : [number]
179179
>1 : 1

tests/baselines/reference/user/create-react-app.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Exit Code: 1
22
Standard output:
3-
test/fixtures/issue-5176-flow-class-properties/src/App.js(5,8): error TS8010: 'types' can only be used in a .ts file.
3+
test/fixtures/issue-5176-flow-class-properties/src/App.js(5,8): error TS8010: Type annotations can only be used in TypeScript files.
44
test/fixtures/issue-5176-flow-class-properties/src/App.js(5,13): error TS1005: ';' expected.
55
test/fixtures/webpack-message-formatting/src/AppBabel.js(6,8): error TS17008: JSX element 'div' has no corresponding closing tag.
66
test/fixtures/webpack-message-formatting/src/AppBabel.js(8,7): error TS17002: Expected corresponding JSX closing tag for 'span'.

0 commit comments

Comments
 (0)