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
type Node[T] = object val: T next: ref Node[T] HHSet[T, Key] = object data: seq[Node[T]] proc rawGet(hhs:HHSet; key: hhs.Key): ptr Node[hhs.T] = return nil # body doesn't matter var hhs: HHSet[string, cstring] discard hhs.rawGet("hello".cstring)
in.nim(13, 12) template/generic instantiation from here in.nim(9, 39) Error: cannot instantiate: 'result:type'
Changing rawGet to this works fine:
proc rawGet(hhs: HHSet; key: hhs.Key): auto = return cast[ptr Node[hhs.T]](nil) # body doesn't matter
The text was updated successfully, but these errors were encountered:
69ea133
zah
metagn
Successfully merging a pull request may close this issue.
Changing rawGet to this works fine:
The text was updated successfully, but these errors were encountered: