ref #20846; give a deprecation message for overriding = hook (#21020)

give a deprecation message for overriding `=` hook
This commit is contained in:
ringabout 2022-12-05 14:13:51 +08:00 • committed by GitHub
commit 6f96c4bc96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View 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