Diagnostic and cause
링크Variadic parameter is not final
- 계열
- topaz
- 단계
- check
- 코드
TPZ5024
원인과 조건
A variadic parameter must be the final parameter of its declaration or function type.
관련 규칙 · Variadic parameter is not final →대응
Move the variadic parameter to the end of the declaration or function type.
Compiler phase: check.
Compiler explanation: A variadic function type or parameter list puts the variadic slot before another slot.
Message templates are Pending. The explanation above is not an observed CLI message.
A variadic parameter must be the final parameter of its declaration or function type.
Variadic parameter is not final
A variadic parameter must be the final parameter of its declaration or function type.
Response
링크Move the variadic parameter to the end of the declaration or function type.
Reproduction and verification
링크Rejected program
링크function tail(...values: int, last: int) -> int { last }
표준 출력 없음.기대 결과
The intended rejection is recorded as an implementation limitation. A current SELF producer does not establish the diagnostic source location, so that location remains Pending.
Repaired program
링크function tail(last: int, ...values: int) -> int { last }
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
The intended rejection is recorded as an implementation limitation. A current SELF producer does not establish the diagnostic source location, so that location remains Pending.