Closed metagn closed 1 week ago
Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from 128090c593df557c9e7c17e966a735312986a496
Hint: mm: orc; opt: speed; options: -d:release 178820 lines; 8.491s; 664.246MiB peakmem
fixes #23730
Since #23188 the compiler errors when matching a type variable to an uninstantiated static value. However sometimes an uninstantiated static value is given even when only a type match is being performed to the base type of the static type, in the given issue this case is:
To deal with this issue we only error when matching against a type variable constrained to
static
.Not sure if the
q.typ.kind == tyGenericParam and q.typ.genericConstraint == tyStatic
check is necessary, the code above for deciding whether the variable becomesskConst
doesn't use it.