Skip to content

repr produces invalid code for typed lambdas #18636

@timotheecour

Description

@timotheecour

Example

macro deb1(a) =
  echo a.repr
macro deb2(a: typed) =
  echo a.repr
deb1:
  (proc (): auto = 12)()
deb2:
  (proc (): auto = 12)()

Current Output

(proc (): auto =
  12)()

proc (): auto = result = 12()

Expected Output

(proc (): auto =
  12)()

(proc (): auto = result = 12)()

Additional Information

1.5.1 6b3c77e

Metadata

Metadata

Assignees

No one assigned

    Labels

    AST RendererIssues related to the compiler turning AST back into Nim code as a string.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions