본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    진단

    TPZ4006 · 6.0.0에서 퇴역

    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.

    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.

    규칙diagnostics.tpz4006.p5.rule

    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

    링크
    example.tpzRejected program플레이그라운드 열기 →
    1. function classify(value: int) -> int {
    2. match (value) {
    3. case 1 => 1
    4. }
    5. }
    6. let result = classify(9)
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check example.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    거절 단계 check. 종료 코드가 0이 아닙니다.

    Adding a final unconditional arm repairs the match.

    Repaired program

    링크
    example.tpzRepaired program
    1. function classify(value: int) -> int {
    2. match (value) {
    3. case 1 => 1
    4. case _ => 0
    5. }
    6. }
    7. let result = classify(9)
    기대 출력종료 코드 0
    $ topaz check example.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 0.

    Adding a final unconditional arm repairs the match.

    Current diagnostic

    링크

    Non-exhaustive match →

    메뉴

    다운로드 →