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

Collections of concept types #6730

Open
dawkot opened this issue Nov 12, 2017 · 2 comments
Open

Collections of concept types #6730

dawkot opened this issue Nov 12, 2017 · 2 comments

Comments

@dawkot
Copy link

dawkot commented Nov 12, 2017

Would be nice if this was possibe:

type ShowableRef = concept x
    x is ref any #or x.sizeof == `bytes`
    x.`$` is string

var xs = newSeq[ShowableRef]()
@Yardanico
Copy link
Collaborator

Yardanico commented Nov 12, 2017

Concepts are a compile-time thing, how it will work?
However this probably will be possible with vtref concepts, but they're not available yet

@zah
Copy link
Member

zah commented Nov 13, 2017

Something similar to this will be possible with the "VTable Types" in the future.

Otherwise, there should be an error indicating that ShowableRef is not a concrete type in this particular situation (let's keep the issue open until this is implemented).

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

No branches or pull requests

4 participants