TP0300
Warning: warning: unreachable code (a statement, match arm or except clause)
Messages
Section titled “Messages”unreachable match armunreachable except clause, with help'<B>' is already caught aboveunreachable code(M16)
Example
Section titled “Example”From the golden case tests/cases/m19/tp0300_match_expr.tpn:
# An unreachable arm is a warning, and doesn't count toward the result type (SPEC §5.1.1).let n = 2let s = match n: _: "any" 1: 5print(s)The compiler reports:
tp0300_match_expr.tpn:5:5: warning TP0300: unreachable match armThe specification lists every code.
© 2026 Discover Edge, LLC · Taipan is released under the MIT License.