Skip to content

Static generic parameter does not work in param type scopes in procs #22607

@ASVIEST

Description

@ASVIEST

Description

proc test[x: static bool](
  t: (
    when x:
      int
    else:
      float
     )
) = discard

Nim Version

Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-08-09
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: d136af0
active boot switches: -d:release

Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-08-31
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: b3912c2
active boot switches: -d:release

Current Output

Error: cannot generate code for: x

Expected Output

No response

Possible Solution

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions