fixes #2400
This commit is contained in:
parent
019faf00bf
commit
117903a6ae
1 changed files with 4 additions and 1 deletions
|
|
@ -1151,7 +1151,10 @@ proc semMethod(c: PContext, n: PNode): PNode =
|
|||
result = semProcAux(c, n, skMethod, methodPragmas)
|
||||
|
||||
var s = result.sons[namePos].sym
|
||||
if not isGenericRoutine(s) and result.sons[bodyPos].kind != nkEmpty:
|
||||
if not isGenericRoutine(s):
|
||||
# why check for the body? bug #2400 has none. Checking for sfForward makes
|
||||
# no sense either.
|
||||
# and result.sons[bodyPos].kind != nkEmpty:
|
||||
if hasObjParam(s):
|
||||
methodDef(s, fromCache=false)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue