Skip to content
Topaz6.0 · Before release
Download

Search documentation

Specification 6.0 · Not released · Tested product 5.21.3

Use arrow keys to choose a result. Press Enter to open.

Type an API name, diagnostic number, rule, or project topic.

    Diagnostics

    TPZ5512: Explicit type arguments are not allowed here

    The callee is not a generic function/static member that accepts explicit type arguments.

    Diagnostic and cause

    Link

    Explicit type arguments are not allowed here

    Family
    topaz
    Phase
    check
    Code
    TPZ5512

    Cause and conditions

    A call with no permitted type parameters rejects a nonempty explicit type-argument list with TPZ5512.

    Response

    Remove the type-argument list. Check the declaration before using explicit specialization syntax.

    Source evidence

    Compiler phase: check.

    Compiler explanation: The callee is not a generic function/static member that accepts explicit type arguments.

    Message templates. The marker ⟨value⟩ stands for text computed for the reported program.

    • this call is not generic, but ⟨value⟩ type argument⟨value⟩ ⟨value⟩ supplied Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ5512]: this call is not generic, but 1 type argument was supplied

    A call with no permitted type parameters rejects a nonempty explicit type-argument list with TPZ5512.

    Rulediagnostics.tpz5512.p5.rule

    Explicit type arguments are not allowed here

    A call with no permitted type parameters rejects a nonempty explicit type-argument list with TPZ5512.

    Source evidence

    Response

    Link

    Remove the type-argument list. Check the declaration before using explicit specialization syntax.

    Reproduction and verification

    Link

    Rejected program

    Link
    example.tpzRejected programOpen in Playground
    1. function identity(value: int) -> int { value }
    2. let result = identity<int>(1)
    Expected outputNonzero exit
    No stdout.
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Rejection during check. Nonzero exit.

    • TPZ5512 diagnostic-tpz5512 at example.tpz:2:14
    Source evidence

    Repaired program

    Link
    example.tpzRepaired program
    1. function identity(value: int) -> int { value }
    2. let result = identity(1)
    Expected outputexit 0
    $ topaz check example.tpz · target product 5.21.3
    Expected result

    Expected result

    Checking accepts the program. Exit code 0.

    Source evidence

    Menu

    Download