summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorJason Beetham <beefers331@gmail.com>2021-12-22 23:12:56 -0700
committerGitHub <noreply@github.com>2021-12-23 07:12:56 +0100
commitfa96e56ad06f0562b5d608cc896a9b17c9512958 (patch)
tree4cec100b9a5252e2f8a3b9a47969598e66bed922 /compiler
parent81d32cf7e53b244776c4196098be154c1223d726 (diff)
downloadNim-fa96e56ad06f0562b5d608cc896a9b17c9512958.tar.gz
Fixed object field access of static objects in generics (#19283) [backport]
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 0df332689..c593efe55 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1414,7 +1414,7 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
 
   if ty.kind in tyUserTypeClasses and ty.isResolvedUserTypeClass:
     ty = ty.lastSon
-  ty = skipTypes(ty, {tyGenericInst, tyVar, tyLent, tyPtr, tyRef, tyOwned, tyAlias, tySink})
+  ty = skipTypes(ty, {tyGenericInst, tyVar, tyLent, tyPtr, tyRef, tyOwned, tyAlias, tySink, tyStatic})
   while tfBorrowDot in ty.flags: ty = ty.skipTypes({tyDistinct, tyGenericInst, tyAlias})
   var check: PNode = nil
   if ty.kind == tyObject: