Diagnostic and cause
링크Reserved module form
- 계열
- topaz
- 단계
- parse
- 코드
TPZ2008
원인과 조건
Module imports use dotted identifier paths. String and template paths and use items are rejected.
관련 규칙 · Trigger and repair →대응
Write import lib and provide the corresponding module file. Use import for module imports.
Compiler phase: parse.
Compiler explanation: The source uses a module syntax form reserved but not defined by the current grammar.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
- string and template module paths are reserved and unused; module paths are dotted identifiers Source
useis reserved and unused; did you meanimport? Source
Observed for the candidate in Topaz 5.21.3. Execution
- error[TPZ2008]: string and template module paths are reserved and unused; module paths are dotted identifiers
The import uses a quoted module path. Module paths are dotted identifiers. The reserved use item produces the same diagnostic.
Trigger and repair
Module imports use dotted identifier paths. String and template paths and use items are rejected.
Response
링크Write import lib and provide the corresponding module file. Use import for module imports.
Reproduction and verification
링크Rejected program
링크import "lib"
표준 출력 없음.기대 결과
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 value = 1
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
This program applies the repair described above. The verification status records whether it has been run.