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

문서 검색

명세 6.0

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

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

    진단 TPZ6001

    The program is accepted by the language, but the selected native emit path lacks a proven lowering for this construct.

    Diagnostic and cause

    링크

    Native emitter cannot lower this construct yet

    계열
    topaz
    단계
    emit
    코드
    TPZ6001

    원인과 조건

    A multiple-rest list pattern retains the established TPZ6001 emission-refusal expectation. A single-rest list pattern has supported Rust emission. The language admission policy for multiple rests remains open.

    대응

    Use one rest element per list pattern. Match additional structure inside that remainder when it is needed.

    Compiler phase: emit.

    Compiler explanation: The program is accepted by the language, but the selected native emit path lacks a proven lowering for this construct.

    Message templates are Pending. The explanation above is not an observed CLI message.

    A multiple-rest list pattern retains the established TPZ6001 emission-refusal expectation. A single-rest list pattern has supported Rust emission. The language admission policy for multiple rests remains open.

    규칙diagnostics.tpz6001.p5.rule

    Multiple list rests and emission refusal

    A multiple-rest list pattern retains the established TPZ6001 emission-refusal expectation. A single-rest list pattern has supported Rust emission. The language admission policy for multiple rests remains open.

    Response

    링크

    Use one rest element per list pattern. Match additional structure inside that remainder when it is needed.

    Reproduction and verification

    링크

    Rejected program

    링크
    example.tpzRejected program플레이그라운드 열기 →
    1. let value = match ([1, 2]) {
    2. case [..left, ..right] => 0
    3. case _ => 1
    4. }
    기대 출력0이 아닌 종료 코드
    $ topaz emit example.tpz --compiler self --target rust · 대상 제품 5.21.3
    기대 결과

    기대 결과

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

    필수 기본 위치 계약은 미정입니다.

    The established Rust backend reports the multiple-rest-emission-refusal cause. Current SELF emits several Rust slice rests without establishing that refusal. The P5 runtime/emit product runner preserves TPZ6001 and nonzero; the exact primary location remains pending. These examples do not decide whether the language should admit multiple rests.

    Repaired program

    링크
    example.tpzRepaired program플레이그라운드 열기 →
    1. let value = match ([1, 2]) {
    2. case [first, ..rest] => 0
    3. case _ => 1
    4. }
    기대 출력종료 코드 0
    $ topaz emit example.tpz --compiler self --target rust · 대상 제품 5.21.3
    기대 결과

    기대 결과

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

    The established Rust backend reports the multiple-rest-emission-refusal cause. Current SELF emits several Rust slice rests without establishing that refusal. The P5 runtime/emit product runner preserves TPZ6001 and nonzero; the exact primary location remains pending. These examples do not decide whether the language should admit multiple rests.

    메뉴

    다운로드 →