Skip to content

generic parameter leaks into typed macro invocation in proc definition parameter list #1519

Open
@alaviss

Description

@alaviss

Example

import macros

macro foo(T: typed): untyped =
  echo T.typeKind
  T

proc x[T](v: foo(T)) = discard

x[float](10)

Actual Output

ntyGenericParam
test.nim(7, 17) Error: type expected, but expression has no type

Expected Output

ntyFloat

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompiler/semRelated to semantic-analysis system of the compiler

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions