본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    진단 TPZ5500

    Explains rejection of an escaping rule factory in std.lispex.rules.

    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.lispex.rules factory must be the direct callee of a call.

    Using the factory itself as a value produces TPZ5500 during checking.

    대응

    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

    링크
    규칙topaz.rule.rule-factory.direct-call

    Generated rule factory references

    A generated std.lispex.rules 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

    링크
    src/main.tpzCall the generated factory directly플레이그라운드 열기 →
    1. import std.lispex.rules { approve }
    2. let rule = approve()
    기대 출력종료 코드 0
    $ topaz check src/main.tpz --compiler self · 대상 제품 5.21.3
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 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

    링크
    src/main.tpzReject a generated factory used as a value플레이그라운드 열기 →
    1. import std.lispex.rules { approve }
    2. let factory = approve
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check src/main.tpz --compiler self · 대상 제품 5.21.3
    기대 결과

    기대 결과

    거절 단계 check. 종료 코드가 0이 아닙니다.

    • TPZ5500 →

      generated-rule-factory-value-escape at src/main.tpz:2:15

    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.

    Verification

    링크

    Related entries

    링크

    check →

    메뉴

    다운로드 →