Navigation: X# Documentation > X# Compiler Errors and Warnings
Error XS8523
The discard pattern is not permitted as a case label in a switch statement. Use 'case var _:' for a discard pattern, or 'case @_:' for a constant named '_'.