From c1c53bebf1c013df65d6e4b62aaf226420b4cd36 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sat, 25 Mar 2023 15:47:38 +0800 Subject: [PATCH] fixes private fields --- compiler/semgnrc.nim | 6 +++--- compiler/semobjconstr.nim | 14 +++++++++----- tests/generics/m3770.nim | 25 ++++++++++++++++++++++--- tests/generics/t3770.nim | 12 ++++++++++++ 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index fa37af850a..e85f8659cd 100644 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -506,12 +506,12 @@ proc semGenericStmt(c: PContext, n: PNode, result[i] = semGenericStmt(c, n[i], flags, ctx) if result[0].kind == nkSym: let fmoduleId = getModule(result[0].sym).id - var isVisable = false + var isVisible = false for module in c.friendModules: if module.id == fmoduleId: - isVisable = true + isVisible = true break - if isVisable: + if isVisible: for i in 1..