Skip to content

Commit

Permalink
Update annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBlanvillain committed Apr 6, 2022
1 parent 96d5315 commit 263b4d9
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 19 deletions.
6 changes: 3 additions & 3 deletions library/src/scala/compiletime/ops/any.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scala.compiletime
package ops

import annotation.experimental
import annotation.since

object any:
/** Equality comparison of two singleton types.
Expand Down Expand Up @@ -41,7 +41,7 @@ object any:
* ```
* @syntax markdown
*/
@experimental
@since("3.2")
type IsConst[X] <: Boolean

/** String conversion of a constant singleton type.
Expand All @@ -51,5 +51,5 @@ object any:
* ```
* @syntax markdown
*/
@experimental
@since("3.2")
type ToString[+X] <: String
4 changes: 2 additions & 2 deletions library/src/scala/compiletime/ops/double.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package scala.compiletime
package ops

import scala.annotation.experimental
import annotation.since

@experimental
@since("3.2")
object double:
/** Addition of two `Double` singleton types.
* ```scala
Expand Down
19 changes: 17 additions & 2 deletions library/src/scala/compiletime/ops/float.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package scala.compiletime
package ops

import scala.annotation.experimental
import annotation.since

@experimental
object float:
/** Addition of two `Float` singleton types.
* ```scala
* val sum: 2.0f + 2.0f = 4.0f
* ```
* @syntax markdown
*/
@since("3.2")
type +[+X <: Float, +Y <: Float] <: Float

/** Subtraction of two `Float` singleton types.
Expand All @@ -19,6 +19,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type -[+X <: Float, +Y <: Float] <: Float

/** Multiplication of two `Float` singleton types.
Expand All @@ -27,6 +28,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type *[+X <: Float, +Y <: Float] <: Float

/** Integer division of two `Float` singleton types.
Expand All @@ -35,6 +37,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type /[+X <: Float, +Y <: Float] <: Float

/** Remainder of the division of `X` by `Y`.
Expand All @@ -43,6 +46,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type %[+X <: Float, +Y <: Float] <: Float

/** Less-than comparison of two `Float` singleton types.
Expand All @@ -52,6 +56,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type <[+X <: Float, +Y <: Float] <: Boolean

/** Greater-than comparison of two `Float` singleton types.
Expand All @@ -61,6 +66,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type >[+X <: Float, +Y <: Float] <: Boolean

/** Greater-or-equal comparison of two `Float` singleton types.
Expand All @@ -70,6 +76,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type >=[+X <: Float, +Y <: Float] <: Boolean

/** Less-or-equal comparison of two `Float` singleton types.
Expand All @@ -79,6 +86,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type <=[+X <: Float, +Y <: Float] <: Boolean

/** Absolute value of an `Float` singleton type.
Expand All @@ -87,6 +95,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type Abs[+X <: Float] <: Float

/** Negation of an `Float` singleton type.
Expand All @@ -96,6 +105,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type Negate[+X <: Float] <: Float

/** Minimum of two `Float` singleton types.
Expand All @@ -104,6 +114,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type Min[+X <: Float, +Y <: Float] <: Float

/** Maximum of two `Float` singleton types.
Expand All @@ -112,6 +123,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type Max[+X <: Float, +Y <: Float] <: Float

/** Int conversion of a `Float` singleton type.
Expand All @@ -120,6 +132,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type ToInt[+X <: Float] <: Int

/** Long conversion of a `Float` singleton type.
Expand All @@ -128,6 +141,7 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type ToLong[+X <: Float] <: Long

/** Double conversion of a `Float` singleton type.
Expand All @@ -136,4 +150,5 @@ object float:
* ```
* @syntax markdown
*/
@since("3.2")
type ToDouble[+X <: Float] <: Double
10 changes: 5 additions & 5 deletions library/src/scala/compiletime/ops/int.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scala.compiletime
package ops

import annotation.experimental
import annotation.since

object int:
/** Successor of a natural number where zero is the type 0 and successors are reduced as if the definition was:
Expand Down Expand Up @@ -192,7 +192,7 @@ object int:
* ```
* @syntax markdown
*/
@experimental
@since("3.2")
type ToLong[+X <: Int] <: Long

/** Float conversion of an `Int` singleton type.
Expand All @@ -201,7 +201,7 @@ object int:
* ```
* @syntax markdown
*/
@experimental
@since("3.2")
type ToFloat[+X <: Int] <: Float

/** Double conversion of an `Int` singleton type.
Expand All @@ -210,7 +210,7 @@ object int:
* ```
* @syntax markdown
*/
@experimental
@since("3.2")
type ToDouble[+X <: Int] <: Double

/** Number of zero bits preceding the highest-order ("leftmost")
Expand All @@ -225,5 +225,5 @@ object int:
* ```
* @syntax markdown
*/
@experimental
@since("3.2")
type NumberOfLeadingZeros[+X <: Int] <: Int
Loading

0 comments on commit 263b4d9

Please sign in to comment.