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

implicit Any/AnyRef disaster #6899

Closed
scabug opened this issue Dec 31, 2012 · 3 comments
Closed

implicit Any/AnyRef disaster #6899

scabug opened this issue Dec 31, 2012 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Dec 31, 2012

% rcscala
Welcome to Scala version 2.10.0-RC5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_10).
Type in expressions to have them evaluated.
Type :help for more information.

scala> def f(x: scala.collection.GenSeqLike[_,_]): AnyRef = x
f: (x: scala.collection.GenSeqLike[_, _])AnyRef

scala> f(Nil).getClass
res0: Class[_ <: AnyRef] = class scala.collection.parallel.package$$anon$2

See https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/cwEyQCmjX24 for some elaboration.

@scabug
Copy link
Author

@scabug scabug commented Dec 31, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6899?orig=1
Reporter: @paulp
Affected Versions: 2.10.0

@scabug
Copy link
Author

@scabug scabug commented Jan 10, 2013

@adriaanm said (edited on Jan 10, 2013 9:57:12 PM UTC):
Jason said:

I was recently thinking how useful such a facility would be for extension methods: if the implicit went from Wrapped => (@foo Wrapper) and (@foo A) !<:< Any, we might avoid the "implicit Any/AnyRef disaster" @paulp brought up on -internals recently. But perhaps a more mundane solution is wiser...

@scabug
Copy link
Author

@scabug scabug commented Jun 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants