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
Hey,
In Mirrors we have:
def get: Any
Would it be possible to have instead:
def get[T]: T
?
So that we don't have all the time to do a .get.asInstanceOf[T] ?
Maybe even better with a default to Any?
sealed class DefaultsToAny[A] object DefaultsToAny { implicit def overrideDefault[A] = new DefaultsToAny[A] implicit def default = new DefaultsToAny[Any] }
and
def get[T: DefaultToAny]: T
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-9739?orig=1 Reporter: Joan (joan)
Sorry, something went wrong.
@SethTisue said: I'm not sure this is desirable. The explicit "asInstanceOf" signals an unsafe cast is happening.
No branches or pull requests
Hey,
In Mirrors we have:
Would it be possible to have instead:
?
So that we don't have all the time to do a .get.asInstanceOf[T] ?
Maybe even better with a default to Any?
and
The text was updated successfully, but these errors were encountered: