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"
Нет стандартного вывода.Ожидаемый результат
Ожидаемый результат
Этап отклонения parse. Ненулевой код завершения.
diagnostic-tpz2008 at
example.tpz:1: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 value = 1
Ожидаемый результат
Ожидаемый результат
Проверка принимает программу. Код завершения 0.
This program applies the repair described above. The verification status records whether it has been run.