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

    TPZ2008: Reserved module form

    The source uses a module syntax form reserved but not defined by the current grammar.

    Diagnostic and cause

    Link

    Reserved module form

    Family
    topaz
    Phase
    parse
    Code
    TPZ2008

    Cause and conditions

    Module imports use dotted identifier paths. String and template paths and use items are rejected.

    Response

    Write import lib and provide the corresponding module file. Use import for module imports.

    Source evidence

    Compiler phase: parse.

    Compiler explanation: The source uses a module syntax form reserved but not defined by the current grammar.

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

    • string and template module paths are reserved and unused; module paths are dotted identifiers Source
    • use is reserved and unused; did you mean import? Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ2008]: string and template module paths are reserved and unused; module paths are dotted identifiers

    The import uses a quoted module path. Module paths are dotted identifiers. The reserved use item produces the same diagnostic.

    Rulediagnostics.tpz2008.rule

    Trigger and repair

    Module imports use dotted identifier paths. String and template paths and use items are rejected.

    Source evidence

    Response

    Link

    Write import lib and provide the corresponding module file. Use import for module imports.

    Reproduction and verification

    Link

    Rejected program

    Link
    example.tpzRejected programOpen in Playground
    1. import "lib"
    Expected outputNonzero exit
    No stdout.
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Rejection during parse. Nonzero exit.

    • TPZ2008 diagnostic-tpz2008 at example.tpz:1:1

    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 programOpen in Playground
    1. import lib
    Expected outputexit 0
    $ topaz check example.tpz · target product 5.21.3
    lib.tpzCorrected programOpen in Playground
    1. export let value = 1
    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