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
module A
type Foo*[T] = object v*: T proc `=destroy`*[T](f: var Foo[T]) = echo "destroyed ", f.v proc `=copy`*[T](f: var Foo[T], s: Foo[T]) = echo "copied ", f.v proc foo*[T](t: sink Foo[T]) = var t = t #same for let t.v = T(2)
module B
import a var a = Foo[int](v: 1) foo(a) echo a
b.nim(4, 4) template/generic instantiation of foo from here a.nim(10, 7) Error: invalid type: 'sink Foo[system.int]' for var
b.nim(4, 4) template/generic instantiation of
from here
a.nim(10, 7) Error: invalid type: 'sink Foo[system.int]' for var
Introduced in #15690
$ nim -v Nim Compiler Version 1.5.1 [Linux: amd64] Compiled at 2020-11-24 git hash: d306a04466b7f1129620dc3ab35443119ed4c867
The text was updated successfully, but these errors were encountered:
fixes #16119 [backport:1.4]
00c5e4f
9f1c5f6
fixes #16119 [backport:1.4] (#16149)
150fc44
(cherry picked from commit 9f1c5f6)
fixes nim-lang#16119 [backport:1.4] (nim-lang#16149)
76bb3e7
cf0ba79
No branches or pull requests
Example
module A
module B
Current Output
b.nim(4, 4) template/generic instantiation of
foofrom here
a.nim(10, 7) Error: invalid type: 'sink Foo[system.int]' for var
Additional Information
Introduced in #15690
The text was updated successfully, but these errors were encountered: