Revert "fixes #20883; Unspecified generic on default value segfaults the compiler" (#21028)

Revert "fixes #20883; Unspecified generic on default value segfaults the compiler (#20917)"

This reverts commit 10b6e4f5b4.
This commit is contained in:
ringabout 2022-12-06 12:50:16 +08:00 • committed by GitHub
commit feb0481ba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -807,8 +807,7 @@ proc tryResolvingStaticExpr(c: var TCandidate, n: PNode,
# N is bound to a concrete value during the matching of the first param.
# This proc is used to evaluate such static expressions.
let instantiated = replaceTypesInBody(c.c, c.bindings, n, nil,
allowMetaTypes = allowUnresolved,
fromStaticExpr = true)
allowMetaTypes = allowUnresolved)
result = c.c.semExpr(c.c, instantiated)
proc inferStaticParam*(c: var TCandidate, lhs: PNode, rhs: BiggestInt): bool =