-
Notifications
You must be signed in to change notification settings - Fork 21
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
2.9 regression: can't use scala.collection.immutable.List from Java #4291
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4291?orig=1 |
@paulp said: % scala29 -nocompdaemon -e 'println(classOf[List[_]].getMethods filter (_.getName == "apply") map (_.getGenericReturnType) mkString ", ")'
class java.lang.Object, class java.lang.Object
% scala281 -nocompdaemon -e 'println(classOf[List[_]].getMethods filter (_.getName == "apply") map (_.getGenericReturnType) mkString ", ")'
A, class java.lang.Object "A" of course being what you want, List's type parameter. |
@paulp said: |
@SethTisue said: ~> cat S.scala
trait T { def f: Option[String] = None }
class S extends T
~> cat J.java
class J extends S { }
~> /usr/local/scala-2.8.1.final/bin/scalac S.scala
~> javac -classpath .:/usr/local/scala-2.8.1.final/lib/scala-library.jar J.java
~> rm *.class
~> ~/scala/dists/scala-2.9.0.r24330-b20110222144825/bin/scalac S.scala
~> javac -Xlint:unchecked -classpath :/Users/tisue/scala/dists/scala-2.9.0.r24330-b20110222144825/lib/scala-library.jar J.java
J.java:1: warning: f() in S implements f() in T; return type requires unchecked conversion
found : scala.Option
required: scala.Option<java.lang.String>
class J extends S { }
^
1 warning |
@paulp said: |
as of r24330:
possibly related: #4238
The text was updated successfully, but these errors were encountered: