Diagnostic and cause
링크Imported module exports nothing
- 계열
- topaz
- 단계
- resolve
- 코드
TPZ3010
원인과 조건
Historical SELF behavior: importing a module with no exported declarations produces TPZ3010. The recommended Modules contract permits an empty-export namespace import and uses TPZ3009 when an absent member is selected. The namespace acceptance and current-product limitation on the Modules page are the normative /v6.0/en/docs expectations for that decision; the reproduction below preserves the historical diagnostic identity.
관련 규칙 · Trigger and repair →대응
For the current SELF product, put initialization in the entry or expose a real public operation that the application needs. The recommended contract requires no dummy export: an ordinary namespace import can initialize a module with no public members. TPZ3010 remains reserved for the historical restriction and is not reassigned.
Compiler phase: resolve.
Compiler explanation: A module import targets a module with no exported surface.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
⟨value⟩exports nothing; v5.2 has no side-effect-only imports Source
Observed for the candidate in Topaz 5.21.3. Execution
- error[TPZ3010]:
libexports nothing; v5.2 has no side-effect-only imports
Historical SELF restriction: the imported module has an empty export table. The recommended uniform module contract permits that namespace import and initializes the module normally.
Trigger and repair
Historical SELF behavior: importing a module with no exported declarations produces TPZ3010. The recommended Modules contract permits an empty-export namespace import and uses TPZ3009 when an absent member is selected. The namespace acceptance and current-product limitation on the Modules page are the normative /v6.0/en/docs expectations for that decision; the reproduction below preserves the historical diagnostic identity.
Response
링크For the current SELF product, put initialization in the entry or expose a real public operation that the application needs. The recommended contract requires no dummy export: an ordinary namespace import can initialize a module with no public members. TPZ3010 remains reserved for the historical restriction and is not reassigned.
Reproduction and verification
링크Rejected program
링크import lib
표준 출력 없음.let privateValue = 1
기대 결과
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
export let privateValue = 1
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
This program applies the repair described above. The verification status records whether it has been run.