Skip to content

Commit 2c7bfb0

Browse files
committed
Update to new wildcard syntax in library scaladoc
1 parent f67a1a0 commit 2c7bfb0

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

library/src/scala/Predef.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ object Predef extends LowPriorityImplicits {
111111
* the class literal `T.class` in Java.
112112
*
113113
* @example {{{
114-
* val listClass = classOf[List[_]]
115-
* // listClass is java.lang.Class[List[_]] = class scala.collection.immutable.List
114+
* val listClass = classOf[List[?]]
115+
* // listClass is java.lang.Class[List[?]] = class scala.collection.immutable.List
116116
*
117117
* val mapIntString = classOf[Map[Int,String]]
118118
* // mapIntString is java.lang.Class[Map[Int,String]] = interface scala.collection.immutable.Map

library/src/scala/Selectable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import language.experimental.captureChecking
1818
* list of `java.lang.Class` arguments, i.e. it may alternatively have the
1919
* signature
2020
* {{{
21-
* def applyDynamic(name: String, paramClasses: Class[_]*)(args: Any*): Any
21+
* def applyDynamic(name: String, paramClasses: Class[?]*)(args: Any*): Any
2222
* }}}
2323
* In this case the call will synthesize `Class` arguments for the erasure of
2424
* all formal parameter types of the method in the structural type.
@@ -41,7 +41,7 @@ object Selectable:
4141
* that precise parameter types are not needed for method dispatch. That is,
4242
* a class inheriting from this trait and implementing
4343
* {{{
44-
* def applyDynamic(name: String, paramTypes: Class[_]*)(args: Any*)
44+
* def applyDynamic(name: String, paramTypes: Class[?]*)(args: Any*)
4545
* }}}
4646
* should dispatch to a method with the given `name` without having to rely
4747
* on the precise `paramTypes`. Subtypes of `WithoutPreciseParameterTypes`

library/src/scala/language.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ object language {
167167
* types of methods. If `existentials` is not enabled, those cases will trigger
168168
* a warning from the compiler.
169169
*
170-
* Existential types with wildcard type syntax such as `List[_]`,
171-
* or `Map[String, _]` are not affected.
170+
* Existential types with wildcard type syntax such as `List[?]`,
171+
* or `Map[String, ?]` are not affected.
172172
*
173173
* '''Why keep the feature?''' Existential types are needed to make sense of Java’s wildcard
174174
* types and raw types and the erased types of run-time values.

library/src/scala/quoted/Quotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
22682268
end TypeBoundsTreeMethods
22692269

22702270
/** Type tree representing wildcard type bounds written in the source.
2271-
* The wildcard type `_` (for example in in `List[_]`) will be a type tree that
2271+
* The wildcard type `?` (for example in in `List[?]`) will be a type tree that
22722272
* represents a type but has `TypeBounds` inside.
22732273
*/
22742274
type WildcardTypeTree <: Tree

0 commit comments

Comments
 (0)