Skip to content

astToStr doesn't work inside generics #13524

@timotheecour

Description

@timotheecour

astToStr doesn't work inside generics

Example

  template fun(field) =
    echo astToStr(field)
  proc test1() =
    fun(nonexistant1) # works
  proc test2[T]() =
    fun(nonexistant2) # fails: Error: undeclared identifier: 'nonexistant2'
  test1()

Current Output

Error: undeclared identifier: 'nonexistant2'

Expected Output

works

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions