Skip to content

Commit

Permalink
Update import wildcard from _ to * in library
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Nov 3, 2023
1 parent 918c9d2 commit 87b836a
Show file tree
Hide file tree
Showing 19 changed files with 139 additions and 139 deletions.
8 changes: 4 additions & 4 deletions library/src/scala/Tuple.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package scala

import annotation.{experimental, showAsInfix}
import compiletime._
import compiletime.ops.int._
import compiletime.*
import compiletime.ops.int.*

/** Tuple of arbitrary arity */
sealed trait Tuple extends Product {
import Tuple._
import Tuple.*

/** Create a copy of this tuple as an Array */
inline def toArray: Array[Object] =
Expand Down Expand Up @@ -292,7 +292,7 @@ case object EmptyTuple extends Tuple {

/** Tuple of arbitrary non-zero arity */
sealed trait NonEmptyTuple extends Tuple {
import Tuple._
import Tuple.*

/** Get the i-th element of this tuple.
* Equivalent to productElement but with a precise return type.
Expand Down
4 changes: 2 additions & 2 deletions library/src/scala/annotation/MacroAnnotation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package scala
package annotation

import scala.quoted._
import scala.quoted.*

/** Base trait for macro annotation implementation.
* Macro annotations can transform definitions and add new definitions.
Expand Down Expand Up @@ -46,7 +46,7 @@ definition that is owned by the package or package object.
*
* class memoize extends MacroAnnotation:
* def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] =
* import quotes.reflect._
* import quotes.reflect.*
* tree match
* case DefDef(name, TermParamClause(param :: Nil) :: Nil, tpt, Some(rhsTree)) =>
* (param.tpt.tpe.asType, tpt.tpe.asType) match
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/annotation/constructorOnly.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

package scala.annotation

import scala.annotation.meta._
import scala.annotation.meta.*

/** An annotation that goes on parameters of classes or traits. It asserts
* that the parameter is used only for initialization and is not kept in
Expand Down
4 changes: 2 additions & 2 deletions library/src/scala/annotation/newMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ import scala.annotation.meta.param
*/
@experimental
final class newMain extends MainAnnotation[FromString, Any]:
import newMain._
import MainAnnotation._
import newMain.*
import MainAnnotation.*

private val longArgRegex = "--[a-zA-Z][a-zA-Z0-9]+".r
private val shortArgRegex = "-[a-zA-Z]".r
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/annotation/static.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package scala.annotation

import scala.annotation.meta._
import scala.annotation.meta.*

/** https://github.com/scala/scala.github.com/pull/491 */

Expand Down
10 changes: 5 additions & 5 deletions library/src/scala/compiletime/ops/any.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object any:
/** Equality comparison of two singleton types.
* ```scala
* //{
* import compiletime.ops.any._
* import compiletime.ops.any.*
* //}
* val eq1: 1 == 1 = true
* val eq2: 1 == "1" = false
Expand All @@ -18,7 +18,7 @@ object any:
/** Inequality comparison of two singleton types.
* ```scala
* //{
* import compiletime.ops.any._
* import compiletime.ops.any.*
* //}
* val eq1: 1 != 1 = false
* val eq2: 1 != "1" = true
Expand All @@ -31,7 +31,7 @@ object any:
/** Tests if a type is a constant.
* ```scala
* //{
* import compiletime.ops.any._
* import compiletime.ops.any.*
* //}
* val c1: IsConst[1] = true
* val c2: IsConst["hi"] = true
Expand All @@ -42,7 +42,7 @@ object any:
* will be evaluated only at its concrete type application. E.g.:
* ```scala
* //{
* import compiletime.ops.any._
* import compiletime.ops.any.*
* //}
* //def `isConst`` returns the type `IsConst[X]`, since `X` is not yet known.
* def isConst[X] : IsConst[X] = ???
Expand All @@ -56,7 +56,7 @@ object any:
/** String conversion of a constant singleton type.
* ```scala
* //{
* import compiletime.ops.any._
* import compiletime.ops.any.*
* //}
* val s1: ToString[1] = "1"
* val sTrue: ToString[true] = "true"
Expand Down
8 changes: 4 additions & 4 deletions library/src/scala/compiletime/ops/boolean.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object boolean:
/** Negation of a `Boolean` singleton type.
* ```scala
* //{
* import compiletime.ops.boolean._
* import compiletime.ops.boolean.*
* //}
* val notFalse: ![false] = true
* val notTrue: ![true] = false
Expand All @@ -18,7 +18,7 @@ object boolean:
/** Exclusive disjunction of two `Boolean` singleton types.
* ```scala
* //{
* import compiletime.ops.boolean._
* import compiletime.ops.boolean.*
* //}
* val a: true ^ true = false
* val b: false ^ true = true
Expand All @@ -30,7 +30,7 @@ object boolean:
/** Conjunction of two `Boolean` singleton types.
* ```scala
* //{
* import compiletime.ops.boolean._
* import compiletime.ops.boolean.*
* //}
* val a: true && true = true
* val b: false && true = false
Expand All @@ -42,7 +42,7 @@ object boolean:
/** Disjunction of two `Boolean` singleton types.
* ```scala
* //{
* import compiletime.ops.boolean._
* import compiletime.ops.boolean.*
* //}
* val a: true || false = true
* val b: false || false = false
Expand Down
32 changes: 16 additions & 16 deletions library/src/scala/compiletime/ops/double.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object double:
/** Addition of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val sum: 2.0 + 2.0 = 4.0
* ```
Expand All @@ -16,7 +16,7 @@ object double:
/** Subtraction of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val sub: 4.0 - 2.0 = 2.0
* ```
Expand All @@ -27,7 +27,7 @@ object double:
/** Multiplication of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val mul: 4.0 * 2.0 = 8.0
* ```
Expand All @@ -38,7 +38,7 @@ object double:
/** Integer division of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val div: 5.0 / 2.0 = 2.5
* ```
Expand All @@ -49,7 +49,7 @@ object double:
/** Remainder of the division of `X` by `Y`.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val mod: 5.0 % 2.0 = 1.0
* ```
Expand All @@ -60,7 +60,7 @@ object double:
/** Less-than comparison of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val lt1: 4.0 < 2.0 = false
* val lt2: 2.0 < 4.0 = true
Expand All @@ -72,7 +72,7 @@ object double:
/** Greater-than comparison of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val gt1: 4.0 > 2.0 = true
* val gt2: 2.0 > 2.0 = false
Expand All @@ -84,7 +84,7 @@ object double:
/** Greater-or-equal comparison of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val ge1: 4.0 >= 2.0 = true
* val ge2: 2.0 >= 3.0 = false
Expand All @@ -96,7 +96,7 @@ object double:
/** Less-or-equal comparison of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val lt1: 4.0 <= 2.0 = false
* val lt2: 2.0 <= 2.0 = true
Expand All @@ -108,7 +108,7 @@ object double:
/** Absolute value of an `Double` singleton type.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val abs: Abs[-1.0] = 1.0
* ```
Expand All @@ -119,7 +119,7 @@ object double:
/** Negation of an `Double` singleton type.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val neg1: Negate[-1.0] = 1.0
* val neg2: Negate[1.0] = -1.0
Expand All @@ -131,7 +131,7 @@ object double:
/** Minimum of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val min: Min[-1.0, 1.0] = -1.0
* ```
Expand All @@ -142,7 +142,7 @@ object double:
/** Maximum of two `Double` singleton types.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val max: Max[-1.0, 1.0] = 1.0
* ```
Expand All @@ -153,7 +153,7 @@ object double:
/** Int conversion of a `Double` singleton type.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val x: ToInt[1.0] = 1
* ```
Expand All @@ -164,7 +164,7 @@ object double:
/** Long conversion of a `Double` singleton type.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val x: ToLong[1.0] = 1L
* ```
Expand All @@ -175,7 +175,7 @@ object double:
/** Float conversion of a `Double` singleton type.
* ```scala
* //{
* import compiletime.ops.double._
* import compiletime.ops.double.*
* //}
* val x: ToFloat[1.0] = 1.0f
* ```
Expand Down
Loading

0 comments on commit 87b836a

Please sign in to comment.