give a deprecation message for overriding `=` hook
This commit is contained in:
parent
1b5e03f975
commit
6f96c4bc96
2 changed files with 13 additions and 0 deletions
11
tests/deprecated/tequalhook.nim
Normal file
11
tests/deprecated/tequalhook.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
discard """
|
||||
errormsg: "Overriding `=` hook is deprecated; Override `=copy` hook instead"
|
||||
matrix: "--warningAsError[Deprecated]:on"
|
||||
"""
|
||||
|
||||
type
|
||||
SharedString = object
|
||||
data: string
|
||||
|
||||
proc `=`(x: var SharedString, y: SharedString) =
|
||||
discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue