Diagnostic and cause
링크Malformed concurrent form
- 계열
- topaz
- 단계
- parse
- 코드
TPZ2005
원인과 조건
A concurrent expression has an else block exactly when it has a timeout argument. Each arm has a name followed by : and an expression.
대응
Remove the else block for concurrent without a timeout. When selecting a timeout, write timeout: followed by a duration and provide an else block.
Compiler phase: parse.
Compiler explanation: A concurrent timeout and else branch are not paired correctly.
Message templates. The marker ⟨value⟩ stands for text computed for the reported program.
concurrenttakes only atimeout:argument Sourceelserequires theconcurrent(timeout: .form Source. . ) - the
concurrent(timeout: .form requires an. . ) elseblock Source
The reproduction attaches an else block to concurrent without a timeout. The timeout form requires an else block, and the form without a timeout rejects one.
Trigger and repair
A concurrent expression has an else block exactly when it has a timeout argument. Each arm has a name followed by : and an expression.
Response
링크Remove the else block for concurrent without a timeout. When selecting a timeout, write timeout: followed by a duration and provide an else block.
Reproduction and verification
링크Rejected program
링크let value = concurrent { first: 1 } else { 0 }
표준 출력 없음.기대 결과
The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.
Corrected program
링크let value = concurrent { first: 1 }
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
This program applies the repair described above. The verification status records whether it has been run.