fixes #10038; deprecate generic methods, they are unreliable
This commit is contained in:
parent
36a398d96f
commit
16aa10dfe1
3 changed files with 8 additions and 3 deletions
|
|
@ -1712,8 +1712,9 @@ proc semMethodPrototype(c: PContext; s: PSym; n: PNode) =
|
|||
if x.kind == tyObject and t.len-1 == n.sons[genericParamsPos].len:
|
||||
foundObj = true
|
||||
x.methods.add((col,s))
|
||||
if not foundObj:
|
||||
message(c.config, n.info, warnDeprecated, "generic method not attachable to object type is deprecated")
|
||||
message(c.config, n.info, warnDeprecated, "generic methods are deprecated")
|
||||
#if not foundObj:
|
||||
# message(c.config, n.info, warnDeprecated, "generic method not attachable to object type is deprecated")
|
||||
else:
|
||||
# why check for the body? bug #2400 has none. Checking for sfForward makes
|
||||
# no sense either.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue