Diagnostic and cause
СсылкаName is not exported
- Семейство
- topaz
- Этап
- resolve
- Код
TPZ3009
Причина и условия
Selecting a private or absent name through an import selection or namespace member produces TPZ3009. An empty export table follows the same rule.
Связанное правило · Trigger and repair →Действия
Select an exported name, or add export to the declaration when it belongs in the public API.
The compiler facts describe the earlier module implementation. The uniform module contract permits empty export tables and rejects unavailable selections with TPZ3009.
Compiler phase: resolve.
Compiler explanation: A selected import or namespace member names something the module does not export.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
⟨value⟩is not exported by⟨value⟩⟨value⟩ Source⟨value⟩is not exported by⟨value⟩⟨value⟩ Source
Observed for the candidate in Topaz 5.21.3. Execution
- error[TPZ3009]:
hiddenis not exported bylib
The selected import or namespace member is absent from the target module's exported declarations. A matching private declaration does not make the name available to importers. The same condition applies when the export table is empty.
Trigger and repair
Selecting a private or absent name through an import selection or namespace member produces TPZ3009. An empty export table follows the same rule.
Response
СсылкаSelect an exported name, or add export to the declaration when it belongs in the public API.
Reproduction and verification
СсылкаRejected program
Ссылкаimport lib { hidden }
Нет стандартного вывода.let hidden = 1export let visible = 2
Ожидаемый результат
Ожидаемый результат
Этап отклонения resolve. Ненулевой код завершения.
diagnostic-tpz3009 at
example.tpz:1:14
The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.
Corrected program
Ссылкаimport lib { hidden }
export let hidden = 1export let visible = 2
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
This program applies the repair described above. The verification status records whether it has been run.