FS3886: This list expression contains a single tuple element. This warning is too trigger happy

Aperta
#20,962 3 commenti 4 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
fsharp
Ambito
compilers

Direzione di ricerca

Start by locating the implementation and tests for warning FS3886 in the F# compiler; the issue does not name specific files. Check how the warning determines whether a single tuple element was likely intended as multiple list elements, then add coverage for elements with different types and for elements with the same type. Done when the warning is suppressed for the shown mixed-type tuple and retained when the elements have the same type.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Request
let a =
  [
    1,"a"
  ]

Did you mean to use ';' instead of ',' to separate list elements?

The warning doesn't make sense when the list elements aren't of the same type.

I would like the warning to be given only if the elements are of the same type.

Lingua principale
F#
Stelle
4.3k
Fork
883
Merge medio
2g 12h
PR unite (30g)
80

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/fsharp

Tutte le issue di dotnet/fsharp

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.