We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
=
=sink
None of the following compiles
type Foo = object Bar = object foo: Foo proc `=`*(dest: var Foo, src: Foo) = echo "hello World!" system.`=`(dest, src) proc `=sink`*(dst: var Foo, src: Foo) {.inline.} = system.`=sink`(dst, src) proc initFoo(): Foo = discard proc initBar(foo: sink Foo): Bar = echo "hi" result.foo = foo echo "ho" proc main = let x = initFoo() echo "ha" let y = initBar(x) main()
Error: cannot bind another '=sink' to: Foo; previous declaration was constructed here implicitly: .../Nim/weave/build/dest.nim(8, 13)
Error: cannot bind another '=' to: Foo; previous declaration was constructed here implicitly: .../nim-#devel/lib/system.nim(471, 16)
The workaround is to forward declare one of them.
The text was updated successfully, but these errors were encountered:
sink
No branches or pull requests
None of the following compiles
The workaround is to forward declare one of them.
The text was updated successfully, but these errors were encountered: