Diagnostic and cause
링크Match missed at runtime
- 계열
- topaz
- 단계
- run
- 코드
TPZ4006
원인과 조건
대응
Make the match exhaustive. Open input types need a final unguarded wildcard or name pattern.
Historical compiler facts for the reserved code. These facts describe the former diagnostic, not a 6.0.0 trigger.
Compiler phase: runtime.
Compiler explanation: A runtime match expression reached no matching arm.
Message templates are Pending. The explanation above is not an observed CLI message.
TPZ4006 is retired in Topaz 6.0.0. Its former meaning was a runtime match with no matching arm. The code must not be emitted or assigned a new meaning.
Reserved runtime code and current checking diagnostic
TPZ4006 is retired in Topaz 6.0.0. Its code and former meaning, runtime match failure, remain reserved and must not be reused. An incomplete match produces TPZ5021 during checking under match exhaustiveness.
이유
Checking every match removes a separate runtime failure for missing cases. A reserved code keeps historical diagnostics and links understandable.
Response
링크Make the match exhaustive. Open input types need a final unguarded wildcard or name pattern.
Reproduction and verification
링크Rejected program
링크function classify(value: int) -> int {match (value) {case 1 => 1}}let result = classify(9)
표준 출력 없음.기대 결과
Adding a final unconditional arm repairs the match.
Repaired program
링크function classify(value: int) -> int {match (value) {case 1 => 1case _ => 0}}let result = classify(9)
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
Adding a final unconditional arm repairs the match.