Repository: TypeScript
Issue: If you pass a generic type argument to another generic type, constraints cannot be inferred correctly.
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

**TypeScript Version:**  3.7.5

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
Conditional types, Generics

**Expected behavior:**
No errors occur.

**Actual behavior:**
typescript compiler say "T that extends string does not extend string because string does not extend string."

<!-- Did you find other bugs that looked similar? -->
**Related Issues:**

**Code**
```ts
type ExtendsCheck<A extends B, B> = A;
// I want this function to handle not only strings but also numbers, boolean, etc.
type GetLiteralParent<T extends string> = T extends string ? string : never;
type Correct1 = ExtendsCheck<"test1" | "test2", GetLiteralParent<"test1" | "test2">>;
type Correct2 = ExtendsCheck<string, GetLiteralParent<string>>;

// Type 'T' does not satisfy the constraint 'GetLiteralParent<T>'.
// Type 'string' is not assignable to type 'GetLiteralParent<T>'.(2344)
type ErrorHappen<T extends string> = ExtendsCheck<T, GetLiteralParent<T>>;
```



<details><summary><b>Output</b></summary>

```ts
"use strict";

```


</details>


<details><summary><b>Compiler Options</b></summary>

```json
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "useDefineForClassFields": false,
    "alwaysStrict": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "downlevelIteration": false,
    "noEmitHelpers": false,
    "noLib": false,
    "noStrictGenericChecks": false,
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "esModuleInterop": true,
    "preserveConstEnums": false,
    "removeComments": false,
    "skipLibCheck": false,
    "checkJs": false,
    "allowJs": false,
    "declaration": true,
    "experimentalDecorators": false,
    "emitDecoratorMetadata": false,
    "target": "ES2017",
    "module": "ESNext"
  }
}
```


</details>

**Playground Link:** [Provided](https://www.typescriptlang.org/play/#code/C4TwDgpgBAogHsCA7AJgZwMIAsIGMDWAPAIJQQLLpQBCANDQHxQC8UxA3ALABQA9L1ACSUAO4BDJMCjAsASzRQAZgFckuYLID2SaZqhYJKADbQkmqdqMgoaYACdZSAOYKARsqlijaPUmUBbVwg7NHpXTU0TCXoIYFwAOh5QSCgAcViAGVlEOy8ABTE7ZGBCABUyClQFWwdnJlZy8kQqm3tHJygAflbajoAuKCQIADdgrm5k6AxNOyL1AEYWWEr0bDwiACJEW3mNqAAfKC2IWwAmDfp04Cyc-MLiwmOdvcOn4HOGBnHJqGnZvHeS3gzVWOAIhBq7UumWywTuRUkELadS+PB4-CgpXA0AA5KUcVAUJoToNzDYxBo0IprDJoLhtDUxI4pDirjc4UYCgiSqUGDjEnwBFiUjjIc4CfJSZ40GhZE4kGJXCZdNJsVBWTDbpz7ojefyABSnADMABYTQBKJJqmCzGYACTEYEgSDKFRB1WRTnqy3da3BpWh11huW13LKn3YQA)