Skip to content

Commit 6cff1b2

Browse files
committed
More conversions in library
1 parent 7939932 commit 6cff1b2

File tree

17 files changed

+19
-19
lines changed

17 files changed

+19
-19
lines changed

library/src/scala/Conversion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ package scala
1919
* from two to one.
2020
*/
2121
@java.lang.FunctionalInterface
22-
abstract class Conversion[-T, +U] extends Function1[T, U]:
22+
abstract class Conversion[-T, +U] extends Function1[T, U] with
2323
def apply(x: T): U

library/src/scala/IArray.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import reflect.ClassTag
44
/** An immutable array. An `IArray[T]` has the same representation as an `Array[T]`,
55
* but it cannot be updated. Unlike regular arrays, immutable arrays are covariant.
66
*/
7-
object opaques:
7+
object opaques with
88
opaque type IArray[+T] = Array[_ <: T]
99

1010
private[scala] type Sub[A] >: Array[A] <: IArray[A]

library/src/scala/Selectable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ package scala
2323
*/
2424
trait Selectable extends Any
2525

26-
object Selectable:
26+
object Selectable with
2727
/* Scala 2 compat + allowing for cross-compilation:
2828
* enable scala.reflect.Selectable.reflectiveSelectable when there is an
2929
* import scala.language.reflectiveCalls in scope.

library/src/scala/compiletime/ops/any.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package scala.compiletime
22
package ops
33

4-
object any:
4+
object any with
55
/** Equality comparison of two singleton types.
66
* ```scala
77
* val eq1: 1 == 1 = true

library/src/scala/compiletime/ops/boolean.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package scala.compiletime
22
package ops
33

4-
object boolean:
4+
object boolean with
55

66
/** Negation of a `Boolean` singleton type.
77
* ```scala

library/src/scala/compiletime/ops/int.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package scala.compiletime
22
package ops
33

4-
object int:
4+
object int with
55
/** Addition of two `Int` singleton types.
66
* ```scala
77
* val sum: 2 + 2 = 4

library/src/scala/compiletime/ops/string.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package scala.compiletime
22
package ops
33

4-
object string:
4+
object string with
55
/** Concatenation of two `String` singleton types.
66
* ```scala
77
* val hello: "hello " + "world" = "hello world"

library/src/scala/compiletime/testing/ErrorKind.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ package scala.compiletime.testing
33
/** An error can be either a parse-time or a typecheck-time */
44
sealed trait ErrorKind // This should be an enum but currently, Dotty lib fails to
55
// compile with an obscure error.
6-
object ErrorKind:
6+
object ErrorKind with
77
case object Parser extends ErrorKind
88
case object Typer extends ErrorKind

library/src/scala/quoted/Exprs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package scala.quoted
22

3-
object Exprs:
3+
object Exprs with
44

55
/** Matches literal sequence of literal constant value expressions and return a sequence of values.
66
*

library/src/scala/quoted/Quotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
19571957
*
19581958
* `ParamClause` encodes the following enumeration
19591959
* ```scala
1960-
* enum ParamClause:
1960+
* enum ParamClause with
19611961
* case TypeParamClause(params: List[TypeDef])
19621962
* case TermParamClause(params: List[ValDef])
19631963
* ```

library/src/scala/quoted/Type.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package scala.quoted
33
import scala.annotation.compileTimeOnly
44

55
/** Type (or type constructor) `T` needed contextually when using `T` in a quoted expression `'{... T ...}` */
6-
abstract class Type[T <: AnyKind] private[scala]:
6+
abstract class Type[T <: AnyKind] private[scala] with
77
/** The type represented `Type` */
88
type Underlying = T
99
end Type
1010

1111
/** Methods to interact with the current `Type[T]` in scope */
12-
object Type:
12+
object Type with
1313

1414
/** Show a source code like representation of this type without syntax highlight */
1515
def show[T <: AnyKind](using Type[T])(using Quotes): String =

library/src/scala/quoted/runtime/Expr.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package runtime
44
import scala.annotation.{Annotation, compileTimeOnly}
55

66
@compileTimeOnly("Illegal reference to `scala.quoted.runtime.Expr`")
7-
object Expr:
7+
object Expr with
88

99
/** A term quote is desugared by the compiler into a call to this method
1010
*

library/src/scala/reflect/Selectable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ trait Selectable extends scala.Selectable with
3939
ensureAccessible(mth)
4040
mth.invoke(selectedValue, args.asInstanceOf[Seq[AnyRef]]: _*)
4141

42-
object Selectable:
42+
object Selectable with
4343

4444
/** An implicit conversion that turns a value into a Selectable
4545
* such that structural selections are performed on that value.

library/src/scala/reflect/TypeTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ trait TypeTest[-S, T] extends Serializable with
2222
*/
2323
def unapply(x: S): Option[x.type & T]
2424

25-
object TypeTest:
25+
object TypeTest with
2626

2727
/** Trivial type test that always succeeds */
2828
def identity[T]: TypeTest[T, T] = Some(_)

library/src/scala/runtime/Scala3RunTime.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package scala.runtime
22

3-
object Scala3RunTime:
3+
object Scala3RunTime with
44

55
// Called by inline def assert's. Extracted to minimize the bytecode size at call site.
66

library/src/scala/runtime/stdLibPatches/Predef.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package scala.runtime.stdLibPatches
22

3-
object Predef:
3+
object Predef with
44
import compiletime.summonFrom
55

66
inline def assert(inline assertion: Boolean, inline message: => Any): Unit =

library/src/scala/runtime/stdLibPatches/language.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package scala.runtime.stdLibPatches
22

33
/** Scala 3 additions and replacements to the `scala.language` object.
44
*/
5-
object language:
5+
object language with
66

77
/** The experimental object contains features that have been recently added but have not
88
* been thoroughly tested in production yet.
@@ -16,7 +16,7 @@ object language:
1616
*
1717
* @group experimental
1818
*/
19-
object experimental:
19+
object experimental with
2020

2121
/* Experimental support for richer dependent types (disabled for now)
2222
* One can still run the compiler with support for parsing singleton applications

0 commit comments

Comments
 (0)