Repository: TypeScript
Issue: Mapping with enum key type and literal value type gives not assignable error. 
Labels: Bug,Help Wanted

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->
map enum key literal value 

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about typing for maps.

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.6.2#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgeTgG8AoOcuAawH4AuOAcgE9gBnBuAH0aQgYG4SAXxIlQkWHGBIArgFs4AUWJkKDTACNsHALyNN2AHTYIchgBpV5BgBNg6XYzvpjpi8NHjo8GEzB4AWTg9Ugo4AG08ZCUAXTpGABsEVChMBIEPEhMkVng5AAZ6IJCrCMVw9S0GGJj6BiSUtIs4AHoWuBgACwRWOBsINgZ4AHdoSlLwxUNnWsTktCbW9q6euFGoSlZhQTFwb2ICoUEgA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
// We can quickly address your report if:
//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
//  - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
//  - We have to pare too much extraneous code.
//  - We have to clone a large repo and validate that the problem isn't elsewhere.
//  - The sample is confusing or doesn't clearly demonstrate what's wrong.

export enum E {
    'a-b-c' = 'abc.com',
    'def' = 'def.com',
}

export type M = {
    [e in E]?: 'literal';
}

const m0: M = {
    [E['a-b-c']]: 'literal', // error here
    [E.def]: 'literal' // no error
};

export {m0};
```

### 🙁 Actual behavior

When use `Enum['value']` as the key of a mapping, values assigned to string literal types are not correctly recognized. 
The string literal is always lifted as string type and there is an error `Type of computed property's value is 'string', which is not assignable to type '"literal"'.`

However, if `Enum.value` form is used as the mapping key, everything works fine. 

### 🙂 Expected behavior

The aforementioned error should not occur. 
Type check should be consistent when using `Enum['value']` and `Enum.value`.