summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cgmeth.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim
index 1d7f5a6e1..d05e395b9 100644
--- a/compiler/cgmeth.nim
+++ b/compiler/cgmeth.nim
@@ -169,7 +169,8 @@ proc methodDef*(g: ModuleGraph; s: PSym, fromCache: bool) =
       fixupDispatcher(s, disp)
       #echo "fixup ", disp.name.s, " ", disp.id
       when useEffectSystem: checkMethodEffects(disp, s)
-      if sfBase in s.flags and g.methods[i].methods[0] != s:
+      if {sfBase, sfFromGeneric} * s.flags == {sfBase} and
+           g.methods[i].methods[0] != s:
         # already exists due to forwarding definition?
         localError(s.info, "method is not a base")
       return