Перейти к содержимому
Топаз6.0 · До релиза
Загрузка →

Поиск в документации

Спецификация 6.0

Выберите результат стрелками и нажмите Enter, чтобы открыть его.

Введите имя API, номер диагностики, правило или тему проекта.

    Диагностика TPZ5002

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

    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.

    Действия

    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⟩.⟨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.

    Правилоdiagnostics.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.

    Response

    Ссылка

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

    Reproduction and verification

    Ссылка

    Rejected program

    Ссылка
    example.tpzRejected programОткрыть песочницу →
    1. let value = missingValue
    Ожидаемый выводНенулевой код завершения
    Нет стандартного вывода.
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Этап отклонения check. Ненулевой код завершения.

    Repaired program

    Ссылка
    example.tpzRepaired program
    1. let missingValue = 1
    2. let value = missingValue
    Ожидаемый выводКод завершения 0
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Проверка принимает программу. Код завершения 0.

    Меню

    Загрузка →