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

    TPZ5002: Unbound name

    The program referenced a value name that is not visible in this scope.

    Diagnostic and cause

    Link

    Unbound name

    Family
    topaz
    Phase
    check
    Code
    TPZ5002

    Cause and conditions

    A value name must resolve to a binding visible at its use. An unresolved read is rejected with TPZ5002 at the referenced identifier.

    Response

    Use the declared spelling, bring the exported value into scope, or add a declaration in the appropriate scope.

    Source evidence

    Compiler phase: check/runtime.

    Compiler explanation: The program referenced a value name that is not visible in this scope.

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

    • ⟨value⟩ is not bound Source
    • ⟨value⟩ is not bound⟨value⟩ Source
    • ⟨value⟩.⟨value⟩ was removed in 5.21; ⟨value⟩ Source
    • ⟨value⟩ is not bound⟨value⟩ Source
    • ⟨value⟩ is not bound⟨value⟩ Source
    • ⟨value⟩ is not exported by the module bound as ⟨value⟩ (§17)⟨value⟩ Source
    • ⟨value⟩ is not bound Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ5002]: missingValue is not bound

    A value name must resolve to a binding visible at its use. An unresolved read is rejected with TPZ5002 at the referenced identifier.

    Rulediagnostics.tpz5002.p5.rule

    A value reference requires a visible binding

    A value name must resolve to a binding visible at its use. An unresolved read is rejected with TPZ5002 at the referenced identifier.

    Source evidence

    Response

    Link

    Use the declared spelling, bring the exported value into scope, or add a declaration in the appropriate scope.

    Reproduction and verification

    Link

    Rejected program

    Link
    example.tpzRejected programOpen in Playground
    1. let value = missingValue
    Expected outputNonzero exit
    No stdout.
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Rejection during check. Nonzero exit.

    • TPZ5002 diagnostic-tpz5002 at example.tpz:1:13
    Source evidence

    Repaired program

    Link
    example.tpzRepaired program
    1. let missingValue = 1
    2. let value = missingValue
    Expected outputexit 0
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Checking accepts the program. Exit code 0.

    Source evidence

    Menu

    Download