Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit b1c7d21

Browse files
committed
SI-8140 Documentation references java.lang.String directly
1 parent 590436f commit b1c7d21

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/library/scala/Predef.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef {
8282
*/
8383
def classOf[T]: Class[T] = null // This is a stub method. The actual implementation is filled in by the compiler.
8484

85+
/** The `String` type in Scala has methods that come either from the underlying
86+
* Java String (see the documentation corresponding to your Java version, for
87+
* example [[http://docs.oracle.com/javase/8/docs/api/java/lang/String.html]]) or
88+
* are added implicitly through [[scala.collection.immutable.StringOps]].
89+
*/
8590
type String = java.lang.String
8691
type Class[T] = java.lang.Class[T]
8792

src/library/scala/collection/immutable/StringOps.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ package immutable
1212

1313
import mutable.StringBuilder
1414

15-
/**
16-
* This class serves as a wrapper providing `String`s with all the operations
17-
* found in indexed sequences. Where needed, instances of `String` object
18-
* are implicitly converted into this class.
15+
/** This class serves as a wrapper providing [[scala.Predef.String]]s with all
16+
* the operations found in indexed sequences. Where needed, `String`s are
17+
* implicitly converted into instances of this class.
1918
*
2019
* The difference between this class and `WrappedString` is that calling transformer
2120
* methods such as `filter` and `map` will yield a `String` object, whereas a

0 commit comments

Comments
 (0)