Diagnostic and cause
링크Malformed import list
- 계열
- topaz
- 단계
- parse
- 코드
TPZ2011
원인과 조건
Each exported name and each resulting local binding appears at most once in a nonempty selected import list.
관련 규칙 · Trigger and repair →대응
Remove repeated selections. Select at least one identifier and give different exported names distinct local aliases.
Compiler phase: parse.
Compiler explanation: An import selection list is empty, duplicate, or contains an invalid name.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
- an import name is an identifier; keywords cannot be selected Source
- this exported name is already selected in this list Source
- this local name is already bound by this list Source
- a selection list selects at least one exported name Source
Observed for the candidate in Topaz 5.21.3. Execution
- error[TPZ2011]: this exported name is already selected in this list
The selection list repeats an exported name. A selected import list must be nonempty, and both exported names and local aliases must be unique. Keywords cannot be selected as names.
Trigger and repair
Each exported name and each resulting local binding appears at most once in a nonempty selected import list.
Response
링크Remove repeated selections. Select at least one identifier and give different exported names distinct local aliases.
Reproduction and verification
링크Rejected program
링크import lib { value, value }
표준 출력 없음.export let value = 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 { value }
export let value = 1
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
This program applies the repair described above. The verification status records whether it has been run.