* fixes #15884

* micro optimization
This commit is contained in:
Andreas Rumpf 2021-06-10 18:19:20 +02:00 • committed by GitHub
commit f65f760dee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 3 deletions

View file

@ -526,7 +526,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
else:
# BUGFIX: ``fitNode`` is needed here!
# check type compatibility between def.typ and typ
def = fitNode(c, typ, def, def.info)
def = fitNodeForLocalVar(c, typ, def, def.info)
#changeType(def.skipConv, typ, check=true)
else:
typ = def.typ.skipTypes({tyStatic, tySink}).skipIntLit(c.idgen)