mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-04 06:28:38 +00:00
fixes #26023; incorrect sink requires a copy
This commit is contained in:
@@ -65,3 +65,17 @@ method handleConn*(myParam: PubSub,
|
||||
proto: string) {.base, async.} =
|
||||
myParam.peers.withValue(conn.peerInfo.peerId, peer):
|
||||
let peerB = peer[]
|
||||
|
||||
|
||||
|
||||
block:
|
||||
type M = object
|
||||
|
||||
proc `=dup`(_: M): M {.error.}
|
||||
proc take(_: sink M) = discard
|
||||
|
||||
proc test() =
|
||||
var value: M
|
||||
take(value)
|
||||
|
||||
test()
|
||||
|
||||
Reference in New Issue
Block a user