You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exhaustive pattern matches on numeric values yield compiler warning #6928
I created a function to compute the AES S-Box. This is its code:
letsBox k =match k with|0uy ->0x63uy
|1uy ->0x7cuy
|2uy ->0x77uy
|3uy ->0x7buy
/// It lasts forever...|251uy ->0x0fuy
|252uy ->0xb0uy
|253uy ->0x54uy
|254uy ->0xbbuy
|255uy ->0x16uy
However, the compiler raises an "Incomplete pattern matches on this expression" warning, even though my code handles all 256 possible cases for the byte type.
Repro steps
Already covered.
Expected behavior
Code compiles successfuly without warnings.
Actual behavior
Known workarounds
Have a redundant wildcard case at the end of match statement.
Activity
#6928 - Removed SByte and Byte from default case requirement and adde…
dotnet#6928 - Removed SByte and Byte from default case requirement an…