Nim
Nim copied to clipboard
`=destroy` for non-var failed to compile when `nim doc`
Description
A regression, maybe only occur in Nim 2.0.6, not in devel branch or 2.0.4
only causes compile-error when nim doc
and other commands like nim c
or nim check
just work.
Simplest demo:
type O = object
proc `=destroy`*(self: O) = discard
Nim Version
Nim Compiler Version 2.0.6 [Windows: amd64] Compiled at 2024-06-17 Copyright (c) 2006-2023 by Andreas Rumpf active boot switches: -d:release
Current Output
Error: signature for '=destroy' must be proc[T: object](x: var T)
Expected Output
(compiles and no error reported)
Possible Solution
No response
Additional Information
I found it shown on nimpylib's test