mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
fixes #24764 It now consumes the `conv(x)` arg for the explicit sinking. So the explicit sinking is kept as it is. Follows up https://github.com/nim-lang/Nim/pull/20585 Related issues: https://github.com/nim-lang/Nim/issues/20572 Probably the same needs to be applied to explicit `copy` to prevent a copy turning into a sink
22 lines
367 B
Nim
22 lines
367 B
Nim
discard """
|
|
matrix: "--mm:arc"
|
|
"""
|
|
|
|
import m24764
|
|
|
|
type QWidget* = object of QObject
|
|
proc `=copy`(dest: var QWidget, source: QWidget) {.error.}
|
|
proc `=sink`(dest: var QWidget, source: QWidget) =
|
|
`=sink`(QObject(dest), QObject(source))
|
|
|
|
proc show(v: QWidget) = discard
|
|
|
|
proc main() =
|
|
let btn = QWidget()
|
|
|
|
let tmp = proc() =
|
|
btn.show()
|
|
|
|
btn.show()
|
|
|
|
main() |