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

    TPZ1001: Semicolon in delimiter list

    A semicolon appeared where a comma/newline-separated delimiter list is required.

    Diagnostic and cause

    Link

    Semicolon in delimiter list

    Family
    topaz
    Phase
    layout
    Code
    TPZ1001

    Cause and conditions

    List elements use commas. A semicolon in a delimiter list produces TPZ1001 at the semicolon.

    Response

    Use a comma between list elements. Put independent statements in a block that accepts statements.

    Source evidence

    Compiler phase: layout.

    Compiler explanation: A semicolon appeared where a comma/newline-separated delimiter list is required.

    Message templates. The marker ⟨value⟩ stands for text computed for the reported program.

    • ; does not separate items inside a delimiter list; use , Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ1001]: ; does not separate items inside a delimiter list; use ,

    A semicolon occurs inside a list whose elements require a list separator. Statement separation does not make it an element separator.

    Rulediagnostics.tpz1001.rule

    Trigger and repair

    List elements use commas. A semicolon in a delimiter list produces TPZ1001 at the semicolon.

    Source evidence

    Response

    Link

    Use a comma between list elements. Put independent statements in a block that accepts statements.

    Reproduction and verification

    Link

    Rejected program

    Link
    example.tpzRejected programOpen in Playground
    1. let values = [1; 2]
    Expected outputNonzero exit
    No stdout.
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Rejection during layout. Nonzero exit.

    • TPZ1001 diagnostic-tpz1001 at example.tpz:1:16

    The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.

    Source evidence

    Corrected program

    Link
    example.tpzCorrected program
    1. let values = [1, 2]
    Expected outputexit 0
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Checking accepts the program. Exit code 0.

    This program applies the repair described above. The verification status records whether it has been run.

    Source evidence

    Menu

    Download