Identity and cause
링크Generated rule factory used as a value
- 계열
- topaz
- 단계
- check
- 코드
TPZ5500
사용 조건
기본 포함 · 미정
An admitted package lock and its actual std.lispex.rules generated binding are required.
The SELF producer and its pipeline call are source reviewed. Installed-product exposure and default-distribution availability remain Pending.
원인과 조건
A generated std. factory must be the direct callee of a call.
Using the factory itself as a value produces TPZ5500 during checking.
관련 규칙 · Generated rule factory references →대응
Invoke the generated factory directly with the limits required by Generated rule factories. Do not store, return, or pass the factory itself. The admitted lock determines its name and the returned handle follows the standard library contract.
Cause
링크Generated rule factory references
A generated std. factory must be the direct callee of a call.
Using the factory itself as a value produces TPZ5500 during checking.
The public 5.21.3 examples on this page check placement with the 5.21 factory signature. Topaz 6.0 defines its signature and preparation limits in Generated rule factories. The locked-factory example specifies the 6.0 call.
이유
A direct callee identifies the selected lock binding. Passing the factory as a value would hide that selection.
This restriction applies to generated rule factories, not to every function with no parameters. It is checked before execution and does not by itself report a failure while evaluating a Lispex rule.
Response
링크Invoke the generated factory directly with the limits required by Generated rule factories. Do not store, return, or pass the factory itself. The admitted lock determines its name and the returned handle follows the standard library contract.
Generated factory examples
링크Call the generated factory directly
링크import std.lispex.rules { approve }let rule = approve()
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
This public 5.21.3 example checks factory placement with the maintained 5.21 application package and its committed lock. Replace src/main.tpz without changing that package.
Reject a generated factory used as a value
링크import std.lispex.rules { approve }let factory = approve
표준 출력 없음.기대 결과
This public 5.21.3 example checks factory placement with the maintained 5.21 application package and its committed lock. Replace src/main.tpz without changing that package.