Skip to content

Commit

Permalink
fix trivial segfault in sigmatch for static types (#24196)
Browse files Browse the repository at this point in the history
refs #7382, caused by #24005
  • Loading branch information
metagn authored Sep 29, 2024
1 parent 4f5c0ef commit 7cbe031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/sigmatch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
var r = tryResolvingStaticExpr(c, f.n)
if r == nil: r = f.n
if not exprStructuralEquivalent(r, aOrig.n) and
not (aOrig.n.kind == nkIntLit and
not (aOrig.n != nil and aOrig.n.kind == nkIntLit and
inferStaticParam(c, r, aOrig.n.intVal)):
result = isNone
elif f.base.kind == tyGenericParam:
Expand Down

0 comments on commit 7cbe031

Please sign in to comment.