Skip to content
Topazdocs

Search documentation

Specification 6.0

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

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

    Download →

    Design decisions

    Diagnostics

    TPZ0002 is retired and reserved

    Adopted November 7, 2026 · 6.0.0 · Being verified

    Problem

    Removing block comments does not erase existing diagnostic links and records. Reusing the code would change what those links mean.

    Decision

    Retire TPZ0002 in 6.0.0 and retain its identity, meaning and documentation address. Parsing rejects /* with TPZ2001.

    Examples

    A block comment on one line is rejected

    example.tpzA block comment on one line is rejectedOpen in Playground →
    1. import std.io
    2. let value = 1 /* no line break */ +2
    3. io.writeLine("{value}")
    Expected outputNonzero exit
    $ topaz check example.tpz --language-version 6.0
    Expected result

    Expected result

    Rejection during parse. Nonzero exit.

    Alternatives considered

    • Reuse TPZ0002 for a different error. Old records would look as if they referred to the new error.

    Why

    Historical diagnostics keep their original meaning.

    Changed rules Reserved code and current rejection →Block comment spellings are rejected →

    Call depth counts active user calls

    Adopted November 9, 2026 · 6.0.0 · Being verified

    Problem

    Recursion can involve lambdas and callbacks invoked by a standard function. Without a counting rule, different targets could report failure at different call sites.

    Decision

    • For TPZ5009, count named functions, lambdas, user callbacks, protocol methods and receiver methods. Do not count standard functions themselves or defer blocks.
    • Concurrent arms inherit the depth at group entry. Implementations must avoid stack exhaustion below 1000 active calls.

    Alternatives considered

    • Leave depth to target-specific stack limits. The same program could stop at different calls on different targets.

    Why

    The program structure shows which operations add to depth.

    Changed rules Counted calls and the runtime depth limit →