fix #14585, fix #17589: access to static param now works (#17590)

This commit is contained in:
Timothee Cour 2021-03-31 02:25:26 -07:00 • committed by GitHub
commit 6d7d1e60fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 2 deletions

View file

@ -980,7 +980,7 @@ proc genBindSym(c: PCtx; n: PNode; dest: var TDest) =
proc fitsRegister*(t: PType): bool =
assert t != nil
t.skipTypes(abstractInst-{tyTypeDesc}).kind in {
t.skipTypes(abstractInst + {tyStatic} - {tyTypeDesc}).kind in {
tyRange, tyEnum, tyBool, tyInt..tyUInt64, tyChar}
proc ldNullOpcode(t: PType): TOpcode =