Incorrect rewrite for switch assignment (using new language features)
handzlikchris opened this issue · 0 comments
handzlikchris commented
/* 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,
};