microsoft / microsoft/TypeScript
Duplicate keys do not error
Open
Nobody has claimed this yet.
Awaiting More Feedback
Suggestion
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
🔎 Search Terms
🕗 Version & Regression Information
- This is a crash
- This changed between versions latest and latest_
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
No response
💻 Code
export const func = (demo: string) => {
const obj = {
[demo]: '1',
[demo]: '1',
};
console.log(obj);
};
🙁 Actual behavior
no error
🙂 Expected behavior
error
Additional information about the issue
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides only an inline TypeScript snippet and no repository file or test. Start by reproducing the computed-property example in the TypeScript compiler or Playground, then trace the diagnostic and object-literal checking entry points. Done means establishing whether this construct should produce an error and adding or updating a regression test for the agreed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100