Add explicit types to stdlib bootstrapped#18032
Add explicit types to stdlib bootstrapped#18032nicolasstucki wants to merge 4 commits intoscala:mainfrom
Conversation
6369906 to
4a342e1
Compare
sjrd
left a comment
There was a problem hiding this comment.
I'm not comfortable with having copies of such giant files in this repo, only for tiny, surgical changes. The upstream sources will inevitably change, and then who is going to track those changes and re-apply them here?
IMO we should upstream the necessary changes, then wait for the next release of Scala 2.13. In the meantime, we can keep ignoring them with tasty-mima filters.
| @SerialVersionUID(1L) | ||
| final private[reflect] class ByteManifest extends AnyValManifest[scala.Byte]("Byte") { | ||
| def runtimeClass = java.lang.Byte.TYPE | ||
| def runtimeClass: Class[java.lang.Byte] = java.lang.Byte.TYPE |
There was a problem hiding this comment.
This is annoying because it is not actually correct. The Java signature of Byte.TYPE says it returns a Class<java.lang.Byte>, but it actually returns the class for the primitive type byte. In Scala, that should be typed as Class[scala.Byte] instead.
Since this lives in a private[reflect] class, I suggest we keep ignoring it for now, and instead send a patch upstream to declare it as
| def runtimeClass: Class[java.lang.Byte] = java.lang.Byte.TYPE | |
| def runtimeClass: Class[_] = java.lang.Byte.TYPE |
The same applies to all the other changes in this file.
|
I will change this directly in Scala 2. |
Add explicit result type to methods where Scala 2 and Scala 3 disagree with the inferred type. The aim is to have the same type in the Scala 2 pickles and the Scala 3 TASTy. Follow up of scala#10435 These where identified in and tested in * scala/scala3#18032 * scala/scala3#18029 * scala/scala3#17975 (BitSet)
Add explicit result type to methods where Scala 2 and Scala 3 disagree with the inferred type. The aim is to have the same type in the Scala 2 pickles and the Scala 3 TASTy. Follow up of scala/scala#10435 These where identified in and tested in * scala#18032 * scala#18029 * scala#17975 (BitSet)
Add explicit result type to methods where Scala 2 and Scala 3 disagree with the inferred type. The aim is to have the same type in the Scala 2 pickles and the Scala 3 TASTy. Follow up of scala/scala#10435 These where identified in and tested in * #18032 * #18029 * #17975 (BitSet)
No description provided.