handzlikchris / handzlikchris/FastScriptReload

Incorrect rewrite for switch assignment (using new language features)

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
2.2k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

```
/* 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,
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.