Skip to content

Add ValueOf equivalent of SIP23 (TLS) to dotty #2857

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

Closed
soronpo opened this issue Jul 12, 2017 · 2 comments
Closed

Add ValueOf equivalent of SIP23 (TLS) to dotty #2857

soronpo opened this issue Jul 12, 2017 · 2 comments

Comments

@soronpo
Copy link
Contributor

soronpo commented Jul 12, 2017

SIP23 will be merged into Scala 2.xx sometime in the future (currently merged into TLS).
Its implementation has a ValueOf type class that enables us to request the literal values from literal types. E.g.:

def foo[T](implicit i : ValueOf[T]) : T = valueOf[T]

Since we want to have Scala 2.xx and Scala 3.xx to be the same in the future, it is important to keep this feature.

@propensive
Copy link
Contributor

I would find this potentially very useful.

@smarter
Copy link
Member

smarter commented Jan 11, 2018

Duplicate of #2616 (I'll fix it soon!)

@smarter smarter closed this as completed Jan 11, 2018
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