handzlikchris / handzlikchris/FastScriptReload

Incorrect rewrite for switch assignment (using new language features)

Aperta
#107 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
C#
Stelle
2.2k
Fork
167
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```
/* bool drawin = corner switch {
*/ //Auto-excluded to prevent exceptions - see docs PathCorner.UpperLeft => drawBorder[3],
PathCorner.UpperRight => drawBorder[0],
PathCorner.LowerRight => drawBorder[1],
PathCorner.LowerLeft => drawBorder[2],
=> true,

So it thorws an "; missing" error, due to its not excluding enough.

This is the original:

bool drawin = corner switch {
PathCorner.UpperLeft => drawBorder[3],
PathCorner.UpperRight => drawBorder[0],
PathCorner.LowerRight => drawBorder[1],
PathCorner.LowerLeft => drawBorder[2],
=> true,
};
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the switch-expression assignment shown in the issue and trace the C# rewrite handling for this syntax. Compare the transformed result with the original example; done when the rewrite preserves the complete switch expression without producing a missing-semicolon error.

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

Valutazione

Stack tecnologico
csharp, unity
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.