microsoft / microsoft/TypeScript
fixUnusedIdentifier may remove a used side-effect
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
TypeScript Version: 2.9.0-dev.20180506
Code
{ const x = launchMissiles(); }
Expected behavior:
const x = removed, and missiles still launched.
Actual behavior:
Missiles unlaunched.
Unfortunately we have no way of knowing whether a function call does have side effects (#17181), so doing this in general might be annoying as users have to manually delete function calls with unused results.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Start by locating the fixUnusedIdentifier entry point and reproduce the issue with the provided { const x = launchMissiles(); } example. Determine how unused identifiers are removed while preserving the function call's possible side effect, and verify that the compiled output still launches the missiles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100