Diagnostic and cause
LinkUnbound 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.
Related rule: A value reference requires a visible bindingResponse
Use the declared spelling, bring the exported value into scope, or add a declaration in the appropriate scope.
Source evidence
- compiler/crates/topaz_diag/src/explain.rs at
151141d7bb44· 593-605 - compiler/crates/topaz_product_runtime/src/diagnostic.rs at
151141d7bb44· 63-63 - compiler/crates/topaz_self_frontend/topaz/checker/bodies_captures.tpz at
151141d7bb44· 565-565 - compiler/crates/topaz_self_frontend/topaz/checker/call_facts.tpz at
151141d7bb44· 487-487 - compiler/crates/topaz_self_frontend/topaz/checker/expression_core.tpz at
151141d7bb44· 621-621 - compiler/crates/topaz_self_frontend/topaz/checker/patterns.tpz at
151141d7bb44· 876-876 - compiler/crates/topaz_self_frontend/topaz/checker/statements.tpz at
151141d7bb44· 492-492 - compiler/crates/topaz_self_frontend/topaz/checker/expression_core.tpz at
151141d7bb44· 630-653 - compiler/crates/topaz_self_frontend/topaz/checker/syntax_index.tpz at
151141d7bb44· 485-505
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⟩.was removed in 5.21; ⟨value⟩ Source⟨value⟩ ⟨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]:
missingis not boundValue
A value name must resolve to a binding visible at its use. An unresolved read is rejected with TPZ5002 at the referenced identifier.
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
- compiler/crates/topaz_self_frontend/topaz/checker/expression_core.tpz at
151141d7bb44· 630-653 - compiler/crates/topaz_self_frontend/topaz/checker/syntax_index.tpz at
151141d7bb44· 485-505
Response
LinkUse the declared spelling, bring the exported value into scope, or add a declaration in the appropriate scope.
Reproduction and verification
LinkRejected program
Linklet value = missingValue
No stdout.
Expected result
Source evidence
- compiler/crates/topaz_self_frontend/topaz/checker/expression_core.tpz at
151141d7bb44· 630-653 - compiler/crates/topaz_self_frontend/topaz/checker/syntax_index.tpz at
151141d7bb44· 485-505
Repaired program
Linklet missingValue = 1let value = missingValue
Expected result
Expected result
Checking accepts the program. Exit code 0.
Source evidence
- compiler/crates/topaz_self_frontend/topaz/checker/expression_core.tpz at
151141d7bb44· 630-653 - compiler/crates/topaz_self_frontend/topaz/checker/syntax_index.tpz at
151141d7bb44· 485-505