-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix handing of the java type T[] #533
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
Labels
Comments
Note that if you replace Compat.scala:5: error: type mismatch;
found : Array[Int]
required: Array[Int]
Note: Int >: Int, but class Array is invariant in type T.
You may wish to investigate a wildcard type such as `_ >: Int`. (SLS 3.2.10)
println(JA.get[Int](x))
^
one error found |
Assigned LowPriority as this does not seem to stop us from bootstrap. |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 26, 2018
…parameters Introduce a new test isAbstractOrParamType to capture this. Sicne we did not do this before, we missed out on the `Array[T] --> Array[T & Object]` transform for genereic Java arrays. The fix also needs an opposite fix to "undo" the parameter encoding again in arrayToRepeated.
odersky
added a commit
that referenced
this issue
Jan 30, 2018
Fix #533: Some isAbstractType tests should succeed for parameters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JA.java
:Compat.scala
:This should output an error since
T[]
is erased toObject[]
but it compiles fine, for comparison,scalac
will complain with:The text was updated successfully, but these errors were encountered: