We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c77e1a commit 13cc75eCopy full SHA for 13cc75e
compiler/ast.nim
@@ -809,8 +809,10 @@ proc replaceSon*(n: PNode; i: int; newson: PNode) {.inline.} =
809
810
proc last*(n: PType): PType {.inline.} =
811
if n.state == Partial: loadType(n)
812
- assert n.kind != tyProc
813
- n.sonsImpl[^1]
+ if n.kind == tyProc and n.nImpl.len > 1:
+ n.nImpl[^1].sym.typ
814
+ else:
815
+ n.sonsImpl[^1]
816
817
proc elementType*(n: PType): PType {.inline.} =
818
0 commit comments