Skip to content
New issue

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 in type sections fails with concepts #12714

Closed
mratsim opened this issue Nov 23, 2019 · 1 comment · Fixed by #24028
Closed

type in type sections fails with concepts #12714

mratsim opened this issue Nov 23, 2019 · 1 comment · Fixed by #24028

Comments

@mratsim
Copy link
Collaborator

mratsim commented Nov 23, 2019

Linked to dereferencing types: #11773

The type magic does not work in type sections with concept while typeof does

type
  Enqueueable = concept x, type T
    x is ptr
    x.next is Atomic[pointer]

  MyChannel*[T: Enqueueable] = object
    dummy: type(default(T)[])
default_concept.nim(9, 24) template/generic instantiation of `default` from here
system.nim(1818, 16) Error: invalid type: 'T: Enqueueable' in this context: 'proc (T: type T: Enqueueable): T: Enqueueable{.noSideEffect.}' for proc

Using typeof instead works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants