Diagnostic and cause
СсылкаUnbound name
- Семейство
- topaz
- Этап
- check
- Код
TPZ5002
Причина и условия
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 →Действия
Use the declared spelling, bring the exported value into scope, or add a declaration in the appropriate scope.
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.
Response
СсылкаUse the declared spelling, bring the exported value into scope, or add a declaration in the appropriate scope.
Reproduction and verification
СсылкаRejected program
Ссылкаlet value = missingValue
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения check. Ненулевой код завершения.
diagnostic-tpz5002 at
example.tpz:1:13
Repaired program
Ссылкаlet missingValue = 1let value = missingValue
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.