Skip to content
Topaz6.0 · Before release
Download

Search documentation

Specification 6.0 · Not released · Tested product 5.21.3

Use arrow keys to choose a result. Press Enter to open.

Type an API name, diagnostic number, rule, or project topic.

    Diagnostics

    TPZ6001: Native emitter cannot lower this construct yet

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

    Diagnostic and cause

    Link

    Native emitter cannot lower this construct yet

    Family
    topaz
    Phase
    emit
    Code
    TPZ6001

    Cause and conditions

    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.

    Source evidence

    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.

    Rulediagnostics.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.

    Source evidence

    Response

    Link

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

    Reproduction and verification

    Link

    Rejected program

    Link
    example.tpzRejected programOpen in Playground
    1. let value = match ([1, 2]) {
    2. case [..left, ..right] => 0
    3. case _ => 1
    4. }
    Expected outputNonzero exit
    $ topaz emit example.tpz --compiler self --target rust · target product 5.21.3
    Expected result

    Expected result

    Rejection during emit. Nonzero exit.

    • TPZ6001 multiple-rest-emission-refusal

    The required primary-location contract is Pending.

    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.

    Source evidence

    Repaired program

    Link
    example.tpzRepaired programOpen in Playground
    1. let value = match ([1, 2]) {
    2. case [first, ..rest] => 0
    3. case _ => 1
    4. }
    Expected outputexit 0
    $ topaz emit example.tpz --compiler self --target rust · target product 5.21.3
    Expected result

    Expected result

    Checking accepts the program. Exit code 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.

    Source evidence

    Menu

    Download