diff --git a/bench/tests/Vector.scala b/bench/tests/Vector.scala index eb9ed309f179..fd9f8c10abb3 100644 --- a/bench/tests/Vector.scala +++ b/bench/tests/Vector.scala @@ -12,7 +12,7 @@ package immutable import scala.annotation.unchecked.uncheckedVariance import scala.compat.Platform -import scala.collection.generic._ +import scala.collection.generic.* import scala.collection.mutable.Builder import compiletime.uninitialized diff --git a/bench/tests/power-macro/PowerInlined-1.scala b/bench/tests/power-macro/PowerInlined-1.scala index f0b575d9245a..2993004af9cd 100644 --- a/bench/tests/power-macro/PowerInlined-1.scala +++ b/bench/tests/power-macro/PowerInlined-1.scala @@ -1,5 +1,5 @@ object PowerInlined { - import PowerMacro._ + import PowerMacro.* power(1, 5.0) // 1 quotes to unpickle } \ No newline at end of file diff --git a/bench/tests/power-macro/PowerInlined.scala b/bench/tests/power-macro/PowerInlined.scala index f0b575d9245a..2993004af9cd 100644 --- a/bench/tests/power-macro/PowerInlined.scala +++ b/bench/tests/power-macro/PowerInlined.scala @@ -1,5 +1,5 @@ object PowerInlined { - import PowerMacro._ + import PowerMacro.* power(1, 5.0) // 1 quotes to unpickle } \ No newline at end of file diff --git a/community-build/community-projects/munit b/community-build/community-projects/munit index 33b73b2d1009..3c9b71d7a087 160000 --- a/community-build/community-projects/munit +++ b/community-build/community-projects/munit @@ -1 +1 @@ -Subproject commit 33b73b2d100984c3510c7d30d91817633c3df5f7 +Subproject commit 3c9b71d7a087015e95411534aaaf6d92cbbbfbc3 diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index 515f379cf8e2..08dc3dbb30dd 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -179,7 +179,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] => case _ => false } - /** Is this argument node of the form : _*, or is it a reference to + /** Is this argument node of the form *, or is it a reference to * such an argument ? The latter case can happen when an argument is lifted. */ def isWildcardStarArg(tree: Tree)(using Context): Boolean = unbind(tree) match { diff --git a/compiler/src/dotty/tools/dotc/ast/Trees.scala b/compiler/src/dotty/tools/dotc/ast/Trees.scala index cde5acb2211a..65c81ce42e13 100644 --- a/compiler/src/dotty/tools/dotc/ast/Trees.scala +++ b/compiler/src/dotty/tools/dotc/ast/Trees.scala @@ -1027,6 +1027,7 @@ object Trees { type Template = Trees.Template[T] type Import = Trees.Import[T] type Export = Trees.Export[T] + type ImportOrExport = Trees.ImportOrExport[T] type PackageDef = Trees.PackageDef[T] type Annotated = Trees.Annotated[T] type Thicket = Trees.Thicket[T] diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 21727c7ec2be..acd77bc96397 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -3066,8 +3066,8 @@ object Parsers { type ImportConstr = (Tree, List[ImportSelector]) => Tree - /** Import ::= `import' [`given'] [ImportExpr {`,' ImportExpr} - * Export ::= `export' [`given'] [ImportExpr {`,' ImportExpr} + /** Import ::= `import' ImportExpr {‘,’ ImportExpr} + * Export ::= `export' ImportExpr {‘,’ ImportExpr} */ def importClause(leading: Token, mkTree: ImportConstr): List[Tree] = { val offset = accept(leading) @@ -3097,48 +3097,62 @@ object Parsers { ctx.compilationUnit.sourceVersion = Some(SourceVersion.valueOf(imported.toString)) Import(tree, selectors) - /** ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec - * ImportSpec ::= id - * | ‘_’ - * | ‘given’ - * | ‘{’ ImportSelectors) ‘}’ - */ - def importExpr(mkTree: ImportConstr): () => Tree = { - - /** '_' */ - def wildcardSelectorId() = atSpan(in.skipToken()) { Ident(nme.WILDCARD) } - def givenSelectorId(start: Offset) = atSpan(start) { Ident(nme.EMPTY) } + /** ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec + * | SimpleRef ‘as’ id + * ImportSpec ::= NamedSelector + * | WildcardSelector + * | ‘{’ ImportSelectors ‘}’ + * ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] + * | WildCardSelector {‘,’ WildCardSelector} + * NamedSelector ::= id [‘as’ (id | ‘_’)] + * WildCardSelector ::= ‘*' | ‘given’ [InfixType] + */ + def importExpr(mkTree: ImportConstr): () => Tree = + + /** ‘*' | ‘_' */ + def wildcardSelector() = + if in.token == USCORE && sourceVersion.isAtLeast(`3.1`) then + report.errorOrMigrationWarning( + em"`_` is no longer supported for a wildcard import; use `*` instead${rewriteNotice("3.1")}", + in.sourcePos()) + patch(source, Span(in.offset, in.offset + 1), "*") + ImportSelector(atSpan(in.skipToken()) { Ident(nme.WILDCARD) }) + + /** 'given [InfixType]' */ + def givenSelector() = + ImportSelector( + atSpan(in.skipToken()) { Ident(nme.EMPTY) }, + bound = + if canStartTypeTokens.contains(in.token) then rejectWildcardType(infixType()) + else EmptyTree) + + /** id [‘as’ (id | ‘_’) */ + def namedSelector(from: Ident) = + if in.token == ARROW || isIdent(nme.as) then + if in.token == ARROW && sourceVersion.isAtLeast(`3.1`) then + report.errorOrMigrationWarning( + em"The import renaming `a => b` is no longer supported ; use `a as b` instead${rewriteNotice("3.1")}", + in.sourcePos()) + patch(source, Span(in.offset, in.offset + 2), + if testChar(in.offset - 1, ' ') && testChar(in.offset + 2, ' ') then "as" + else " as ") + atSpan(startOffset(from), in.skipToken()) { + val to = if in.token == USCORE then wildcardIdent() else termIdent() + ImportSelector(from, if to.name == nme.ERROR then EmptyTree else to) + } + else ImportSelector(from) - /** ImportSelectors ::= id [‘=>’ id | ‘=>’ ‘_’] [‘,’ ImportSelectors] - * | WildCardSelector {‘,’ WildCardSelector} - * WildCardSelector ::= ‘given’ [InfixType] - * | ‘_' - */ def importSelectors(idOK: Boolean): List[ImportSelector] = - val isWildcard = in.token == USCORE || in.token == GIVEN + val isWildcard = in.token == USCORE || in.token == GIVEN || isIdent(nme.raw.STAR) val selector = atSpan(in.offset) { in.token match - case USCORE => - ImportSelector(wildcardSelectorId()) - case GIVEN => - val start = in.skipToken() - if in.token == USCORE then - deprecationWarning(em"`given _` is deprecated in imports; replace with just `given`", start) - in.nextToken() - ImportSelector(givenSelectorId(start)) // Let the selector span all of `given`; needed for -Ytest-pickler - else if canStartTypeTokens.contains(in.token) then - ImportSelector(givenSelectorId(start), bound = rejectWildcardType(infixType())) - else - ImportSelector(givenSelectorId(start)) + case USCORE => wildcardSelector() + case GIVEN => givenSelector() case _ => - val from = termIdent() - if !idOK then syntaxError(i"named imports cannot follow wildcard imports") - if in.token == ARROW then - atSpan(startOffset(from), in.skipToken()) { - val to = if in.token == USCORE then wildcardIdent() else termIdent() - ImportSelector(from, if to.name == nme.ERROR then EmptyTree else to) - } - else ImportSelector(from) + if isIdent(nme.raw.STAR) then wildcardSelector() + else + if !idOK then syntaxError(i"named imports cannot follow wildcard imports") + namedSelector(termIdent()) } val rest = if in.token == COMMA then @@ -3149,26 +3163,36 @@ object Parsers { selector :: rest def importSelection(qual: Tree): Tree = - accept(DOT) - in.token match - case USCORE => - mkTree(qual, ImportSelector(wildcardSelectorId()) :: Nil) - case GIVEN => - mkTree(qual, ImportSelector(givenSelectorId(in.skipToken())) :: Nil) - case LBRACE => - mkTree(qual, inBraces(importSelectors(idOK = true))) - case _ => - val start = in.offset - val name = ident() - if in.token == DOT then - importSelection(atSpan(startOffset(qual), start) { Select(qual, name) }) - else - atSpan(startOffset(qual)) { - mkTree(qual, ImportSelector(atSpan(start) { Ident(name) }) :: Nil) - } - - () => importSelection(simpleRef()) - } + if in.isIdent(nme.as) && qual.isInstanceOf[RefTree] then + qual match + case Select(qual1, name) => + val from = Ident(name).withSpan(Span(qual.span.point, qual.span.end, 0)) + mkTree(qual1, namedSelector(from) :: Nil) + case qual: Ident => + mkTree(EmptyTree, namedSelector(qual) :: Nil) + else + accept(DOT) + in.token match + case USCORE => + mkTree(qual, wildcardSelector() :: Nil) + case GIVEN => + mkTree(qual, givenSelector() :: Nil) + case LBRACE => + mkTree(qual, inBraces(importSelectors(idOK = true))) + case _ => + if isIdent(nme.raw.STAR) then + mkTree(qual, wildcardSelector() :: Nil) + else + val start = in.offset + val name = ident() + if in.token == DOT then + importSelection(atSpan(startOffset(qual), start) { Select(qual, name) }) + else + mkTree(qual, namedSelector(atSpan(start) { Ident(name) }) :: Nil) + end importSelection + + () => atSpan(in.offset) { importSelection(simpleRef()) } + end importExpr /** Def ::= val PatDef * | var VarDef diff --git a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala index c87418568e56..8d1f5e4a8051 100644 --- a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -340,9 +340,13 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { def selectorText(sel: untpd.ImportSelector): Text = val id: Text = - if sel.isGiven then keywordText("given") else toText(sel.imported) + if sel.isGiven then keywordText("given") + else sel.imported.name match + case nme.WILDCARD => "*" + case nme.raw.STAR => "`*`" + case name => toText(name) val rename: Text = - if sel.renamed.isEmpty then "" else Str(" => ") ~ toText(sel.renamed) + if sel.renamed.isEmpty then "" else Str(" as ") ~ toText(sel.renamed) val bound: Text = if sel.bound.isEmpty then "" else if sel.isGiven then Str(" ") ~ toText(sel.bound) diff --git a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala index 12e85793205b..8f43f63a0304 100644 --- a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala @@ -150,7 +150,7 @@ class FirstTransform extends MiniPhase with InfoTransformer { thisPhase => } override def transformOther(tree: Tree)(using Context): Tree = tree match { - case tree: ImportOrExport[_] => EmptyTree + case tree: ImportOrExport => EmptyTree case tree: NamedArg => transformAllDeep(tree.arg) case tree => if (tree.isType) toTypeTree(tree) else tree } diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala index b602656f61b2..dfaa510ce7a7 100644 --- a/compiler/src/dotty/tools/dotc/typer/Namer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala @@ -693,7 +693,7 @@ class Namer { typer: Typer => // make sure testing contexts are not captured by completers assert(!ictx.reporter.isInstanceOf[ExploringReporter]) - protected def typeSig(sym: Symbol): Type = original match { + protected def typeSig(sym: Symbol): Type = original match case original: ValDef => if (sym.is(Module)) moduleValSig(sym) else valOrDefDefSig(original, sym, Nil, identity)(using localContext(sym).setNewScope) @@ -702,16 +702,12 @@ class Namer { typer: Typer => nestedTyper(sym) = typer1 typer1.defDefSig(original, sym)(using localContext(sym).setTyper(typer1)) case imp: Import => - try { - val expr1 = typedAheadExpr(imp.expr, AnySelectionProto) + try + val expr1 = typedImportQualifier(imp, typedAheadExpr) ImportType(expr1) - } - catch { - case ex: CyclicReference => - typr.println(s"error while completing ${imp.expr}") - throw ex - } - } + catch case ex: CyclicReference => + typr.println(s"error while completing ${imp.expr}") + throw ex final override def complete(denot: SymDenotation)(using Context): Unit = { if (Config.showCompletions && ctx.typerState != creationContext.typerState) { @@ -987,6 +983,10 @@ class Namer { typer: Typer => def exportForwarders(exp: Export): List[tpd.MemberDef] = { val buf = new mutable.ListBuffer[tpd.MemberDef] val Export(expr, selectors) = exp + if expr.isEmpty then + report.error(em"Export selector must have prefix and `.`", exp.srcPos) + return Nil + val path = typedAheadExpr(expr, AnySelectionProto) checkLegalExportPath(path, selectors) lazy val wildcardBound = importBound(selectors, isGiven = false) diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index 7bd34bf8a414..8253a10d0a34 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -2339,19 +2339,36 @@ class Typer extends Namer .asInstanceOf[untpd.ImportSelector] } - def typedImport(imp: untpd.Import, sym: Symbol)(using Context): Import = { - val expr1 = typedExpr(imp.expr, AnySelectionProto) + def typedImportQualifier(imp: untpd.Import, typd: (untpd.Tree, Type) => Tree)(using Context): Tree = + if imp.expr == untpd.EmptyTree then + assert(imp.selectors.length == 1, imp) + val from = imp.selectors.head.imported + val sel = tryAlternatively + (typedIdent(from, WildcardType)) + (typedIdent(cpy.Ident(from)(from.name.toTypeName), WildcardType)) + + sel.tpe match + case TermRef(prefix: SingletonType, _) => + singleton(prefix).withSpan(from.span) + case TypeRef(prefix: SingletonType, _) => + singleton(prefix).withSpan(from.span) + case _ => + errorTree(from, + em"""Illegal import selector: $from + |The selector is not a member of an object or package.""") + else typd(imp.expr, AnySelectionProto) + + def typedImport(imp: untpd.Import, sym: Symbol)(using Context): Import = + val expr1 = typedImportQualifier(imp, typedExpr) checkLegalImportPath(expr1) val selectors1 = typedSelectors(imp.selectors) assignType(cpy.Import(imp)(expr1, selectors1), sym) - } - def typedExport(exp: untpd.Export)(using Context): Export = { + def typedExport(exp: untpd.Export)(using Context): Export = val expr1 = typedExpr(exp.expr, AnySelectionProto) // already called `checkLegalExportPath` in Namer val selectors1 = typedSelectors(exp.selectors) assignType(cpy.Export(exp)(expr1, selectors1)) - } def typedPackageDef(tree: untpd.PackageDef)(using Context): Tree = val pid1 = withMode(Mode.InPackageClauseName)(typedExpr(tree.pid, AnySelectionProto)) diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 0506eefa89a3..fd87f1cfd1b7 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -67,6 +67,7 @@ class CompilationTests { aggregateTests( compileFile("tests/rewrites/rewrites.scala", scala2CompatMode.and("-rewrite", "-indent")), + compileFile("tests/rewrites/rewrites3x.scala", defaultOptions.and("-rewrite", "-source", "3.1-migration")), compileFile("tests/rewrites/i8982.scala", defaultOptions.and("-indent", "-rewrite")), compileFile("tests/rewrites/i9632.scala", defaultOptions.and("-indent", "-rewrite")) ).checkRewrites() diff --git a/docs/docs/contributing/workflow.md b/docs/docs/contributing/workflow.md index ee2853c6dfaf..4afab827bf55 100644 --- a/docs/docs/contributing/workflow.md +++ b/docs/docs/contributing/workflow.md @@ -45,7 +45,7 @@ type stealer: ```bash $ sbt > repl -scala> import dotty.tools.DottyTypeStealer._; import dotty.tools.dotc.core._; import Contexts._,Types._ +scala> import dotty.tools.DottyTypeStealer.*; import dotty.tools.dotc.core.*; import Contexts.*,Types.* ``` Now, you can define types and access their representation. For example: diff --git a/docs/docs/internals/syntax.md b/docs/docs/internals/syntax.md index 670d46ff0568..bebd6228cb18 100644 --- a/docs/docs/internals/syntax.md +++ b/docs/docs/internals/syntax.md @@ -120,7 +120,7 @@ type val var while with yield ### Soft keywords ``` -derives end extension infix inline opaque open transparent using | * + - +as derives end extension infix inline opaque open transparent using | * + - ``` See the [separate section on soft keywords](./soft-modifier.md) for additional @@ -258,8 +258,7 @@ ArgumentExprs ::= ParArgumentExprs BlockExpr ::= <<< (CaseClauses | Block) >>> Block ::= {BlockStat semi} [BlockResult] Block(stats, expr?) BlockStat ::= Import - | {Annotation {nl}} [‘implicit’ | ‘lazy’] Def - | {Annotation {nl}} {LocalModifier} TmplDef + | {Annotation {nl}} {LocalModifier} Def | Extension | Expr1 | EndMarker @@ -353,16 +352,16 @@ AccessQualifier ::= ‘[’ id ‘]’ Annotation ::= ‘@’ SimpleType1 {ParArgumentExprs} Apply(tpe, args) Import ::= ‘import’ ImportExpr {‘,’ ImportExpr} +Export ::= ‘export’ ImportExpr {‘,’ ImportExpr} ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec Import(expr, sels) -ImportSpec ::= id - | ‘_’ - | ‘given’ + | SimpleRef ‘as’ id Import(EmptyTree, ImportSelector(ref, id)) +ImportSpec ::= NamedSelector + | WildcardSelector | ‘{’ ImportSelectors) ‘}’ -ImportSelectors ::= id [‘=>’ id | ‘=>’ ‘_’] [‘,’ ImportSelectors] +NamedSelector ::= id [‘as’ (id | ‘_’)] +WildCardSelector ::= ‘*' | ‘given’ [InfixType] +ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] | WildCardSelector {‘,’ WildCardSelector} -WildCardSelector ::= ‘given’ [InfixType] - | ‘_' -Export ::= ‘export’ ImportExpr {‘,’ ImportExpr} EndMarker ::= ‘end’ EndMarkerTag -- when followed by EOL EndMarkerTag ::= id | ‘if’ | ‘while’ | ‘for’ | ‘match’ | ‘try’ diff --git a/docs/docs/reference/changed-features/compiler-plugins.md b/docs/docs/reference/changed-features/compiler-plugins.md index 19f39ea759c4..debf369cc0c1 100644 --- a/docs/docs/reference/changed-features/compiler-plugins.md +++ b/docs/docs/reference/changed-features/compiler-plugins.md @@ -52,13 +52,13 @@ zero as errors. ```scala package dividezero -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Constants.Constant import dotty.tools.dotc.core.Contexts.Context -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.plugins.{PluginPhase, StandardPlugin} import dotty.tools.dotc.transform.{Pickler, Staging} @@ -70,7 +70,7 @@ class DivideZero extends StandardPlugin: (new DivideZeroPhase) :: Nil class DivideZeroPhase extends PluginPhase: - import tpd._ + import tpd.* val phaseName = "divideZero" diff --git a/docs/docs/reference/changed-features/imports.md b/docs/docs/reference/changed-features/imports.md new file mode 100644 index 000000000000..cdd24ae6382d --- /dev/null +++ b/docs/docs/reference/changed-features/imports.md @@ -0,0 +1,58 @@ +--- +layout: doc-page +title: "Imports" +--- + +The syntax of wildcard and renaming imports (and exports) has changed. + +## Wildcard Imports + +Wildcard imports are now expressed with `*` instead of underscore. Example: +```scala +import scala.annotation.* // imports everything in the annotation package +``` + +If you want to import a member named `*` specifically, you can use backticks around it. + +```scala +object A: + def * = ... + def min = ... + +object B: + import A.`*` // imports just `*` + +object C: + import A.* // imports everything in A +``` + +## Renaming Imports + +To rename or exclude an import, we now use `as` instead of `=>`. A single renaming import no longer needs to be enclosed in braces. Examples: + +```scala +import A.{min as minimum, `*` as multiply} +import Predef.{augmentString as _, *} // imports everything except augmentString +import scala.annotation as ann +import java as j +``` + +### Migration + +To support cross-building, Scala 3.0 supports the old import syntax with `_` for wildcards and `=>` for renamings in addition to the new one. The old syntax +will be dropped in a future versions. Automatic rewritings from old to new syntax +are offered under settings `-source 3.1-migration -rewrite`. + +### Syntax + +``` +Import ::= ‘import’ ImportExpr {‘,’ ImportExpr} +ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec +ImportSpec ::= NamedSelector + | WildcardSelector + | ‘{’ ImportSelectors) ‘}’ +NamedSelector ::= id [‘as’ (id | ‘_’)] +WildCardSelector ::= ‘*' | ‘given’ [InfixType] +ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] + | WildCardSelector {‘,’ WildCardSelector} +``` diff --git a/docs/docs/reference/changed-features/main-functions.md b/docs/docs/reference/changed-features/main-functions.md index b6897762797b..926f0b20c223 100644 --- a/docs/docs/reference/changed-features/main-functions.md +++ b/docs/docs/reference/changed-features/main-functions.md @@ -62,7 +62,7 @@ For instance, the `happyBirthDay` method above would generate additional code eq ```scala final class happyBirthday: - import scala.util.{CommandLineParser => CLP} + import scala.util.CommandLineParser as CLP def main(args: Array[String]): Unit = try happyBirthday( diff --git a/docs/docs/reference/contextual/conversions.md b/docs/docs/reference/contextual/conversions.md index 5dae928c9620..f2f4249efb8d 100644 --- a/docs/docs/reference/contextual/conversions.md +++ b/docs/docs/reference/contextual/conversions.md @@ -63,7 +63,7 @@ conversion from `Int` to `java.lang.Integer` can be defined as follows: given fromFuture : Conversion[Future[HttpResponse], CompletionArg] = Response(_) given fromStatusCode: Conversion[Future[StatusCode], CompletionArg] = Status(_) end CompletionArg - import CompletionArg._ + import CompletionArg.* def complete[T](arg: CompletionArg) = arg match case Error(s) => ... diff --git a/docs/docs/reference/contextual/derivation-macro.md b/docs/docs/reference/contextual/derivation-macro.md index 012da07abfee..22b4d0663c7e 100644 --- a/docs/docs/reference/contextual/derivation-macro.md +++ b/docs/docs/reference/contextual/derivation-macro.md @@ -41,7 +41,7 @@ from the signature. The body of the `derived` method is shown below: ```scala given derived[T: Type](using Quotes): Expr[Eq[T]] = - import quotes.reflect._ + import quotes.reflect.* val ev: Expr[Mirror.Of[T]] = Expr.summon[Mirror.Of[T]].get @@ -135,8 +135,8 @@ enum Opt[+T]: The full code is shown below: ```scala -import scala.deriving._ -import scala.quoted._ +import scala.deriving.* +import scala.quoted.* trait Eq[T]: @@ -165,7 +165,7 @@ object Eq: case '[EmptyTuple] => Nil given derived[T: Type](using q: Quotes): Expr[Eq[T]] = - import quotes.reflect._ + import quotes.reflect.* val ev: Expr[Mirror.Of[T]] = Expr.summon[Mirror.Of[T]].get diff --git a/docs/docs/reference/contextual/derivation.md b/docs/docs/reference/contextual/derivation.md index c2fbb9ecda63..7f1b7750266b 100644 --- a/docs/docs/reference/contextual/derivation.md +++ b/docs/docs/reference/contextual/derivation.md @@ -231,7 +231,7 @@ def eqProduct[T](p: Mirror.ProductOf[T], elems: List[Eq[_]]): Eq[T] = Pulling this all together we have the following complete implementation, ```scala -import scala.deriving._ +import scala.deriving.* import scala.compiletime.{erasedValue, summonInline} inline def summonAll[T <: Tuple]: List[Eq[_]] = @@ -280,7 +280,7 @@ enum Opt[+T] derives Eq: case Nn @main def test = - import Opt._ + import Opt.* val eqoi = summon[Eq[Opt[Int]]] assert(eqoi.eqv(Sm(23), Sm(23))) assert(!eqoi.eqv(Sm(23), Sm(13))) diff --git a/docs/docs/reference/contextual/extension-methods.md b/docs/docs/reference/contextual/extension-methods.md index 93b688912a1b..01c70d578f56 100644 --- a/docs/docs/reference/contextual/extension-methods.md +++ b/docs/docs/reference/contextual/extension-methods.md @@ -189,7 +189,7 @@ object IntOpsEx extends IntOps: else Some(i / x) trait SafeDiv: - import IntOpsEx._ // brings safeDiv and safeMod into scope + import IntOpsEx.* // brings safeDiv and safeMod into scope extension (i: Int) def divide(d: Int): Option[(Int, Int)] = // extension methods imported and thus in scope diff --git a/docs/docs/reference/contextual/given-imports.md b/docs/docs/reference/contextual/given-imports.md index a6d813d06ee6..0ffbb44d643d 100644 --- a/docs/docs/reference/contextual/given-imports.md +++ b/docs/docs/reference/contextual/given-imports.md @@ -12,18 +12,18 @@ object A: def f(using TC) = ??? object B: - import A._ + import A.* import A.given ... ``` -In the code above, the `import A._` clause in object `B` imports all members +In the code above, the `import A.*` clause in object `B` imports all members of `A` _except_ the given instance `tc`. Conversely, the second import `import A.given` will import _only_ that given instance. The two import clauses can also be merged into one: ```scala object B: - import A.{given, _} + import A.{given, *} ... ``` @@ -44,7 +44,7 @@ There are two main benefits arising from these rules: Since givens can be anonymous it is not always practical to import them by their name, and wildcard imports are typically used instead. By-type imports provide a more specific alternative to wildcard imports, which makes it clearer what is imported. Example: ```scala -import A.{given TC} +import A.given TC ``` This imports any given in `A` that has a type which conforms to `TC`. Importing givens of several types `T1,...,Tn` @@ -104,14 +104,13 @@ given instances once their user base has migrated. ``` Import ::= ‘import’ ImportExpr {‘,’ ImportExpr} -ImportExpr ::= StableId ‘.’ ImportSpec -ImportSpec ::= id - | ‘_’ - | ‘given’ - | ‘{’ ImportSelectors) ‘}’ -ImportSelectors ::= id [‘=>’ id | ‘=>’ ‘_’] [‘,’ ImportSelectors] - | WildCardSelector {‘,’ WildCardSelector} -WildCardSelector ::= ‘_' - | ‘given’ [InfixType] Export ::= ‘export’ ImportExpr {‘,’ ImportExpr} +ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec +ImportSpec ::= NamedSelector + | WildcardSelector + | ‘{’ ImportSelectors) ‘}’ +NamedSelector ::= id [‘as’ (id | ‘_’)] +WildCardSelector ::= ‘*' | ‘given’ [InfixType] +ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] + | WildCardSelector {‘,’ WildCardSelector} ``` diff --git a/docs/docs/reference/dropped-features/nonlocal-returns.md b/docs/docs/reference/dropped-features/nonlocal-returns.md index 9ef49c635c84..b9b2b37c866b 100644 --- a/docs/docs/reference/dropped-features/nonlocal-returns.md +++ b/docs/docs/reference/dropped-features/nonlocal-returns.md @@ -10,7 +10,7 @@ Nonlocal returns are implemented by throwing and catching `scala.runtime.NonLoca A drop-in library replacement is provided in [`scala.util.control.NonLocalReturns`](http://dotty.epfl.ch/api/scala/util/control/NonLocalReturns$.html). Example: ```scala -import scala.util.control.NonLocalReturns._ +import scala.util.control.NonLocalReturns.* extension [T](xs: List[T]) def has(elem: T): Boolean = returning { diff --git a/docs/docs/reference/metaprogramming/erased-terms.md b/docs/docs/reference/metaprogramming/erased-terms.md index dde296ebff83..944d357d6daf 100644 --- a/docs/docs/reference/metaprogramming/erased-terms.md +++ b/docs/docs/reference/metaprogramming/erased-terms.md @@ -157,7 +157,7 @@ matches. `erasedValue` is implemented with `erased`, so the state machine above can be encoded as follows: ```scala -import scala.compiletime._ +import scala.compiletime.* sealed trait State final class On extends State diff --git a/docs/docs/reference/metaprogramming/inline.md b/docs/docs/reference/metaprogramming/inline.md index ba18f55d76d8..ad84b3c4b92b 100644 --- a/docs/docs/reference/metaprogramming/inline.md +++ b/docs/docs/reference/metaprogramming/inline.md @@ -486,8 +486,8 @@ primitive operations on singleton types. For example, singleton types, the compiler can evaluate the result of the operation. ```scala -import scala.compiletime.ops.int._ -import scala.compiletime.ops.boolean._ +import scala.compiletime.ops.int.* +import scala.compiletime.ops.boolean.* val conjunction: true && true = true val multiplication: 3 * 5 = 15 @@ -499,7 +499,7 @@ Since type aliases have the same precedence rules as their term-level equivalents, the operations compose with the expected precedence rules: ```scala -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* val x: 1 + 2 * 3 = 7 ``` @@ -510,7 +510,7 @@ concatenation. To use both and distinguish the two types from each other, a match type can dispatch to the correct implementation: ```scala -import scala.compiletime.ops._ +import scala.compiletime.ops.* import scala.annotation.infix diff --git a/docs/docs/reference/metaprogramming/macros-spec.md b/docs/docs/reference/metaprogramming/macros-spec.md index 8bdee4ba1eba..a90b2a7fbfb7 100644 --- a/docs/docs/reference/metaprogramming/macros-spec.md +++ b/docs/docs/reference/metaprogramming/macros-spec.md @@ -172,7 +172,7 @@ For instance, here is a version of `power` that generates the multiplications directly if the exponent is statically known and falls back to the dynamic implementation of `power` otherwise. ```scala -import scala.quoted._ +import scala.quoted.* inline def power(x: Double, n: Int): Double = ${ powerExpr('x, 'n) } diff --git a/docs/docs/reference/metaprogramming/macros.md b/docs/docs/reference/metaprogramming/macros.md index 997252176fc3..80df87aefc32 100644 --- a/docs/docs/reference/metaprogramming/macros.md +++ b/docs/docs/reference/metaprogramming/macros.md @@ -28,7 +28,7 @@ a boolean expression tree as argument. `assertImpl` evaluates the expression and prints it again in an error message if it evaluates to `false`. ```scala -import scala.quoted._ +import scala.quoted.* inline def assert(inline expr: Boolean): Unit = ${ assertImpl('expr) } @@ -229,7 +229,7 @@ Consider the following implementation of a staged interpreter that implements a compiler through staging. ```scala -import scala.quoted._ +import scala.quoted.* enum Exp: case Num(n: Int) @@ -237,7 +237,7 @@ enum Exp: case Var(x: String) case Let(x: String, e: Exp, in: Exp) -import Exp._ +import Exp.* ``` The interpreted language consists of numbers `Num`, addition `Plus`, and variables @@ -253,7 +253,7 @@ language to quoted Scala code of type `Expr[Int]`. The compiler takes an environment that maps variable names to Scala `Expr`s. ```scala -import scala.quoted._ +import scala.quoted.* def compile(e: Exp, env: Map[String, Expr[Int]])(using Quotes): Expr[Int] = e match diff --git a/docs/docs/reference/metaprogramming/reflection.md b/docs/docs/reference/metaprogramming/reflection.md index 0855e4230432..a6c50a6c6038 100644 --- a/docs/docs/reference/metaprogramming/reflection.md +++ b/docs/docs/reference/metaprogramming/reflection.md @@ -19,27 +19,27 @@ guarantees and may fail at macro expansion time, hence additional explicit checks must be done. To provide reflection capabilities in macros we need to add an implicit parameter -of type `scala.quoted.Quotes` and import `quotes.reflect._` from it in the scope +of type `scala.quoted.Quotes` and import `quotes.reflect.*` from it in the scope where it is used. ```scala -import scala.quoted._ +import scala.quoted.* inline def natConst(inline x: Int): Int = ${natConstImpl('{x})} def natConstImpl(x: Expr[Int])(using Quotes): Expr[Int] = - import quotes.reflect._ + import quotes.reflect.* ... ``` ### Extractors -`import quotes.reflect._` will provide all extractors and methods on `quotes.reflect.Tree`s. +`import quotes.reflect.*` will provide all extractors and methods on `quotes.reflect.Tree`s. For example the `Literal(_)` extractor used below. ```scala def natConstImpl(x: Expr[Int])(using Quotes): Expr[Int] = - import quotes.reflect._ + import quotes.reflect.* val tree: Term = x.asTerm tree match case Inlined(_, _, Literal(IntConstant(n))) => @@ -78,7 +78,7 @@ expansion point. ```scala def macroImpl()(quotes: Quotes): Expr[Unit] = - import quotes.reflect._ + import quotes.reflect.* val pos = Position.ofMacroExpansion val path = pos.sourceFile.jpath.toString diff --git a/docs/docs/reference/metaprogramming/staging.md b/docs/docs/reference/metaprogramming/staging.md index 54961f912379..633f7e2984b4 100644 --- a/docs/docs/reference/metaprogramming/staging.md +++ b/docs/docs/reference/metaprogramming/staging.md @@ -104,7 +104,7 @@ expression at runtime. Within the scope of `staging.run` we can also invoke `sho to get a source-like representation of the expression. ```scala -import scala.quoted._ +import scala.quoted.* // make available the necessary compiler for runtime code generation given staging.Compiler = staging.Compiler.make(getClass.getClassLoader) diff --git a/docs/docs/reference/metaprogramming/tasty-inspect.md b/docs/docs/reference/metaprogramming/tasty-inspect.md index 4324f7a63339..757472110ef6 100644 --- a/docs/docs/reference/metaprogramming/tasty-inspect.md +++ b/docs/docs/reference/metaprogramming/tasty-inspect.md @@ -18,12 +18,12 @@ through the TASTy reflect API. To inspect the trees of a TASTy file a consumer can be defined in the following way. ```scala -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* class MyInspector extends Inspector: def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = - import quotes.reflect._ + import quotes.reflect.* for tasty <- tastys do val tree = tasty.ast // Do something with the tree diff --git a/docs/docs/reference/other-new-features/export.md b/docs/docs/reference/other-new-features/export.md index 2a7aaada28ef..5ded49aebc75 100644 --- a/docs/docs/reference/other-new-features/export.md +++ b/docs/docs/reference/other-new-features/export.md @@ -70,8 +70,7 @@ A member is _eligible_ if all of the following holds: - it is not a constructor, nor the (synthetic) class part of an object, - it is a given instance (declared with `given`) if and only if the export is from a _given selector_. -It is a compile-time error if a simple or renaming selector does not identify any eligible -members. +It is a compile-time error if a simple or renaming selector does not identify any eligible members. Type members are aliased by type definitions, and term members are aliased by method definitions. Export aliases copy the type and value parameters of the members they refer to. Export aliases are always `final`. Aliases of given instances are again defined as givens (and aliases of old-style implicits are `implicit`). Aliases of inline methods or values are again defined `inline`. There are no other modifiers that can be given to an alias. This has the following consequences for overriding: @@ -91,11 +90,21 @@ export O.c def f: c.T = ... ``` - -Export clauses can appear in classes or they can appear at the top-level. An export clause cannot appear as a statement in a block. -If an export clause contains a wildcard or given selector, it is forbidden for its qualifier path to refer to a package. This is because it is not yet known how to safely track wildcard dependencies to a package for the purposes of incremental compilation. +**Restrictions:** + + 1. Export clauses can appear in classes or they can appear at the top-level. An export clause cannot appear as a statement in a block. + 1. If an export clause contains a wildcard or given selector, it is forbidden for its qualifier path to refer to a package. This is because it is not yet known how to safely track wildcard dependencies to a package for the purposes of incremental compilation. + + 1. Simple renaming exports like + ```scala + export status as stat + ``` + are not supported yet. They would run afoul of the restriction that the + exported `a` cannot be already a member of the object containing the export. + This restriction might be lifted in the future. + (\*) **Note:** Unless otherwise stated, the term "class" in this discussion also includes object and trait definitions. ## Motivation @@ -116,17 +125,15 @@ TemplateStat ::= ... | Export TopStat ::= ... | Export -Import ::= ‘import’ ImportExpr {‘,’ ImportExpr} -ImportExpr ::= StableId ‘.’ ImportSpec -ImportSpec ::= id - | ‘_’ - | ‘given’ - | ‘{’ ImportSelectors) ‘}’ -ImportSelectors ::= id [‘=>’ id | ‘=>’ ‘_’] [‘,’ ImportSelectors] - | WildCardSelector {‘,’ WildCardSelector} -WildCardSelector ::= ‘_' - | ‘given’ [InfixType] Export ::= ‘export’ ImportExpr {‘,’ ImportExpr} +ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec +ImportSpec ::= NamedSelector + | WildcardSelector + | ‘{’ ImportSelectors) ‘}’ +NamedSelector ::= id [‘as’ (id | ‘_’)] +WildCardSelector ::= ‘*' | ‘given’ [InfixType] +ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] + | WildCardSelector {‘,’ WildCardSelector} ``` ## Elaboration of Export Clauses diff --git a/docs/docs/reference/other-new-features/opaques.md b/docs/docs/reference/other-new-features/opaques.md index 5bed38293b21..96694d1e38ee 100644 --- a/docs/docs/reference/other-new-features/opaques.md +++ b/docs/docs/reference/other-new-features/opaques.md @@ -111,7 +111,7 @@ two types. Hence, the following usage scenario type-checks. ```scala object User: - import Access._ + import Access.* case class Item(rights: Permissions) diff --git a/docs/docs/reference/other-new-features/type-test.md b/docs/docs/reference/other-new-features/type-test.md index 43a43e697d83..8c1661fd07f2 100644 --- a/docs/docs/reference/other-new-features/type-test.md +++ b/docs/docs/reference/other-new-features/type-test.md @@ -113,7 +113,7 @@ Using `ClassTag` instances was unsound since classtags can check only the class Given the following abstract definition of Peano numbers that provides two given instances of types `TypeTest[Nat, Zero]` and `TypeTest[Nat, Succ]` ```scala -import scala.reflect._ +import scala.reflect.* trait Peano: type Nat @@ -129,7 +129,7 @@ trait Peano: def apply(nat: Nat): Succ def unapply(succ: Succ): Some[Nat] - given typeTestOfZero: TypeTest[Nat, Zero] + given typeTestOfZero: TypeTest[Nat, Zero] given typeTestOfSucc: TypeTest[Nat, Succ] ``` @@ -162,7 +162,7 @@ it is possible to write the following program ```scala @main def test = - import PeanoInt._ + import PeanoInt.* def divOpt(m: Nat, n: Nat): Option[(Nat, Nat)] = n match diff --git a/docs/docs/reference/soft-modifier.md b/docs/docs/reference/soft-modifier.md index 03c71857cdd8..d024bb3df603 100644 --- a/docs/docs/reference/soft-modifier.md +++ b/docs/docs/reference/soft-modifier.md @@ -17,9 +17,10 @@ Otherwise, soft keywords are treated specially in the following situations: - `end`, if it appears at the start of a line following a statement (i.e. definition or toplevel expression) - `extension`, if it appears at the start of a statement and is followed by `(` or `[`. - `using`, if it appears at the start of a parameter or argument list. + - `as`, in a renaming import clause - `|`, if it separates two patterns in an alternative. - `+`, `-`, if they appear in front of a type parameter. - - `*`, if it follows the type of a parameter or if it appears in - a vararg type ascription `x: _*`. + - `*`, in a wildcard import, or it follows the type of a parameter, or if it appears in + a vararg splice `x*`. Everywhere else a soft keyword is treated as a normal identifier. diff --git a/docs/docs/reference/syntax.md b/docs/docs/reference/syntax.md index b2de66272ddf..508c82e39224 100644 --- a/docs/docs/reference/syntax.md +++ b/docs/docs/reference/syntax.md @@ -119,7 +119,7 @@ type val var while with yield ### Soft keywords ``` -derives end extension infix inline opaque open transparent using | * + - +as derives end extension infix inline opaque open transparent using | * + - ``` See the [separate section on soft keywords](./soft-modifier.md) for additional @@ -222,7 +222,7 @@ Expr1 ::= [‘inline’] ‘if’ ‘(’ Expr ‘)’ {nl} Expr [[ Ascription ::= ‘:’ InfixType | ‘:’ Annotation {Annotation} Catches ::= ‘catch’ (Expr | ExprCaseClause) -PostfixExpr ::= InfixExpr [id] +PostfixExpr ::= InfixExpr [id] -- only if language.postfixOperators is enabled InfixExpr ::= PrefixExpr | InfixExpr id [nl] InfixExpr | InfixExpr MatchClause @@ -254,8 +254,7 @@ ArgumentExprs ::= ParArgumentExprs BlockExpr ::= <<< (CaseClauses | Block) >>> Block ::= {BlockStat semi} [BlockResult] BlockStat ::= Import - | {Annotation {nl}} [‘implicit’ | ‘lazy’] Def - | {Annotation {nl}} {LocalModifier} TmplDef + | {Annotation {nl}} {LocalModifier} Def | Extension | Expr1 | EndMarker @@ -344,16 +343,16 @@ AccessQualifier ::= ‘[’ id ‘]’ Annotation ::= ‘@’ SimpleType1 {ParArgumentExprs} Import ::= ‘import’ ImportExpr {‘,’ ImportExpr} +Export ::= ‘export’ ImportExpr {‘,’ ImportExpr} ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec -ImportSpec ::= id - | ‘_’ - | ‘given’ + | SimpleRef ‘as’ id +ImportSpec ::= NamedSelector + | WildcardSelector | ‘{’ ImportSelectors) ‘}’ -ImportSelectors ::= id [‘=>’ id | ‘=>’ ‘_’] [‘,’ ImportSelectors] +NamedSelector ::= id [‘as’ (id | ‘_’)] +WildCardSelector ::= ‘*' | ‘given’ [InfixType] +ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] | WildCardSelector {‘,’ WildCardSelector} -WildCardSelector ::= ‘given’ [InfixType] - | ‘_' -Export ::= ‘export’ ImportExpr {‘,’ ImportExpr} EndMarker ::= ‘end’ EndMarkerTag -- when followed by EOL EndMarkerTag ::= id | ‘if’ | ‘while’ | ‘for’ | ‘match’ | ‘try’ diff --git a/docs/docs/usage/cbt-projects.md b/docs/docs/usage/cbt-projects.md index a40bb92a74fa..59c9f07d8987 100644 --- a/docs/docs/usage/cbt-projects.md +++ b/docs/docs/usage/cbt-projects.md @@ -11,7 +11,7 @@ cbt comes with built-in Dotty support. Follow the ```scala // build/build.scala -import cbt._ +import cbt.* class Build(val context: Context) extends Dotty { ... } diff --git a/docs/sidebar.yml b/docs/sidebar.yml index 35d1c79aedcb..f3c0c63a21b9 100644 --- a/docs/sidebar.yml +++ b/docs/sidebar.yml @@ -129,6 +129,8 @@ sidebar: url: docs/reference/changed-features/operators.html - title: Wildcard Types url: docs/reference/changed-features/wildcards.html + - title: Imports + url: docs/reference/changed-features/imports.html - title: Type Checking url: docs/reference/changed-features/type-checking.html - title: Type Inference diff --git a/scaladoc-testcases/src/tests/annotations.scala b/scaladoc-testcases/src/tests/annotations.scala index 37797203cd03..99e2e19c332f 100644 --- a/scaladoc-testcases/src/tests/annotations.scala +++ b/scaladoc-testcases/src/tests/annotations.scala @@ -3,7 +3,7 @@ package annotations import scala.annotation.StaticAnnotation -import java.lang.{Enum => _} +import java.lang.Enum as _ import scala.reflect.Enum class SomeObject(val s: String) diff --git a/scaladoc-testcases/src/tests/classSignatureTestSource.scala b/scaladoc-testcases/src/tests/classSignatureTestSource.scala index 305d264c5e6b..27aef1d2f461 100644 --- a/scaladoc-testcases/src/tests/classSignatureTestSource.scala +++ b/scaladoc-testcases/src/tests/classSignatureTestSource.scala @@ -1,8 +1,8 @@ package tests.classSignatureTestSource -import scala.collection._ +import scala.collection.* import scala.deprecated -import scala.annotation._ +import scala.annotation.* import scala.math.{Pi, max} import example.level2.Documentation diff --git a/scaladoc-testcases/src/tests/externalLocations/javadoc.scala b/scaladoc-testcases/src/tests/externalLocations/javadoc.scala index e50313e9d039..edeac135eb86 100644 --- a/scaladoc-testcases/src/tests/externalLocations/javadoc.scala +++ b/scaladoc-testcases/src/tests/externalLocations/javadoc.scala @@ -1,6 +1,6 @@ package tests.externalJavadoc -import java.util._ +import java.util.* class Test { def a: Map.Entry[String, String] = ??? diff --git a/scaladoc-testcases/src/tests/externalLocations/scaladoc2.scala b/scaladoc-testcases/src/tests/externalLocations/scaladoc2.scala index 25f19b4f637e..3ed5d5f55751 100644 --- a/scaladoc-testcases/src/tests/externalLocations/scaladoc2.scala +++ b/scaladoc-testcases/src/tests/externalLocations/scaladoc2.scala @@ -1,6 +1,6 @@ package tests.externalScaladoc2 -import scala.util.matching._ +import scala.util.matching.* class Test { def a: String = ??? diff --git a/scaladoc-testcases/src/tests/externalLocations/scaladoc3.scala b/scaladoc-testcases/src/tests/externalLocations/scaladoc3.scala index 43e7d9e14adb..590c19ffaa6c 100644 --- a/scaladoc-testcases/src/tests/externalLocations/scaladoc3.scala +++ b/scaladoc-testcases/src/tests/externalLocations/scaladoc3.scala @@ -1,6 +1,6 @@ package tests.externalScaladoc3 -import scala.util.matching._ +import scala.util.matching.* class Test { def a: String = ??? diff --git a/scaladoc-testcases/src/tests/typesSignatures.scala b/scaladoc-testcases/src/tests/typesSignatures.scala index 92c6f35394f6..a66c2a521ce8 100644 --- a/scaladoc-testcases/src/tests/typesSignatures.scala +++ b/scaladoc-testcases/src/tests/typesSignatures.scala @@ -46,6 +46,6 @@ class Operators // infix type op[A, B] = Int // type Binary2 = String op Int - import scala.compiletime.ops.boolean._ + import scala.compiletime.ops.boolean.* type Unary = ![true] } \ No newline at end of file diff --git a/tests/bench/inductive-implicits.scala b/tests/bench/inductive-implicits.scala index d99439bc580a..58714214ce33 100644 --- a/tests/bench/inductive-implicits.scala +++ b/tests/bench/inductive-implicits.scala @@ -58,7 +58,7 @@ package shapeless { } } -import shapeless._ +import shapeless.* object Test extends App { val sel = Selector[L, Boolean] diff --git a/tests/bench/power-macro/PowerInlined-1.scala b/tests/bench/power-macro/PowerInlined-1.scala index 1e12da45f90a..eceff3aa18b9 100644 --- a/tests/bench/power-macro/PowerInlined-1.scala +++ b/tests/bench/power-macro/PowerInlined-1.scala @@ -1,6 +1,6 @@ object PowerInlined { - import PowerMacro._ + import PowerMacro.* power(1, 5.0) // 1 quotes to unpickle } diff --git a/tests/bench/power-macro/PowerInlined-1k.scala b/tests/bench/power-macro/PowerInlined-1k.scala index b5f6a5a11645..c90c949b1bc4 100644 --- a/tests/bench/power-macro/PowerInlined-1k.scala +++ b/tests/bench/power-macro/PowerInlined-1k.scala @@ -1,6 +1,6 @@ object PowerInlined1K { - import PowerMacro._ + import PowerMacro.* power(Int.MaxValue, 5.0) power(Int.MaxValue, 5.0) diff --git a/tests/bench/power-macro/PowerMacro.scala b/tests/bench/power-macro/PowerMacro.scala index 9462d2b71afd..03a77d927287 100644 --- a/tests/bench/power-macro/PowerMacro.scala +++ b/tests/bench/power-macro/PowerMacro.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { diff --git a/tests/bench/string-interpolation-macro/Macro.scala b/tests/bench/string-interpolation-macro/Macro.scala index 4c5ba3cca029..373c7a491953 100644 --- a/tests/bench/string-interpolation-macro/Macro.scala +++ b/tests/bench/string-interpolation-macro/Macro.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/bench/string-interpolation-macro/Test.scala b/tests/bench/string-interpolation-macro/Test.scala index e32eeea2fef7..18332688dcf3 100644 --- a/tests/bench/string-interpolation-macro/Test.scala +++ b/tests/bench/string-interpolation-macro/Test.scala @@ -1,4 +1,4 @@ -import Macro._ +import Macro.* class Test: def test: String = x"a${1}b${2}c${3}d${4}e${5}f" diff --git a/tests/explicit-nulls/pos/java-varargs.scala b/tests/explicit-nulls/pos/java-varargs.scala index 8f2e48d287a3..1f7fd133fba7 100644 --- a/tests/explicit-nulls/pos/java-varargs.scala +++ b/tests/explicit-nulls/pos/java-varargs.scala @@ -1,5 +1,5 @@ -import java.nio.file._ +import java.nio.file.* import java.nio.file.Paths diff --git a/tests/fuzzy/015ea9cf2d07b27200a33c4451bfc4c93afe213e.scala b/tests/fuzzy/015ea9cf2d07b27200a33c4451bfc4c93afe213e.scala index e9f92773671a..00b6c6343d67 100644 --- a/tests/fuzzy/015ea9cf2d07b27200a33c4451bfc4c93afe213e.scala +++ b/tests/fuzzy/015ea9cf2d07b27200a33c4451bfc4c93afe213e.scala @@ -2,7 +2,7 @@ class i0 { type Int; val i1 = 2 private val i2 = (List(): List[Int]) -import i1.{ () => Double(_)).asInstanceOf[i2]) } else new i0(1) +import i1.{ () as Double(_)).asInstanceOf[i2]) } else new i0(1) List(List(1), None) println(i1(17)) new _ diff --git a/tests/fuzzy/14b960e57195554a6a085eae8e039a949e8b106d.scala b/tests/fuzzy/14b960e57195554a6a085eae8e039a949e8b106d.scala index 96e0aade993e..eb05d04d1a8c 100644 --- a/tests/fuzzy/14b960e57195554a6a085eae8e039a949e8b106d.scala +++ b/tests/fuzzy/14b960e57195554a6a085eae8e039a949e8b106d.scala @@ -2,6 +2,6 @@ class i0 { val i1: (Any => String) = ??? } object i0 { -import Ordering.{ implicitly => } (true: Boolean) match { case _: i1 => true } +import Ordering.{ implicitly as } (true: Boolean) match { case _: i1 as true } def i1(erased i2: Int): Int = { i1: Set[Int] => } } \ No newline at end of file diff --git a/tests/fuzzy/1d1f57703bbd37dd850480cb5d99130930be08c9.scala b/tests/fuzzy/1d1f57703bbd37dd850480cb5d99130930be08c9.scala index ccfcbef33a65..d3cccdf43509 100644 --- a/tests/fuzzy/1d1f57703bbd37dd850480cb5d99130930be08c9.scala +++ b/tests/fuzzy/1d1f57703bbd37dd850480cb5d99130930be08c9.scala @@ -1,5 +1,5 @@ object App { -import i0.{ i1 => false } +import i0.{ i1 as false } def Array(i0: Int => Boolean): Any = ??? } object i2 { diff --git a/tests/fuzzy/471d33abf565d5dd3691679237f148638f4ff115.scala b/tests/fuzzy/471d33abf565d5dd3691679237f148638f4ff115.scala index da61389c21cc..8c00a4f07b6d 100644 --- a/tests/fuzzy/471d33abf565d5dd3691679237f148638f4ff115.scala +++ b/tests/fuzzy/471d33abf565d5dd3691679237f148638f4ff115.scala @@ -45,7 +45,7 @@ private def i3 = 1000 * 60 * 24 * i2 = 5 + i4 + i2; case 5 => 0 } } } -import i0.{ toInt, i2 => this } +import i0.{ toInt, i2 as this } val i7 = new i4 val i5 = new i0 val i6 = new i0 diff --git a/tests/fuzzy/628b3c175445b95d9155223a2651ad97c6091657.scala b/tests/fuzzy/628b3c175445b95d9155223a2651ad97c6091657.scala index 4394f5e14cdd..a646fd6bbf23 100644 --- a/tests/fuzzy/628b3c175445b95d9155223a2651ad97c6091657.scala +++ b/tests/fuzzy/628b3c175445b95d9155223a2651ad97c6091657.scala @@ -11,7 +11,7 @@ type i6 type i79 <: i7{type i9, i10 <: i5.i2] } val i9: i8 { type i4 = i13.i9 } val i16 = new i1 {} } -import i9.{ Set, i8 => }i9 { +import i9.{ Set, i8 as }i9 { object i10 extends i6 with i4 { val i5 = new i9 var i9: i3.i2 diff --git a/tests/fuzzy/670b1276fc9546345aa3a1f1cd07439d77fbb913.scala b/tests/fuzzy/670b1276fc9546345aa3a1f1cd07439d77fbb913.scala index 8d4f9133fde1..0507e8aae9e2 100644 --- a/tests/fuzzy/670b1276fc9546345aa3a1f1cd07439d77fbb913.scala +++ b/tests/fuzzy/670b1276fc9546345aa3a1f1cd07439d77fbb913.scala @@ -13,7 +13,7 @@ def i4(i5: Any) = () object i6 { def i7(i8: String): Int = i11 val i11 = new i1 { -import i2.{ i7 => } class i10 { +import i2.{ i7 as } class i10 { val i10 = new Array(10) val i11: i0 = i13 case i10 => i13.i10 case _ => case _ => case _ => throw new i17 diff --git a/tests/fuzzy/827a8c670660b1c8bbe210e7a9dffea632ee39ea.scala b/tests/fuzzy/827a8c670660b1c8bbe210e7a9dffea632ee39ea.scala index b5e32d1d4ac4..9e8ec9bb6d7f 100644 --- a/tests/fuzzy/827a8c670660b1c8bbe210e7a9dffea632ee39ea.scala +++ b/tests/fuzzy/827a8c670660b1c8bbe210e7a9dffea632ee39ea.scala @@ -19,7 +19,7 @@ def i16() = 55 } object i11 extends i12 { override def i16: i1 = ??? -import i8._ +import i8.* i15.size = ??? } } \ No newline at end of file diff --git a/tests/fuzzy/87b1e375168a7888470eefc1fb867d0c9f550865.scala b/tests/fuzzy/87b1e375168a7888470eefc1fb867d0c9f550865.scala index 64bb876e79bf..8740ea3c720d 100644 --- a/tests/fuzzy/87b1e375168a7888470eefc1fb867d0c9f550865.scala +++ b/tests/fuzzy/87b1e375168a7888470eefc1fb867d0c9f550865.scala @@ -25,7 +25,7 @@ type i11 <: i10 type i19 = i10 val i11: i5[i12] = ??? } -import i12._ +import i12.* val i20: i12 = ??? i16 i14 { type i18[i3[i1, i2]] = i15[i5[i10]#i14, diff --git a/tests/fuzzy/87e911d4a30f9df0be954fcb2cd693c86d4ea19d.scala b/tests/fuzzy/87e911d4a30f9df0be954fcb2cd693c86d4ea19d.scala index 6d6eb635ba75..c91f0558b286 100644 --- a/tests/fuzzy/87e911d4a30f9df0be954fcb2cd693c86d4ea19d.scala +++ b/tests/fuzzy/87e911d4a30f9df0be954fcb2cd693c86d4ea19d.scala @@ -7,7 +7,7 @@ trait i6 extends i3 { var i1: Int } class i4 { -import i0._ +import i0.* val i7 = new i3 {} } object i8 { diff --git a/tests/fuzzy/95bbe2ee00e10cbb3890bcbfe5da2b584a8388e1.scala b/tests/fuzzy/95bbe2ee00e10cbb3890bcbfe5da2b584a8388e1.scala index 103e49758095..d6531b1368e1 100644 --- a/tests/fuzzy/95bbe2ee00e10cbb3890bcbfe5da2b584a8388e1.scala +++ b/tests/fuzzy/95bbe2ee00e10cbb3890bcbfe5da2b584a8388e1.scala @@ -4,7 +4,7 @@ def i1(i2: String)(i3: String): String = ??? } class i4() { def apply(i1: Int): Int = i2 match { case _: Throwable -import scala.annotation.i1._ +import scala.annotation.i1.* type i2 = i0 { type i1 } trait i3 { type i1 <: i0 diff --git a/tests/fuzzy/c091e02ebdd6f7de5e190325fdbb80c8aca00c62.scala b/tests/fuzzy/c091e02ebdd6f7de5e190325fdbb80c8aca00c62.scala index 0ac83f56a5f4..e7e6cf507940 100644 --- a/tests/fuzzy/c091e02ebdd6f7de5e190325fdbb80c8aca00c62.scala +++ b/tests/fuzzy/c091e02ebdd6f7de5e190325fdbb80c8aca00c62.scala @@ -1,4 +1,4 @@ -import scala.i0.{ i1 => } +import scala.i0.{ i1 as } object i2 { private[this] { object i3 extends i0 { new i0 { case i1 => type i2 = Int } } implicit object i4 extends Object { diff --git a/tests/fuzzy/comment7.scala b/tests/fuzzy/comment7.scala index 485b22eb1ed6..90e38e623020 100644 --- a/tests/fuzzy/comment7.scala +++ b/tests/fuzzy/comment7.scala @@ -8,6 +8,6 @@ case i0(i1, i1) => case _ => i2 } } object i5 { -import collection.mutable._ +import collection.mutable.* try { ??? mutable { case i1(i5, i3, i4) => i5 }) } diff --git a/tests/fuzzy/d9366dfb4c3f01352f197fec820c771a96500a98.scala b/tests/fuzzy/d9366dfb4c3f01352f197fec820c771a96500a98.scala index 931520fc7264..74fd5dc75caf 100644 --- a/tests/fuzzy/d9366dfb4c3f01352f197fec820c771a96500a98.scala +++ b/tests/fuzzy/d9366dfb4c3f01352f197fec820c771a96500a98.scala @@ -6,6 +6,6 @@ val i5 = i1(i4, ) def i6(i5: String)(i6: => i3.asInstanceOf[String]) = i4.length } object i7 { -import i6._ +import i6.* val i7: Int = 1 val i1 = new i2() } \ No newline at end of file diff --git a/tests/fuzzy/dc731deada78bc82a0367866d3b7be065344d6f3.scala b/tests/fuzzy/dc731deada78bc82a0367866d3b7be065344d6f3.scala index a27370e08141..5b58166553d1 100644 --- a/tests/fuzzy/dc731deada78bc82a0367866d3b7be065344d6f3.scala +++ b/tests/fuzzy/dc731deada78bc82a0367866d3b7be065344d6f3.scala @@ -6,4 +6,4 @@ new i0 { implicit def i4: Any = super[String] } trait i3 -class i4 extends import +({ classTag) => i5 }(Tuple2.i6) } \ No newline at end of file +class i4 extends import +({ classTag) as i5 }(Tuple2.i6) } \ No newline at end of file diff --git a/tests/idempotency/IdempotencyCheck.scala b/tests/idempotency/IdempotencyCheck.scala index 4e1686ece38e..6f9a8de588de 100644 --- a/tests/idempotency/IdempotencyCheck.scala +++ b/tests/idempotency/IdempotencyCheck.scala @@ -1,9 +1,9 @@ -import java.io.{File => JFile} -import java.nio.file.{ Files => JFiles, Path => JPath, Paths => JPaths } -import java.util.stream.{ Stream => JStream } +import java.io.File as JFile +import java.nio.file.{ Files as JFiles, Path as JPath, Paths as JPaths } +import java.util.stream.Stream as JStream -import scala.collection.JavaConverters._ +import scala.collection.JavaConverters.* object IdempotencyCheck { val blacklisted = Set( diff --git a/tests/init/crash/tuples.scala b/tests/init/crash/tuples.scala index 2ab97cb4aec3..b700900f8e86 100644 --- a/tests/init/crash/tuples.scala +++ b/tests/init/crash/tuples.scala @@ -1,4 +1,4 @@ -import Function._ +import Function.* object Test extends App { var xyz: (Int, String, Boolean) = _ // error diff --git a/tests/init/neg/inner-pat_iuli.scala b/tests/init/neg/inner-pat_iuli.scala index 35e757cd7cb5..e5010cca98ec 100644 --- a/tests/init/neg/inner-pat_iuli.scala +++ b/tests/init/neg/inner-pat_iuli.scala @@ -7,7 +7,7 @@ trait Ops { self: MyCodes => } trait Blox { self: MyCodes => - import opcodes._ + import opcodes.* class Basick { var foo: Instru = null diff --git a/tests/init/neg/lazylist1.scala b/tests/init/neg/lazylist1.scala index 9df3fcfddee7..75556d73aa74 100644 --- a/tests/init/neg/lazylist1.scala +++ b/tests/init/neg/lazylist1.scala @@ -9,7 +9,7 @@ object LazyList { } } -import LazyList._ +import LazyList.* final class Test { lazy val a: LazyList[Int] = 5 #:: b diff --git a/tests/init/neg/lazylist2.scala b/tests/init/neg/lazylist2.scala index 3ef61b6d29e8..18072676fa4c 100644 --- a/tests/init/neg/lazylist2.scala +++ b/tests/init/neg/lazylist2.scala @@ -17,7 +17,7 @@ object LazyList { } } -import LazyList._ +import LazyList.* final class Test1 { lazy val a: LazyList[Int] = 5 #:: b diff --git a/tests/init/pos/Properties.scala b/tests/init/pos/Properties.scala index df4aee821f9a..84d1e09a24f9 100644 --- a/tests/init/pos/Properties.scala +++ b/tests/init/pos/Properties.scala @@ -11,7 +11,7 @@ package scala package util import java.io.{ IOException, PrintWriter } -import java.util.jar.Attributes.{ Name => AttributeName } +import java.util.jar.Attributes.Name as AttributeName private[scala] trait PropertiesTrait { protected def propCategory: String // specializes the remainder of the values diff --git a/tests/init/pos/assignments.scala b/tests/init/pos/assignments.scala index aa20daf02402..bb58275a89d0 100644 --- a/tests/init/pos/assignments.scala +++ b/tests/init/pos/assignments.scala @@ -20,7 +20,7 @@ object assignments { c.x = c.x * 2 val cc = c - import cc._ + import cc.* x = x + 1 x *= 2 } diff --git a/tests/invalid/pos/specializes-sym-crash.scala b/tests/invalid/pos/specializes-sym-crash.scala index e0e458170929..94878da32f8f 100644 --- a/tests/invalid/pos/specializes-sym-crash.scala +++ b/tests/invalid/pos/specializes-sym-crash.scala @@ -1,5 +1,5 @@ // This relies on the naming of the transformed classes which will have to change in the new stdlib. -import scala.collection._ +import scala.collection.* trait Foo[+A, +Coll, diff --git a/tests/invalid/pos/t2782.scala b/tests/invalid/pos/t2782.scala index 3b387af8030e..aa5538d79367 100644 --- a/tests/invalid/pos/t2782.scala +++ b/tests/invalid/pos/t2782.scala @@ -1,4 +1,4 @@ -import scala.{collection => sc} +import scala.collection as sc object Test { trait Foo[T] diff --git a/tests/invalid/pos/t4365/a_1.scala b/tests/invalid/pos/t4365/a_1.scala index 0be5ca8a19e9..361c8c306ab7 100644 --- a/tests/invalid/pos/t4365/a_1.scala +++ b/tests/invalid/pos/t4365/a_1.scala @@ -1,5 +1,5 @@ // Invalid because it relies on internal traits of views that will change their names. -import scala.collection._ +import scala.collection.* trait SeqViewLike[+A, +Coll, diff --git a/tests/invalid/pos/t4365/b_1.scala b/tests/invalid/pos/t4365/b_1.scala index e1423813f1b2..5644aca370cb 100644 --- a/tests/invalid/pos/t4365/b_1.scala +++ b/tests/invalid/pos/t4365/b_1.scala @@ -1,4 +1,4 @@ -import scala.collection._ +import scala.collection.* trait GenSeqView0[+A, +Coll] diff --git a/tests/invalid/pos/t533.scala b/tests/invalid/pos/t533.scala index 9bc9995d9c30..81b298e82010 100644 --- a/tests/invalid/pos/t533.scala +++ b/tests/invalid/pos/t533.scala @@ -1,4 +1,4 @@ -import scala.actors._ +import scala.actors.* object test extends Actor { def act(): Unit = { diff --git a/tests/invalid/pos/t8023.scala b/tests/invalid/pos/t8023.scala index 9ce5619dbe39..63c0528e4d56 100644 --- a/tests/invalid/pos/t8023.scala +++ b/tests/invalid/pos/t8023.scala @@ -1,5 +1,5 @@ // Invalid because nested hk type parameters are no longer allowed -import language._ +import language.* object Test { diff --git a/tests/invalid/run/Tuple.scala b/tests/invalid/run/Tuple.scala index 00a9b545e77d..9da7e941b098 100644 --- a/tests/invalid/run/Tuple.scala +++ b/tests/invalid/run/Tuple.scala @@ -13,7 +13,7 @@ object Empty extends Tuple final case class *: [H, T <: Tuple](hd: H, tl: T) extends Tuple object Tuple { - import typelevel._ + import typelevel.* type Empty = Empty.type class TupleOps(val xs: Tuple) extends AnyVal { diff --git a/tests/invalid/run/typelevel-patmat.scala b/tests/invalid/run/typelevel-patmat.scala index 7b110c97c42c..e639a7b795a1 100644 --- a/tests/invalid/run/typelevel-patmat.scala +++ b/tests/invalid/run/typelevel-patmat.scala @@ -17,7 +17,7 @@ case object HNil extends HList case class HCons [H, T <: HList](hd: H, tl: T) extends HList object Test extends App { - import typelevel._ + import typelevel.* type HNil = HNil.type type Z = Z.type diff --git a/tests/link/on-custom-lib/builder2.scala b/tests/link/on-custom-lib/builder2.scala index 88c447900ca6..93b2bdd3771c 100644 --- a/tests/link/on-custom-lib/builder2.scala +++ b/tests/link/on-custom-lib/builder2.scala @@ -1,5 +1,5 @@ -import strawman.collection.mutable._ +import strawman.collection.mutable.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/link/on-custom-lib/map2.scala b/tests/link/on-custom-lib/map2.scala index 7a3b41dd4e88..08ca7a634e98 100644 --- a/tests/link/on-custom-lib/map2.scala +++ b/tests/link/on-custom-lib/map2.scala @@ -1,4 +1,4 @@ -import strawman.collection._ +import strawman.collection.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/neg-custom-args/erased/erased-machine-state-encoding-with-inline.scala b/tests/neg-custom-args/erased/erased-machine-state-encoding-with-inline.scala index 0961ca4fbbee..f2d1e8300b45 100644 --- a/tests/neg-custom-args/erased/erased-machine-state-encoding-with-inline.scala +++ b/tests/neg-custom-args/erased/erased-machine-state-encoding-with-inline.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* sealed trait State final class On extends State diff --git a/tests/neg-custom-args/fatal-warnings/i9408b/Test_2.scala b/tests/neg-custom-args/fatal-warnings/i9408b/Test_2.scala index 885126691cf8..1c45f8ba66fe 100644 --- a/tests/neg-custom-args/fatal-warnings/i9408b/Test_2.scala +++ b/tests/neg-custom-args/fatal-warnings/i9408b/Test_2.scala @@ -2,6 +2,6 @@ import language.`3.0-migration` import scala.language.implicitConversions object Test { - import test.conversions.Conv._ + import test.conversions.Conv.* val length: Int = "abc" // error } diff --git a/tests/neg-custom-args/i5498-postfixOps.scala b/tests/neg-custom-args/i5498-postfixOps.scala index 2c02c2c62c5d..8e729f1f3d0a 100644 --- a/tests/neg-custom-args/i5498-postfixOps.scala +++ b/tests/neg-custom-args/i5498-postfixOps.scala @@ -1,4 +1,4 @@ -import scala.concurrent.duration._ +import scala.concurrent.duration.* def test() = { 1 second // error: usage of postfix operator diff --git a/tests/neg-custom-args/implicit-conversions-old.scala b/tests/neg-custom-args/implicit-conversions-old.scala index ca2bf150ddf5..1050094dcaf1 100644 --- a/tests/neg-custom-args/implicit-conversions-old.scala +++ b/tests/neg-custom-args/implicit-conversions-old.scala @@ -15,7 +15,7 @@ object D { } object Test { - import D._ + import D.* val x1: A = new B val x2: B = new A // ok, since it's an old-style comversion diff --git a/tests/neg-custom-args/typeclass-derivation2.scala b/tests/neg-custom-args/typeclass-derivation2.scala index 525d3ea040da..75e549413027 100644 --- a/tests/neg-custom-args/typeclass-derivation2.scala +++ b/tests/neg-custom-args/typeclass-derivation2.scala @@ -5,7 +5,7 @@ object TypeLevel { /** @param caseLabels The case and element labels of the described ADT as encoded strings. */ class GenericClass(labelsStr: String) { - import GenericClass._ + import GenericClass.* /** A mirror of case with ordinal number `ordinal` and elements as given by `Product` */ def mirror(ordinal: Int, product: Product): Mirror = @@ -128,7 +128,7 @@ enum Lst[+T] { object Lst { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* type Shape[T] = Shape.Cases[( Shape.Case[Cons[T], (T, Lst[T])], @@ -161,7 +161,7 @@ case class Pair[T](x: T, y: T) // derives Eq, Pickler, Show object Pair { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* type Shape[T] = Shape.Case[Pair[T], (T, T)] @@ -182,7 +182,7 @@ case class Left[L](x: L) extends Either[L, Nothing] case class Right[R](x: R) extends Either[Nothing, R] object Either { - import TypeLevel._ + import TypeLevel.* type Shape[L, R] = Shape.Cases[( Shape.Case[Left[L], L *: EmptyTuple], @@ -211,7 +211,7 @@ trait Show[T] { } object Show { import scala.compiletime.{erasedValue, error, summonInline} - import TypeLevel._ + import TypeLevel.* inline def tryShow[T](x: T): String = summonInline[Show[T]].show(x) @@ -263,7 +263,7 @@ object Show { // Tests object Test extends App { - import TypeLevel._ + import TypeLevel.* def showPrintln[T: Show](x: T): Unit = println(implicitly[Show[T]].show(x)) diff --git a/tests/neg-macros/BigFloat/BigFloatFromDigitsImpl_1.scala b/tests/neg-macros/BigFloat/BigFloatFromDigitsImpl_1.scala index a1ecc31b776e..96f65d0c0ec0 100644 --- a/tests/neg-macros/BigFloat/BigFloatFromDigitsImpl_1.scala +++ b/tests/neg-macros/BigFloat/BigFloatFromDigitsImpl_1.scala @@ -1,7 +1,7 @@ package test import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ +import scala.quoted.* object BigFloatFromDigitsImpl: def apply(digits: Expr[String])(using Quotes): Expr[BigFloat] = diff --git a/tests/neg-macros/BigFloat/BigFloat_1.scala b/tests/neg-macros/BigFloat/BigFloat_1.scala index 4d256f4394d8..5bb5b49587bd 100644 --- a/tests/neg-macros/BigFloat/BigFloat_1.scala +++ b/tests/neg-macros/BigFloat/BigFloat_1.scala @@ -1,7 +1,7 @@ package test import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ +import scala.quoted.* case class BigFloat(mantissa: BigInt, exponent: Int) { diff --git a/tests/neg-macros/GenericNumLits/EvenFromDigitsImpl_1.scala b/tests/neg-macros/GenericNumLits/EvenFromDigitsImpl_1.scala index 1d2e484daa5d..2c8e0d088ea8 100644 --- a/tests/neg-macros/GenericNumLits/EvenFromDigitsImpl_1.scala +++ b/tests/neg-macros/GenericNumLits/EvenFromDigitsImpl_1.scala @@ -1,7 +1,7 @@ import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ -import Even._ +import scala.quoted.* +import Even.* object EvenFromDigitsImpl: def apply(digits: Expr[String])(using Quotes): Expr[Even] = digits.value match { diff --git a/tests/neg-macros/GenericNumLits/Even_1.scala b/tests/neg-macros/GenericNumLits/Even_1.scala index 6dc1117f25b6..0867150dd944 100644 --- a/tests/neg-macros/GenericNumLits/Even_1.scala +++ b/tests/neg-macros/GenericNumLits/Even_1.scala @@ -1,6 +1,6 @@ import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ +import scala.quoted.* case class Even(n: Int) diff --git a/tests/neg-macros/beta-reduce-inline-result/Macro_1.scala b/tests/neg-macros/beta-reduce-inline-result/Macro_1.scala index 748f2c4d5a41..0dd6bf899b63 100644 --- a/tests/neg-macros/beta-reduce-inline-result/Macro_1.scala +++ b/tests/neg-macros/beta-reduce-inline-result/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def betaReduce[Arg,Result](inline fn: Arg=>Result)(inline arg: Arg): Result = diff --git a/tests/neg-macros/delegate-match-1/Macro_1.scala b/tests/neg-macros/delegate-match-1/Macro_1.scala index b6b87f2939cb..7c5702b56fc6 100644 --- a/tests/neg-macros/delegate-match-1/Macro_1.scala +++ b/tests/neg-macros/delegate-match-1/Macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* inline def f: Any = ${ fImpl } private def fImpl(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* Implicits.search(TypeRepr.of[A]) match { case x: ImplicitSearchSuccess => '{} diff --git a/tests/neg-macros/delegate-match-2/Macro_1.scala b/tests/neg-macros/delegate-match-2/Macro_1.scala index 4583fbf336d8..6c7e6917900e 100644 --- a/tests/neg-macros/delegate-match-2/Macro_1.scala +++ b/tests/neg-macros/delegate-match-2/Macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* inline def f: Any = ${ fImpl } private def fImpl (using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* Implicits.search(TypeRepr.of[A]) match { case x: ImplicitSearchSuccess => '{} diff --git a/tests/neg-macros/delegate-match-3/Macro_1.scala b/tests/neg-macros/delegate-match-3/Macro_1.scala index 11fb28aba16a..89e467388a6f 100644 --- a/tests/neg-macros/delegate-match-3/Macro_1.scala +++ b/tests/neg-macros/delegate-match-3/Macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* inline def f: Any = ${ fImpl } private def fImpl(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* Implicits.search(TypeRepr.of[A]) match { case x: ImplicitSearchSuccess => '{} diff --git a/tests/neg-macros/i10127-a.scala b/tests/neg-macros/i10127-a.scala index c62dab8b7ac2..3e23cf10bd30 100644 --- a/tests/neg-macros/i10127-a.scala +++ b/tests/neg-macros/i10127-a.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object T { def impl[A](using t: Type[A])(using Quotes): Expr[Unit] = { diff --git a/tests/neg-macros/i10127-b.scala b/tests/neg-macros/i10127-b.scala index 8c69ea5444c1..2e87e92efa63 100644 --- a/tests/neg-macros/i10127-b.scala +++ b/tests/neg-macros/i10127-b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class T(x: Type[_ <: Any]) diff --git a/tests/neg-macros/i10709/Macro_1.scala b/tests/neg-macros/i10709/Macro_1.scala index 22f77817bebe..5416bf835cb2 100644 --- a/tests/neg-macros/i10709/Macro_1.scala +++ b/tests/neg-macros/i10709/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.compiletime.summonInline object Invalid { diff --git a/tests/neg-macros/i4044a.scala b/tests/neg-macros/i4044a.scala index 4424149488d2..a2f68d149750 100644 --- a/tests/neg-macros/i4044a.scala +++ b/tests/neg-macros/i4044a.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { diff --git a/tests/neg-macros/i4044b.scala b/tests/neg-macros/i4044b.scala index a692b59b1be8..635dd9ce9d5f 100644 --- a/tests/neg-macros/i4044b.scala +++ b/tests/neg-macros/i4044b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { diff --git a/tests/neg-macros/i4396b.scala b/tests/neg-macros/i4396b.scala index f5c4eb2d7fba..cb42aadaedee 100644 --- a/tests/neg-macros/i4396b.scala +++ b/tests/neg-macros/i4396b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { '{ case class Foo() } // error } \ No newline at end of file diff --git a/tests/neg-macros/i4431.scala b/tests/neg-macros/i4431.scala index 2523a90d6153..c1702e25b42c 100644 --- a/tests/neg-macros/i4431.scala +++ b/tests/neg-macros/i4431.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def h(f: => Int => String): String = ${'{f(42)}} // error diff --git a/tests/neg-macros/i4493-b.scala b/tests/neg-macros/i4493-b.scala index 09470a097367..00386c0b9413 100644 --- a/tests/neg-macros/i4493-b.scala +++ b/tests/neg-macros/i4493-b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Index[K] object Index { inline def succ[K](x: K): Unit = ${ diff --git a/tests/neg-macros/i4493.scala b/tests/neg-macros/i4493.scala index b6121155716a..f600a7ee9478 100644 --- a/tests/neg-macros/i4493.scala +++ b/tests/neg-macros/i4493.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Index[K] object Index { inline def succ[K]: Unit = ${ diff --git a/tests/neg-macros/i4803e.scala b/tests/neg-macros/i4803e.scala index dd4733332895..dc966f850a50 100644 --- a/tests/neg-macros/i4803e.scala +++ b/tests/neg-macros/i4803e.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { def power2(x: Expr[Double])(using Quotes) = '{ diff --git a/tests/neg-macros/i4803f.scala b/tests/neg-macros/i4803f.scala index a2420a3a619a..a081b3108dc9 100644 --- a/tests/neg-macros/i4803f.scala +++ b/tests/neg-macros/i4803f.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { def powerCode(x: Expr[Double], n: Long)(using Quotes): Expr[Double] = diff --git a/tests/neg-macros/i4846.scala b/tests/neg-macros/i4846.scala index e8b666e10232..733336dacb97 100644 --- a/tests/neg-macros/i4846.scala +++ b/tests/neg-macros/i4846.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { inline def foo(inline x: Int): Int = ${ diff --git a/tests/neg-macros/i4890.scala b/tests/neg-macros/i4890.scala index d809c54e3a5f..1694a3a8debd 100644 --- a/tests/neg-macros/i4890.scala +++ b/tests/neg-macros/i4890.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def toExpr(x: Option[String]): Expr[String] = x match { diff --git a/tests/neg-macros/i5547.scala b/tests/neg-macros/i5547.scala index 0f895e65d779..b90204b77149 100644 --- a/tests/neg-macros/i5547.scala +++ b/tests/neg-macros/i5547.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert2(condition: => Boolean): Unit = diff --git a/tests/neg-macros/i5840.scala b/tests/neg-macros/i5840.scala index 21adfa138b57..10c1446ef3c5 100644 --- a/tests/neg-macros/i5840.scala +++ b/tests/neg-macros/i5840.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { type Contextual[T] = Quotes ?=> T diff --git a/tests/neg-macros/i5954.scala b/tests/neg-macros/i5954.scala index 73af3b84b2bd..6740b837c9be 100644 --- a/tests/neg-macros/i5954.scala +++ b/tests/neg-macros/i5954.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1 { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl2(a: MatcherFactory1)(self: Expr[a.AndNotWord]) = '{ val a: Any = $self } // error: access to value a from wrong staging level diff --git a/tests/neg-macros/i5954b.scala b/tests/neg-macros/i5954b.scala index 86f5340ca63d..086351b517b1 100644 --- a/tests/neg-macros/i5954b.scala +++ b/tests/neg-macros/i5954b.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1[A] { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl[T](self: Expr[MatcherFactory1[T]#AndNotWord])(using Quotes) = '{ val a: Any = $self } // error: access to type T from wrong staging level diff --git a/tests/neg-macros/i5954c.scala b/tests/neg-macros/i5954c.scala index 94182d430d1d..5e9e6bbb3178 100644 --- a/tests/neg-macros/i5954c.scala +++ b/tests/neg-macros/i5954c.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1 { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl[T](self: Expr[MatcherFactory1#AndNotWord[T]])(using Quotes) = '{ val a: Any = $self } // error: access to type T from wrong staging level diff --git a/tests/neg-macros/i6432/Macro_1.scala b/tests/neg-macros/i6432/Macro_1.scala index 8ef85c0e9b26..e2628fd45f7f 100644 --- a/tests/neg-macros/i6432/Macro_1.scala +++ b/tests/neg-macros/i6432/Macro_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object Macro { extension (inline sc: StringContext) inline def foo(args: String*): Unit = ${ impl('sc) } def impl(sc: Expr[StringContext])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* sc match { case '{ StringContext(${Varargs(parts)}*) } => for (part @ Expr(s) <- parts) diff --git a/tests/neg-macros/i6432/Test_2.scala b/tests/neg-macros/i6432/Test_2.scala index f09d5f331b8c..b685ee08c1d9 100644 --- a/tests/neg-macros/i6432/Test_2.scala +++ b/tests/neg-macros/i6432/Test_2.scala @@ -1,5 +1,5 @@ object TestA { - import Macro._ + import Macro.* foo"abc${"123"}xyz${"456"}fgh" // error // error // error } \ No newline at end of file diff --git a/tests/neg-macros/i6432b/Macro_1.scala b/tests/neg-macros/i6432b/Macro_1.scala index 8ef85c0e9b26..e2628fd45f7f 100644 --- a/tests/neg-macros/i6432b/Macro_1.scala +++ b/tests/neg-macros/i6432b/Macro_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object Macro { extension (inline sc: StringContext) inline def foo(args: String*): Unit = ${ impl('sc) } def impl(sc: Expr[StringContext])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* sc match { case '{ StringContext(${Varargs(parts)}*) } => for (part @ Expr(s) <- parts) diff --git a/tests/neg-macros/i6432b/Test_2.scala b/tests/neg-macros/i6432b/Test_2.scala index f968f08ccc0d..8b96022afc31 100644 --- a/tests/neg-macros/i6432b/Test_2.scala +++ b/tests/neg-macros/i6432b/Test_2.scala @@ -1,5 +1,5 @@ object TestA { - import Macro._ + import Macro.* foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error } \ No newline at end of file diff --git a/tests/neg-macros/i6436.scala b/tests/neg-macros/i6436.scala index a7f0bda94419..68d53bb0978d 100644 --- a/tests/neg-macros/i6436.scala +++ b/tests/neg-macros/i6436.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(sc: quoted.Expr[StringContext]): Unit = { sc match { diff --git a/tests/neg-macros/i6530b.scala b/tests/neg-macros/i6530b.scala index 93462b2e302f..efc7eb5dd73c 100644 --- a/tests/neg-macros/i6530b.scala +++ b/tests/neg-macros/i6530b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { def program(using Quotes) = '{ val tpe: quoted.Type[Int] = ??? diff --git a/tests/neg-macros/i6622f.scala b/tests/neg-macros/i6622f.scala index e5d323815e79..edd46f9d66c2 100644 --- a/tests/neg-macros/i6622f.scala +++ b/tests/neg-macros/i6622f.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg-macros/i6739.scala b/tests/neg-macros/i6739.scala index c1a749c04fd6..2eb60cadb3ed 100644 --- a/tests/neg-macros/i6739.scala +++ b/tests/neg-macros/i6739.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def assert(expr: => Boolean): Unit = ${ assertImpl('expr) } // error: Macro cannot be implemented with an `inline` method diff --git a/tests/neg-macros/i6762.scala b/tests/neg-macros/i6762.scala index c5f1fb7c86b3..a8df289b26c2 100644 --- a/tests/neg-macros/i6762.scala +++ b/tests/neg-macros/i6762.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* type G[X] case class Foo[T](x: T) diff --git a/tests/neg-macros/i6783.scala b/tests/neg-macros/i6783.scala index 10d2e796e669..9b644cb088aa 100644 --- a/tests/neg-macros/i6783.scala +++ b/tests/neg-macros/i6783.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def test(f: (Int, Int) => Int) = ${ testImpl( diff --git a/tests/neg-macros/i6976/Macro_1.scala b/tests/neg-macros/i6976/Macro_1.scala index c12f9f12fff8..c8b407559f81 100644 --- a/tests/neg-macros/i6976/Macro_1.scala +++ b/tests/neg-macros/i6976/Macro_1.scala @@ -1,12 +1,12 @@ package playground -import scala.quoted._ +import scala.quoted.* object macros { inline def mcr(x: => Any) = ${mcrImpl('x)} def mcrImpl(body: Expr[Any])(using ctx: Quotes) : Expr[Any] = { - import ctx.reflect._ + import ctx.reflect.* body.asTerm match { case Block(_, _) => '{2} } } } diff --git a/tests/neg-macros/i6976/Test_2.scala b/tests/neg-macros/i6976/Test_2.scala index 26247b86e419..c946d2646dff 100644 --- a/tests/neg-macros/i6976/Test_2.scala +++ b/tests/neg-macros/i6976/Test_2.scala @@ -1,5 +1,5 @@ -import playground.macros._ +import playground.macros.* object Test { def main(args: Array[String]): Unit = mcr { 2 } // error diff --git a/tests/neg-macros/i6997.scala b/tests/neg-macros/i6997.scala index b5ed4e9b3ae6..d426d73ebf06 100644 --- a/tests/neg-macros/i6997.scala +++ b/tests/neg-macros/i6997.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def mcrImpl(body: Expr[Any])(using t: Type[_ <: Any])(using ctx: Quotes): Expr[Any] = '{ val tmp = ???.asInstanceOf[t.Underlying] // error // error diff --git a/tests/neg-macros/i6997b.scala b/tests/neg-macros/i6997b.scala index 1726cb1b6473..0ba517d97582 100644 --- a/tests/neg-macros/i6997b.scala +++ b/tests/neg-macros/i6997b.scala @@ -1,6 +1,6 @@ package playground -import scala.quoted._ +import scala.quoted.* inline def mcr(x: => Any): Any = ${mcrImpl('x)} diff --git a/tests/neg-macros/i7013.scala b/tests/neg-macros/i7013.scala index 22cbb307116a..18ba94ca9d36 100644 --- a/tests/neg-macros/i7013.scala +++ b/tests/neg-macros/i7013.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* def foo()(using Quotes) = { class C diff --git a/tests/neg-macros/i7013b.scala b/tests/neg-macros/i7013b.scala index 9ccdfe8e6b4f..ae772770582d 100644 --- a/tests/neg-macros/i7013b.scala +++ b/tests/neg-macros/i7013b.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* class Foo { class Bar diff --git a/tests/neg-macros/i7013c.scala b/tests/neg-macros/i7013c.scala index d7e19653307b..3a58ed3adfe6 100644 --- a/tests/neg-macros/i7013c.scala +++ b/tests/neg-macros/i7013c.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* def foo()(using Quotes) = { type C diff --git a/tests/neg-macros/i7048e.scala b/tests/neg-macros/i7048e.scala index f1f98d221c50..330c444927f0 100644 --- a/tests/neg-macros/i7048e.scala +++ b/tests/neg-macros/i7048e.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* abstract class Test { type T diff --git a/tests/neg-macros/i7052.scala b/tests/neg-macros/i7052.scala index c2d6c021316f..f6ed42c53a2a 100644 --- a/tests/neg-macros/i7052.scala +++ b/tests/neg-macros/i7052.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test { def foo(str: String)(using Quotes) = '{ @deprecated(str, "") // error diff --git a/tests/neg-macros/i7052b.scala b/tests/neg-macros/i7052b.scala index e60dc57fc05c..b3c0836ce5b8 100644 --- a/tests/neg-macros/i7052b.scala +++ b/tests/neg-macros/i7052b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test { def foo(str: String)(using Quotes) = '{ val qctx: Quotes = ??? diff --git a/tests/neg-macros/i7121.scala b/tests/neg-macros/i7121.scala index 5a0a3852e70f..e6d47fb23482 100644 --- a/tests/neg-macros/i7121.scala +++ b/tests/neg-macros/i7121.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class annot1[T](x: Expr[T]) extends scala.annotation.Annotation class annot2[T: Type](x: T) extends scala.annotation.Annotation diff --git a/tests/neg-macros/i7142/Macro_1.scala b/tests/neg-macros/i7142/Macro_1.scala index 3bb81b5d6d1e..282c18c8cdb0 100644 --- a/tests/neg-macros/i7142/Macro_1.scala +++ b/tests/neg-macros/i7142/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { var v = '{0}; diff --git a/tests/neg-macros/i7142b/Macro_1.scala b/tests/neg-macros/i7142b/Macro_1.scala index 677dcb3acf5e..49b5c854dd13 100644 --- a/tests/neg-macros/i7142b/Macro_1.scala +++ b/tests/neg-macros/i7142b/Macro_1.scala @@ -1,6 +1,6 @@ package macros -import scala.quoted._ -import scala.util.control.NonLocalReturns._ +import scala.quoted.* +import scala.util.control.NonLocalReturns.* def oops(using Quotes): Expr[Int] = returning('{ { (x: Int) => ${ throwReturn('x) }} apply 0 }) diff --git a/tests/neg-macros/i7142c/Macro_1.scala b/tests/neg-macros/i7142c/Macro_1.scala index a16eb6b6f3ef..8e8ff862f1aa 100644 --- a/tests/neg-macros/i7142c/Macro_1.scala +++ b/tests/neg-macros/i7142c/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { var v = '{0}; diff --git a/tests/neg-macros/i7142d/Macro_1.scala b/tests/neg-macros/i7142d/Macro_1.scala index 579a12da8d77..56c3844af1f6 100644 --- a/tests/neg-macros/i7142d/Macro_1.scala +++ b/tests/neg-macros/i7142d/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { var v = '{0}; diff --git a/tests/neg-macros/i7142e/Macro_1.scala b/tests/neg-macros/i7142e/Macro_1.scala index 119340dd3d70..c29fddfacd92 100644 --- a/tests/neg-macros/i7142e/Macro_1.scala +++ b/tests/neg-macros/i7142e/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { var v = '{0}; diff --git a/tests/neg-macros/i7142f/Macro_1.scala b/tests/neg-macros/i7142f/Macro_1.scala index 137618e6c15b..8ff86a0da424 100644 --- a/tests/neg-macros/i7142f/Macro_1.scala +++ b/tests/neg-macros/i7142f/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { var v = '{0}; diff --git a/tests/neg-macros/i7142g/Macro_1.scala b/tests/neg-macros/i7142g/Macro_1.scala index 67fdef81a4ba..c6cec2d01046 100644 --- a/tests/neg-macros/i7142g/Macro_1.scala +++ b/tests/neg-macros/i7142g/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { var v = '{}; diff --git a/tests/neg-macros/i7142h/Macro_1.scala b/tests/neg-macros/i7142h/Macro_1.scala index e61b8788266e..77dabfceb181 100644 --- a/tests/neg-macros/i7142h/Macro_1.scala +++ b/tests/neg-macros/i7142h/Macro_1.scala @@ -1,5 +1,5 @@ package macros -import scala.quoted._ +import scala.quoted.* var saved = Option.empty[Expr[Int]] diff --git a/tests/neg-macros/i7264d.scala b/tests/neg-macros/i7264d.scala index 457709de6c58..ee3cecad9214 100644 --- a/tests/neg-macros/i7264d.scala +++ b/tests/neg-macros/i7264d.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f[T2: Type](e: Expr[T2])(using Quotes) = e match { case '{ $x: *:[Int, Any] } => // error: Type argument Any does not conform to upper bound Tuple diff --git a/tests/neg-macros/i7603.scala b/tests/neg-macros/i7603.scala index cb430b648963..c781513fb1ba 100644 --- a/tests/neg-macros/i7603.scala +++ b/tests/neg-macros/i7603.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f[T2: Type](e: Expr[T2])(using Quotes) = e match { case '{ $x: ${'[List[$t]]} } => // error diff --git a/tests/neg-macros/i7618.scala b/tests/neg-macros/i7618.scala index 3c28caf68564..9cbe556cf554 100644 --- a/tests/neg-macros/i7618.scala +++ b/tests/neg-macros/i7618.scala @@ -1,6 +1,6 @@ package macros -import scala.quoted._ +import scala.quoted.* enum Exp { case Num(n: Int) @@ -10,7 +10,7 @@ enum Exp { } object Compiler { - import Exp._ + import Exp.* inline def compile(e: Exp, env: Map[String, Expr[Int]])(using ctx: Quotes): Expr[Int] = inline e match { case Num(n) => @@ -26,7 +26,7 @@ object Compiler { object Example { def run(): Unit = { - import Exp._ + import Exp.* val exp = Plus(Plus(Num(2), Var("x")), Num(4)) val letExp = Let("x", Num(3), exp) diff --git a/tests/neg-macros/i7618b.scala b/tests/neg-macros/i7618b.scala index 817618a54810..770001073272 100644 --- a/tests/neg-macros/i7618b.scala +++ b/tests/neg-macros/i7618b.scala @@ -1,6 +1,6 @@ package macros -import scala.quoted._ +import scala.quoted.* enum Exp { case Num(n: Int) @@ -10,7 +10,7 @@ enum Exp { } object Compiler { - import Exp._ + import Exp.* inline def compile(e: Exp, env: Map[String, Expr[Int]])(using ctx: Quotes): Expr[Int] = inline e match { case Num(n) => @@ -26,7 +26,7 @@ object Compiler { object Example { def run(): Unit = { - import Exp._ + import Exp.* val exp = Plus(Plus(Num(2), Var("x")), Num(4)) val letExp = Let("x", Num(3), exp) diff --git a/tests/neg-macros/i7698.scala b/tests/neg-macros/i7698.scala index b6d3c8817871..5031e47ab198 100644 --- a/tests/neg-macros/i7698.scala +++ b/tests/neg-macros/i7698.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* trait Show[T] { def show(x: T): String } def showInterpolatorImpl(sc: Expr[StringContext], argsExpr: Expr[Seq[Any]])(using Quotes): Expr[String] = - import quotes.reflect._ + import quotes.reflect.* argsExpr.asTerm match case '{ $arg: $t } => // error case '[ Int ] => // error diff --git a/tests/neg-macros/i7839.scala b/tests/neg-macros/i7839.scala index d353f2e633bc..9c7fa295fc35 100644 --- a/tests/neg-macros/i7839.scala +++ b/tests/neg-macros/i7839.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def transform(using dummyImplicit: DummyImplicit): Unit = ${ transformImpl } // error diff --git a/tests/neg-macros/i7892.scala b/tests/neg-macros/i7892.scala index b4f3e5fc9441..1ec8fef16ded 100644 --- a/tests/neg-macros/i7892.scala +++ b/tests/neg-macros/i7892.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* package x { class CExprResult1[T] diff --git a/tests/neg-macros/i7919.scala b/tests/neg-macros/i7919.scala index 790a2a37e727..e68965fc614f 100644 --- a/tests/neg-macros/i7919.scala +++ b/tests/neg-macros/i7919.scala @@ -1,8 +1,8 @@ -import scala.quoted._ +import scala.quoted.* object Test { def staged[T](using Quotes) = { - import quotes.reflect._ + import quotes.reflect.* given typeT: Type[T] with {} // error val tt = TypeRepr.of[T] '{ "in staged" } diff --git a/tests/neg-macros/i8045.scala b/tests/neg-macros/i8045.scala index 66f16d57849d..013a2b3205dd 100644 --- a/tests/neg-macros/i8045.scala +++ b/tests/neg-macros/i8045.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test def run(using Quotes)(tree: quotes.reflect.Tree): Unit = '{ ${ makeExpr(tree) } + 1 } // error diff --git a/tests/neg-macros/i8045b.scala b/tests/neg-macros/i8045b.scala index dd03479788a2..9ca0cbf5a62a 100644 --- a/tests/neg-macros/i8045b.scala +++ b/tests/neg-macros/i8045b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test def run(using q: Quotes)(tree: q.reflect.Tree): Unit = def nested()(using q.Nested): Expr[Int] = diff --git a/tests/neg-macros/i8052.scala b/tests/neg-macros/i8052.scala index d73cbacd6bfe..a22251ed54f5 100644 --- a/tests/neg-macros/i8052.scala +++ b/tests/neg-macros/i8052.scala @@ -1,5 +1,5 @@ -import scala.deriving._ -import scala.quoted._ +import scala.deriving.* +import scala.quoted.* object Macro2 { diff --git a/tests/neg-macros/i8749.scala b/tests/neg-macros/i8749.scala index 591a6809e268..25c9579e1d90 100644 --- a/tests/neg-macros/i8749.scala +++ b/tests/neg-macros/i8749.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object FunObject { def fun(t: String => String) = t diff --git a/tests/neg-macros/i8865.scala b/tests/neg-macros/i8865.scala index 990cbd2cdb30..7bf3f9532d10 100644 --- a/tests/neg-macros/i8865.scala +++ b/tests/neg-macros/i8865.scala @@ -1,8 +1,8 @@ -import scala.quoted._ +import scala.quoted.* object Macro { def impl[A : Type](using Quotes): Expr[A] = { - import quotes.reflect._ + import quotes.reflect.* val tpe = TypeRepr.of[A].asType '{ (a: ${tpe}) => ???} // error: tpe.Underlying cannot be used as a value type '{???} diff --git a/tests/neg-macros/i8871.scala b/tests/neg-macros/i8871.scala index e37767979288..4956061d45fa 100644 --- a/tests/neg-macros/i8871.scala +++ b/tests/neg-macros/i8871.scala @@ -1,7 +1,7 @@ -import scala.quoted._ +import scala.quoted.* object Macro { def impl[A : Type](using Quotes): Unit = { - import quotes.reflect._ + import quotes.reflect.* val tpe = TypeRepr.of[A].asType.asInstanceOf[Type[_ <: AnyRef]] '{ (a: ${tpe}) => ???} // error } diff --git a/tests/neg-macros/i8871b.scala b/tests/neg-macros/i8871b.scala index 0d4a2ad5590e..be243a8e651b 100644 --- a/tests/neg-macros/i8871b.scala +++ b/tests/neg-macros/i8871b.scala @@ -1,7 +1,7 @@ -import scala.quoted._ +import scala.quoted.* object Macro { def impl[A : Type](using Quotes) = { - import quotes.reflect._ + import quotes.reflect.* val tpe/*: Type[? <: AnyKind]*/ = TypeRepr.of[A].asType '{ f[$tpe] } // error } diff --git a/tests/neg-macros/i9014/Macros_1.scala b/tests/neg-macros/i9014/Macros_1.scala index 599214e3bfc2..3bca2bae4dc3 100644 --- a/tests/neg-macros/i9014/Macros_1.scala +++ b/tests/neg-macros/i9014/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait Bar inline given Bar = ${ impl } def impl(using Quotes): Expr[Bar] = quotes.reflect.report.throwError("Failed to expand!") diff --git a/tests/neg-macros/i9801/Macro_1.scala b/tests/neg-macros/i9801/Macro_1.scala index 1d544c66e64f..8308e2bf71e0 100644 --- a/tests/neg-macros/i9801/Macro_1.scala +++ b/tests/neg-macros/i9801/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f() = () @@ -11,7 +11,7 @@ def triggerStackOverflow(n: Int): Expr[Double] = { inline def loop(inline prog: Double): Double = ${impl('prog)} def impl(prog: Expr[Double])(using Quotes) : Expr[Double] = - import quotes.reflect._ + import quotes.reflect.* try { triggerStackOverflow(0) } catch { diff --git a/tests/neg-macros/i9801b/Macro_1.scala b/tests/neg-macros/i9801b/Macro_1.scala index caaeb1ee251b..bb1272f18d30 100644 --- a/tests/neg-macros/i9801b/Macro_1.scala +++ b/tests/neg-macros/i9801b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f() = () diff --git a/tests/neg-macros/i9972/Test_2.scala b/tests/neg-macros/i9972/Test_2.scala index 15599c80538f..70a031781f0b 100644 --- a/tests/neg-macros/i9972/Test_2.scala +++ b/tests/neg-macros/i9972/Test_2.scala @@ -1,6 +1,6 @@ package notmacro -import scala.quoted._ +import scala.quoted.* case class T[A <: AnyKind](s: String) diff --git a/tests/neg-macros/inline-macro-staged-interpreter/Macro_1.scala b/tests/neg-macros/inline-macro-staged-interpreter/Macro_1.scala index 038fab2d88b6..4e56b946207a 100644 --- a/tests/neg-macros/inline-macro-staged-interpreter/Macro_1.scala +++ b/tests/neg-macros/inline-macro-staged-interpreter/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object E { diff --git a/tests/neg-macros/inline-option/Macro_1.scala b/tests/neg-macros/inline-option/Macro_1.scala index 53754d5629ce..f2e3e453fdd2 100644 --- a/tests/neg-macros/inline-option/Macro_1.scala +++ b/tests/neg-macros/inline-option/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macro { def impl(opt: Expr[Option[Int]]) (using Quotes): Expr[Int] = opt.valueOrError match { diff --git a/tests/neg-macros/inline-quote.scala b/tests/neg-macros/inline-quote.scala index 57e97cd1ab22..9b86864f0f3c 100644 --- a/tests/neg-macros/inline-quote.scala +++ b/tests/neg-macros/inline-quote.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/neg-macros/inline-tuples-1/Macro_1.scala b/tests/neg-macros/inline-tuples-1/Macro_1.scala index 76ba8fcb0dc0..031fb01cabe4 100644 --- a/tests/neg-macros/inline-tuples-1/Macro_1.scala +++ b/tests/neg-macros/inline-tuples-1/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def tup1(tup: Expr[Tuple1[Int]]) (using Quotes): Expr[Int] = Expr(tup.valueOrError.productIterator.map(_.asInstanceOf[Int]).sum) diff --git a/tests/neg-macros/macro-class-not-found-1/Bar.scala b/tests/neg-macros/macro-class-not-found-1/Bar.scala index df9d90619500..feaa28c80115 100644 --- a/tests/neg-macros/macro-class-not-found-1/Bar.scala +++ b/tests/neg-macros/macro-class-not-found-1/Bar.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Bar { Foo.myMacro() // error diff --git a/tests/neg-macros/macro-class-not-found-1/Foo.scala b/tests/neg-macros/macro-class-not-found-1/Foo.scala index 554f41549544..8d834194c926 100644 --- a/tests/neg-macros/macro-class-not-found-1/Foo.scala +++ b/tests/neg-macros/macro-class-not-found-1/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/neg-macros/macro-class-not-found-2/Bar.scala b/tests/neg-macros/macro-class-not-found-2/Bar.scala index df9d90619500..feaa28c80115 100644 --- a/tests/neg-macros/macro-class-not-found-2/Bar.scala +++ b/tests/neg-macros/macro-class-not-found-2/Bar.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Bar { Foo.myMacro() // error diff --git a/tests/neg-macros/macro-class-not-found-2/Foo.scala b/tests/neg-macros/macro-class-not-found-2/Foo.scala index 930eb7c56ed5..af56938ebf5b 100644 --- a/tests/neg-macros/macro-class-not-found-2/Foo.scala +++ b/tests/neg-macros/macro-class-not-found-2/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/neg-macros/macros-in-same-project-1.scala b/tests/neg-macros/macros-in-same-project-1.scala index 4291d1738eb1..b3b9d29b0ac7 100644 --- a/tests/neg-macros/macros-in-same-project-1.scala +++ b/tests/neg-macros/macros-in-same-project-1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Bar { diff --git a/tests/neg-macros/macros-in-same-project-2.scala b/tests/neg-macros/macros-in-same-project-2.scala index 14b8ffc17773..60a42a090208 100644 --- a/tests/neg-macros/macros-in-same-project-2.scala +++ b/tests/neg-macros/macros-in-same-project-2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Bar { diff --git a/tests/neg-macros/macros-in-same-project-4/Bar.scala b/tests/neg-macros/macros-in-same-project-4/Bar.scala index 7e27c915b791..9e039e2ae4d1 100644 --- a/tests/neg-macros/macros-in-same-project-4/Bar.scala +++ b/tests/neg-macros/macros-in-same-project-4/Bar.scala @@ -1,5 +1,5 @@ // nopos-error -import scala.quoted._ +import scala.quoted.* object Bar { diff --git a/tests/neg-macros/macros-in-same-project-4/Foo.scala b/tests/neg-macros/macros-in-same-project-4/Foo.scala index ab32b37e1e2f..5c60fb7e387b 100644 --- a/tests/neg-macros/macros-in-same-project-4/Foo.scala +++ b/tests/neg-macros/macros-in-same-project-4/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/neg-macros/macros-in-same-project-5/Bar.scala b/tests/neg-macros/macros-in-same-project-5/Bar.scala index adba4358f853..92cb1eb4e373 100644 --- a/tests/neg-macros/macros-in-same-project-5/Bar.scala +++ b/tests/neg-macros/macros-in-same-project-5/Bar.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Bar { diff --git a/tests/neg-macros/macros-in-same-project-5/Foo.scala b/tests/neg-macros/macros-in-same-project-5/Foo.scala index b50e017cc1c5..f3d446b85575 100644 --- a/tests/neg-macros/macros-in-same-project-5/Foo.scala +++ b/tests/neg-macros/macros-in-same-project-5/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import Bar.aMacroImplementation object Foo { diff --git a/tests/neg-macros/macros-in-same-project-6/Bar.scala b/tests/neg-macros/macros-in-same-project-6/Bar.scala index df9d90619500..feaa28c80115 100644 --- a/tests/neg-macros/macros-in-same-project-6/Bar.scala +++ b/tests/neg-macros/macros-in-same-project-6/Bar.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Bar { Foo.myMacro() // error diff --git a/tests/neg-macros/macros-in-same-project-6/Foo.scala b/tests/neg-macros/macros-in-same-project-6/Foo.scala index e538f2aff51d..251d7b1ddbda 100644 --- a/tests/neg-macros/macros-in-same-project-6/Foo.scala +++ b/tests/neg-macros/macros-in-same-project-6/Foo.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def myMacro(): Unit = ${ aMacroImplementation } def aMacroImplementation(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* report.error("some error", Position.ofMacroExpansion) throw new NoClassDefFoundError("Bar$") } diff --git a/tests/neg-macros/old-inline-param-macro.scala b/tests/neg-macros/old-inline-param-macro.scala index 95582fc60483..ed3daad6bde8 100644 --- a/tests/neg-macros/old-inline-param-macro.scala +++ b/tests/neg-macros/old-inline-param-macro.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def old(inline x: Int): Int = ${ oldImpl(x) } // error diff --git a/tests/neg-macros/quote-0.scala b/tests/neg-macros/quote-0.scala index 022eb5e5b3af..a4e7ef041394 100644 --- a/tests/neg-macros/quote-0.scala +++ b/tests/neg-macros/quote-0.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { diff --git a/tests/neg-macros/quote-1.scala b/tests/neg-macros/quote-1.scala index daabf4f00bc3..4b5efb3017e1 100644 --- a/tests/neg-macros/quote-1.scala +++ b/tests/neg-macros/quote-1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test { diff --git a/tests/neg-macros/quote-complex-top-splice.scala b/tests/neg-macros/quote-complex-top-splice.scala index baa412174774..609e7eff5081 100644 --- a/tests/neg-macros/quote-complex-top-splice.scala +++ b/tests/neg-macros/quote-complex-top-splice.scala @@ -1,6 +1,6 @@ import Test.impl -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/neg-macros/quote-error-2/Macro_1.scala b/tests/neg-macros/quote-error-2/Macro_1.scala index 103780f321a4..7a98d7145698 100644 --- a/tests/neg-macros/quote-error-2/Macro_1.scala +++ b/tests/neg-macros/quote-error-2/Macro_1.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* object Macro_1 { inline def foo(inline b: Boolean): Unit = ${ fooImpl('b) } diff --git a/tests/neg-macros/quote-error-2/Test_2.scala b/tests/neg-macros/quote-error-2/Test_2.scala index fccefeaad1f3..f2beaffe8729 100644 --- a/tests/neg-macros/quote-error-2/Test_2.scala +++ b/tests/neg-macros/quote-error-2/Test_2.scala @@ -1,4 +1,4 @@ -import Macro_1._ +import Macro_1.* object Test_2 { foo(true) diff --git a/tests/neg-macros/quote-error/Macro_1.scala b/tests/neg-macros/quote-error/Macro_1.scala index 967257130303..668f2b99c33b 100644 --- a/tests/neg-macros/quote-error/Macro_1.scala +++ b/tests/neg-macros/quote-error/Macro_1.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* object Macro_1 { inline def foo(inline b: Boolean): Unit = ${fooImpl('b)} diff --git a/tests/neg-macros/quote-error/Test_2.scala b/tests/neg-macros/quote-error/Test_2.scala index fccefeaad1f3..f2beaffe8729 100644 --- a/tests/neg-macros/quote-error/Test_2.scala +++ b/tests/neg-macros/quote-error/Test_2.scala @@ -1,4 +1,4 @@ -import Macro_1._ +import Macro_1.* object Test_2 { foo(true) diff --git a/tests/neg-macros/quote-exception/Macro_1.scala b/tests/neg-macros/quote-exception/Macro_1.scala index c2d1287aea0f..2fa482a81c56 100644 --- a/tests/neg-macros/quote-exception/Macro_1.scala +++ b/tests/neg-macros/quote-exception/Macro_1.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* object Macro_1 { inline def foo(inline b: Boolean): Unit = ${fooImpl('b)} diff --git a/tests/neg-macros/quote-exception/Test_2.scala b/tests/neg-macros/quote-exception/Test_2.scala index 5512cd78d6d9..6ec5c6d1ed89 100644 --- a/tests/neg-macros/quote-exception/Test_2.scala +++ b/tests/neg-macros/quote-exception/Test_2.scala @@ -1,4 +1,4 @@ -import Macro_1._ +import Macro_1.* object Test_2 { foo(true) diff --git a/tests/neg-macros/quote-interpolator-core-old.scala b/tests/neg-macros/quote-interpolator-core-old.scala index cd613c584ede..cf14141febce 100644 --- a/tests/neg-macros/quote-interpolator-core-old.scala +++ b/tests/neg-macros/quote-interpolator-core-old.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* // This test checks the correct interpretation of the inlined value class diff --git a/tests/neg-macros/quote-macro-2-splices.scala b/tests/neg-macros/quote-macro-2-splices.scala index 1b25ecce07c9..9fd2a0735c82 100644 --- a/tests/neg-macros/quote-macro-2-splices.scala +++ b/tests/neg-macros/quote-macro-2-splices.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/neg-macros/quote-macro-complex-arg-0.scala b/tests/neg-macros/quote-macro-complex-arg-0.scala index da11de825897..d7be7bb692a1 100644 --- a/tests/neg-macros/quote-macro-complex-arg-0.scala +++ b/tests/neg-macros/quote-macro-complex-arg-0.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def foo(inline i: Int, dummy: Int, j: Int): Int = ${ bar(i + 1, 'j) } // error: i + 1 is not a parameter or field reference diff --git a/tests/neg-macros/quote-macro-splice.scala b/tests/neg-macros/quote-macro-splice.scala index 01f85825d4ed..f67d1b66ae39 100644 --- a/tests/neg-macros/quote-macro-splice.scala +++ b/tests/neg-macros/quote-macro-splice.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/neg-macros/quote-open-patterns-stages.scala b/tests/neg-macros/quote-open-patterns-stages.scala index 7adf28174bd1..da4459be865c 100644 --- a/tests/neg-macros/quote-open-patterns-stages.scala +++ b/tests/neg-macros/quote-open-patterns-stages.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(using Quotes)(x: Expr[Any]) = x match { case '{ identity($y(x)) } => // error: access to value x from wrong staging level diff --git a/tests/neg-macros/quote-open-patterns-typer.scala b/tests/neg-macros/quote-open-patterns-typer.scala index 4380aa9fb4ff..066b34d4925b 100644 --- a/tests/neg-macros/quote-open-patterns-typer.scala +++ b/tests/neg-macros/quote-open-patterns-typer.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(using Quotes)(x: Expr[Any]) = x match { case '{ val a: Int = 3; $y(identity(a)) } => // error: Exprected an identifier diff --git a/tests/neg-macros/quote-pattern-implemnetation-restrictions.scala b/tests/neg-macros/quote-pattern-implemnetation-restrictions.scala index 88876cc7d922..d05f2030cd7d 100644 --- a/tests/neg-macros/quote-pattern-implemnetation-restrictions.scala +++ b/tests/neg-macros/quote-pattern-implemnetation-restrictions.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(x: Expr[Any])(using Quotes) = x match { diff --git a/tests/neg-macros/quote-pcp-in-arg.scala b/tests/neg-macros/quote-pcp-in-arg.scala index d864e84272c1..333527867e3a 100644 --- a/tests/neg-macros/quote-pcp-in-arg.scala +++ b/tests/neg-macros/quote-pcp-in-arg.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def foo(x: Int): Int = ${ bar('{ 'x; x }) } // error diff --git a/tests/neg-macros/quote-splice-interpret-1.scala b/tests/neg-macros/quote-splice-interpret-1.scala index 72507b281215..8811b6f66e84 100644 --- a/tests/neg-macros/quote-splice-interpret-1.scala +++ b/tests/neg-macros/quote-splice-interpret-1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def isZero(inline n: Int): Boolean = ${ diff --git a/tests/neg-macros/quote-spliceNonStaged.scala b/tests/neg-macros/quote-spliceNonStaged.scala index ac5e9a4696bc..3cfecde2b8a4 100644 --- a/tests/neg-macros/quote-spliceNonStaged.scala +++ b/tests/neg-macros/quote-spliceNonStaged.scala @@ -1,5 +1,5 @@ package quotes -import scala.quoted._ +import scala.quoted.* object Quotes_1 { def printHello(using Quotes): Expr[Unit] = '{ println("Hello") } diff --git a/tests/neg-macros/quote-this-a.scala b/tests/neg-macros/quote-this-a.scala index 7a41fbbc612e..11621176526b 100644 --- a/tests/neg-macros/quote-this-a.scala +++ b/tests/neg-macros/quote-this-a.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { diff --git a/tests/neg-macros/quote-this-b.scala b/tests/neg-macros/quote-this-b.scala index 14f47c4b3735..9efaa4813eef 100644 --- a/tests/neg-macros/quote-this-b.scala +++ b/tests/neg-macros/quote-this-b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { inline def k(): Unit = ${ Foo.impl[Any](this) } // error diff --git a/tests/neg-macros/quote-this-c.scala b/tests/neg-macros/quote-this-c.scala index fb842a7aba70..ac3e457049f7 100644 --- a/tests/neg-macros/quote-this-c.scala +++ b/tests/neg-macros/quote-this-c.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { diff --git a/tests/neg-macros/quote-whitebox/Macro_1.scala b/tests/neg-macros/quote-whitebox/Macro_1.scala index 273e755426a2..a18fccbc166e 100644 --- a/tests/neg-macros/quote-whitebox/Macro_1.scala +++ b/tests/neg-macros/quote-whitebox/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { transparent inline def defaultOf(inline str: String): Any = ${ defaultOfImpl('str) } diff --git a/tests/neg-macros/quote-whitebox/Test_2.scala b/tests/neg-macros/quote-whitebox/Test_2.scala index 984e741af216..7b00dbfde325 100644 --- a/tests/neg-macros/quote-whitebox/Test_2.scala +++ b/tests/neg-macros/quote-whitebox/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/neg-macros/quotedPatterns-5.scala b/tests/neg-macros/quotedPatterns-5.scala index 6d474fa3e338..4030604d19f5 100644 --- a/tests/neg-macros/quotedPatterns-5.scala +++ b/tests/neg-macros/quotedPatterns-5.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def test(x: quoted.Expr[Int])(using Quotes): Unit = x match { case '{ type t; 4 } => Type.of[t] diff --git a/tests/neg-macros/quotedPatterns-6.scala b/tests/neg-macros/quotedPatterns-6.scala index 0ee7581732a5..b31662db8aa2 100644 --- a/tests/neg-macros/quotedPatterns-6.scala +++ b/tests/neg-macros/quotedPatterns-6.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def test(x: quoted.Expr[Int])(using Quotes) = x match { case '{ poly[${Foo(t)}]($x); 4 } => ??? // error diff --git a/tests/neg-macros/reflect-inline/assert_1.scala b/tests/neg-macros/reflect-inline/assert_1.scala index 32abbfe3ea17..2c5b324450c5 100644 --- a/tests/neg-macros/reflect-inline/assert_1.scala +++ b/tests/neg-macros/reflect-inline/assert_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object api { extension (inline x: String) inline def stripMargin2: String = diff --git a/tests/neg-macros/reflect-inline/test_2.scala b/tests/neg-macros/reflect-inline/test_2.scala index 0be48280e8ec..687151a88c49 100644 --- a/tests/neg-macros/reflect-inline/test_2.scala +++ b/tests/neg-macros/reflect-inline/test_2.scala @@ -1,4 +1,4 @@ -import api._ +import api.* class Test { val a: String = "5" diff --git a/tests/neg-macros/splice-in-top-level-splice-1.scala b/tests/neg-macros/splice-in-top-level-splice-1.scala index 63c503caeeb3..a80617a64252 100644 --- a/tests/neg-macros/splice-in-top-level-splice-1.scala +++ b/tests/neg-macros/splice-in-top-level-splice-1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def foo(): Int = ${bar(${x})} // error diff --git a/tests/neg-macros/splice-in-top-level-splice-2.scala b/tests/neg-macros/splice-in-top-level-splice-2.scala index 33bb3fddcdc1..2e395f59135b 100644 --- a/tests/neg-macros/splice-in-top-level-splice-2.scala +++ b/tests/neg-macros/splice-in-top-level-splice-2.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def foo(): Int = ${$x} // error diff --git a/tests/neg-macros/splice-non-expr.scala b/tests/neg-macros/splice-non-expr.scala index 3f9b32642415..faa1be467f2c 100644 --- a/tests/neg-macros/splice-non-expr.scala +++ b/tests/neg-macros/splice-non-expr.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def test(using Quotes) = '{ ${3} // error diff --git a/tests/neg-macros/tasty-macro-assert-1/quoted_1.scala b/tests/neg-macros/tasty-macro-assert-1/quoted_1.scala index 4eab8e37bfb2..218135527127 100644 --- a/tests/neg-macros/tasty-macro-assert-1/quoted_1.scala +++ b/tests/neg-macros/tasty-macro-assert-1/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Asserts { @@ -13,7 +13,7 @@ object Asserts { ${impl('cond)} def impl(cond: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = cond.asTerm diff --git a/tests/neg-macros/tasty-macro-assert-1/quoted_2.scala b/tests/neg-macros/tasty-macro-assert-1/quoted_2.scala index 25ef0291b120..516166f60f83 100644 --- a/tests/neg-macros/tasty-macro-assert-1/quoted_2.scala +++ b/tests/neg-macros/tasty-macro-assert-1/quoted_2.scala @@ -1,5 +1,5 @@ -import Asserts._ +import Asserts.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/neg-macros/tasty-macro-assert-2/quoted_1.scala b/tests/neg-macros/tasty-macro-assert-2/quoted_1.scala index ecf291b973da..d29c62b4b3af 100644 --- a/tests/neg-macros/tasty-macro-assert-2/quoted_1.scala +++ b/tests/neg-macros/tasty-macro-assert-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Asserts { @@ -13,7 +13,7 @@ object Asserts { ${ impl('cond) } def impl(cond: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = cond.asTerm diff --git a/tests/neg-macros/tasty-macro-assert-2/quoted_2.scala b/tests/neg-macros/tasty-macro-assert-2/quoted_2.scala index b43e3cc84dde..72f870d18673 100644 --- a/tests/neg-macros/tasty-macro-assert-2/quoted_2.scala +++ b/tests/neg-macros/tasty-macro-assert-2/quoted_2.scala @@ -1,5 +1,5 @@ -import Asserts._ +import Asserts.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/neg-macros/tasty-macro-error/quoted_1.scala b/tests/neg-macros/tasty-macro-error/quoted_1.scala index 74478c7bd5a6..b395ec4c240b 100644 --- a/tests/neg-macros/tasty-macro-error/quoted_1.scala +++ b/tests/neg-macros/tasty-macro-error/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def fun(x: Any): Unit = ${ impl('x) } def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* report.error("here is the the argument is " + x.asTerm.underlyingArgument.show, x.asTerm.underlyingArgument.pos) '{} } diff --git a/tests/neg-macros/tasty-macro-error/quoted_2.scala b/tests/neg-macros/tasty-macro-error/quoted_2.scala index a79636e8e51d..b7874493752c 100644 --- a/tests/neg-macros/tasty-macro-error/quoted_2.scala +++ b/tests/neg-macros/tasty-macro-error/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/neg-macros/tasty-macro-positions/quoted_1.scala b/tests/neg-macros/tasty-macro-positions/quoted_1.scala index 01917a3f1011..b77373baa21c 100644 --- a/tests/neg-macros/tasty-macro-positions/quoted_1.scala +++ b/tests/neg-macros/tasty-macro-positions/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def fun(x: Any): Unit = ${ impl('x) } def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val pos = x.asTerm.underlyingArgument.pos report.error("here is the the argument is " + x.asTerm.underlyingArgument.show, pos) report.error("here (+5) is the the argument is " + x.asTerm.underlyingArgument.show, Position(pos.sourceFile, pos.start + 5, pos.end + 5)) diff --git a/tests/neg-macros/tasty-macro-positions/quoted_2.scala b/tests/neg-macros/tasty-macro-positions/quoted_2.scala index 632a24446cab..033486e85194 100644 --- a/tests/neg-macros/tasty-macro-positions/quoted_2.scala +++ b/tests/neg-macros/tasty-macro-positions/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/neg-macros/tasty-string-interpolator-position-a/Macro_1.scala b/tests/neg-macros/tasty-string-interpolator-position-a/Macro_1.scala index 90cf7e6a441c..88cf424a1ebf 100644 --- a/tests/neg-macros/tasty-string-interpolator-position-a/Macro_1.scala +++ b/tests/neg-macros/tasty-string-interpolator-position-a/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions object Macro { @@ -10,7 +10,7 @@ object Macro { object FIntepolator { def apply(strCtxExpr: Expr[StringContext], argsExpr: Expr[Seq[Any]])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* report.error("there are no parts", strCtxExpr.asTerm.underlyingArgument.pos) '{ ($strCtxExpr).s($argsExpr*) } } diff --git a/tests/neg-macros/tasty-string-interpolator-position-a/Test_2.scala b/tests/neg-macros/tasty-string-interpolator-position-a/Test_2.scala index 0b335d55c40c..3307d9994840 100644 --- a/tests/neg-macros/tasty-string-interpolator-position-a/Test_2.scala +++ b/tests/neg-macros/tasty-string-interpolator-position-a/Test_2.scala @@ -1,5 +1,5 @@ -import Macro._ +import Macro.* object Test extends App { diff --git a/tests/neg-macros/tasty-string-interpolator-position-b/Macro_1.scala b/tests/neg-macros/tasty-string-interpolator-position-b/Macro_1.scala index 0ff212d8489e..aac059d06d88 100644 --- a/tests/neg-macros/tasty-string-interpolator-position-b/Macro_1.scala +++ b/tests/neg-macros/tasty-string-interpolator-position-b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions object Macro { @@ -9,7 +9,7 @@ object Macro { object FIntepolator { def apply(strCtxExpr: Expr[StringContext], argsExpr: Expr[Seq[Any]])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* report.error("there are no args", argsExpr.asTerm.underlyingArgument.pos) '{ ($strCtxExpr).s($argsExpr*) } } diff --git a/tests/neg-macros/tasty-string-interpolator-position-b/Test_2.scala b/tests/neg-macros/tasty-string-interpolator-position-b/Test_2.scala index 2242deada224..14728911e30d 100644 --- a/tests/neg-macros/tasty-string-interpolator-position-b/Test_2.scala +++ b/tests/neg-macros/tasty-string-interpolator-position-b/Test_2.scala @@ -1,5 +1,5 @@ -import Macro._ +import Macro.* object Test extends App { diff --git a/tests/neg-macros/toexproftuple.scala b/tests/neg-macros/toexproftuple.scala index 13b61d1ad86f..f33bfd5f6dfb 100644 --- a/tests/neg-macros/toexproftuple.scala +++ b/tests/neg-macros/toexproftuple.scala @@ -1,4 +1,4 @@ -import scala.quoted._, scala.deriving._ +import scala.quoted._, scala.deriving.* inline def mcr: Any = ${mcrImpl} def mcrImpl(using ctx: Quotes): Expr[Any] = { diff --git a/tests/neg-macros/type-splice-in-val-pattern.scala b/tests/neg-macros/type-splice-in-val-pattern.scala index 20d16bea9910..7e5e95cb7785 100644 --- a/tests/neg-macros/type-splice-in-val-pattern.scala +++ b/tests/neg-macros/type-splice-in-val-pattern.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { def f(using q: Quotes) = { val t: Type[Int] = ??? diff --git a/tests/neg-scalajs/abstract-local-js-class.scala b/tests/neg-scalajs/abstract-local-js-class.scala index 2d4bebabb048..051e8e3c66e2 100644 --- a/tests/neg-scalajs/abstract-local-js-class.scala +++ b/tests/neg-scalajs/abstract-local-js-class.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Enclosing { def method(): Unit = { diff --git a/tests/neg-scalajs/internal-annotations.scala b/tests/neg-scalajs/internal-annotations.scala index 82cde0a31f7a..c03334c5d53d 100644 --- a/tests/neg-scalajs/internal-annotations.scala +++ b/tests/neg-scalajs/internal-annotations.scala @@ -1,6 +1,6 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ -import scala.scalajs.js.annotation.internal._ +import scala.scalajs.js.annotation.* +import scala.scalajs.js.annotation.internal.* @JSType trait A // error @JSType class B { // error diff --git a/tests/neg-scalajs/isinstanceof-js-type.scala b/tests/neg-scalajs/isinstanceof-js-type.scala index 15defc52af35..b0d8d130f710 100644 --- a/tests/neg-scalajs/isinstanceof-js-type.scala +++ b/tests/neg-scalajs/isinstanceof-js-type.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native trait NativeJSTrait extends js.Any diff --git a/tests/neg-scalajs/js-case-class-object.scala b/tests/neg-scalajs/js-case-class-object.scala index 62ea3c9852c7..ec96e38d5e9b 100644 --- a/tests/neg-scalajs/js-case-class-object.scala +++ b/tests/neg-scalajs/js-case-class-object.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal case class A1(x: Int) extends js.Object // error diff --git a/tests/neg-scalajs/js-dynamic-literal.scala b/tests/neg-scalajs/js-dynamic-literal.scala index adab45cefbb1..d7d0010caae5 100644 --- a/tests/neg-scalajs/js-dynamic-literal.scala +++ b/tests/neg-scalajs/js-dynamic-literal.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* import scala.scalajs.js.Dynamic.literal object Test { diff --git a/tests/neg-scalajs/js-enums.scala b/tests/neg-scalajs/js-enums.scala index cf94e690011b..209924971286 100644 --- a/tests/neg-scalajs/js-enums.scala +++ b/tests/neg-scalajs/js-enums.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* enum MyEnum extends js.Object: // error case Foo diff --git a/tests/neg-scalajs/js-members-bad-signatures.scala b/tests/neg-scalajs/js-members-bad-signatures.scala index cb6939d2388d..35020e207681 100644 --- a/tests/neg-scalajs/js-members-bad-signatures.scala +++ b/tests/neg-scalajs/js-members-bad-signatures.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal diff --git a/tests/neg-scalajs/js-native-call.scala b/tests/neg-scalajs/js-native-call.scala index 07dd3bd0f50e..17b6e5276588 100644 --- a/tests/neg-scalajs/js-native-call.scala +++ b/tests/neg-scalajs/js-native-call.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { def foo: Int = js.native // error diff --git a/tests/neg-scalajs/js-native-members.scala b/tests/neg-scalajs/js-native-members.scala index 7d45d298e6db..9253fed5db46 100644 --- a/tests/neg-scalajs/js-native-members.scala +++ b/tests/neg-scalajs/js-native-members.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* // rhs must be `js.native` (or calling the primary constructor for constructors) diff --git a/tests/neg-scalajs/js-native-on-scala-type.scala b/tests/neg-scalajs/js-native-on-scala-type.scala index 1177213ff72f..a36d1b503adb 100644 --- a/tests/neg-scalajs/js-native-on-scala-type.scala +++ b/tests/neg-scalajs/js-native-on-scala-type.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* // With the correct amount of native load spec annotations diff --git a/tests/neg-scalajs/js-native-type-wrong-place.scala b/tests/neg-scalajs/js-native-type-wrong-place.scala index 87182ce1da92..8e888a2e2ff0 100644 --- a/tests/neg-scalajs/js-native-type-wrong-place.scala +++ b/tests/neg-scalajs/js-native-type-wrong-place.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* // Nested in Scala class or trait diff --git a/tests/neg-scalajs/js-native-val-def-override.scala b/tests/neg-scalajs/js-native-val-def-override.scala index 6f087e6ec2ec..b29f6e2412dc 100644 --- a/tests/neg-scalajs/js-native-val-def-override.scala +++ b/tests/neg-scalajs/js-native-val-def-override.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* abstract class AbstractParent { val a: Int diff --git a/tests/neg-scalajs/js-native-val-def-wrong-place.scala b/tests/neg-scalajs/js-native-val-def-wrong-place.scala index 3aaded2afcf7..6a772d4dea56 100644 --- a/tests/neg-scalajs/js-native-val-def-wrong-place.scala +++ b/tests/neg-scalajs/js-native-val-def-wrong-place.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object A { val sym = js.Symbol("foo") diff --git a/tests/neg-scalajs/js-native-val-defs.scala b/tests/neg-scalajs/js-native-val-defs.scala index af6be7a3640e..81fb65d09cd8 100644 --- a/tests/neg-scalajs/js-native-val-defs.scala +++ b/tests/neg-scalajs/js-native-val-defs.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* // rhs must be = js.native diff --git a/tests/neg-scalajs/js-native-wrong-kind.scala b/tests/neg-scalajs/js-native-wrong-kind.scala index c11d5e3555de..6f712c1aef32 100644 --- a/tests/neg-scalajs/js-native-wrong-kind.scala +++ b/tests/neg-scalajs/js-native-wrong-kind.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Container { // setters diff --git a/tests/neg-scalajs/js-non-native-members-overloaded.scala b/tests/neg-scalajs/js-non-native-members-overloaded.scala index bf497d999d95..7f5946509a1a 100644 --- a/tests/neg-scalajs/js-non-native-members-overloaded.scala +++ b/tests/neg-scalajs/js-non-native-members-overloaded.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A extends js.Object { private def foo(i: Int): Int = i // error diff --git a/tests/neg-scalajs/js-non-native-members-qualified-private.scala b/tests/neg-scalajs/js-non-native-members-qualified-private.scala index 2d920fe85afd..d3704a79fb47 100644 --- a/tests/neg-scalajs/js-non-native-members-qualified-private.scala +++ b/tests/neg-scalajs/js-non-native-members-qualified-private.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Enclosing1 { class A extends js.Object { diff --git a/tests/neg-scalajs/js-non-native-members.scala b/tests/neg-scalajs/js-non-native-members.scala index ceb75ea7c6cb..c2ad81348566 100644 --- a/tests/neg-scalajs/js-non-native-members.scala +++ b/tests/neg-scalajs/js-non-native-members.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A extends js.Object { def apply(arg: Int): Int = arg // error diff --git a/tests/neg-scalajs/js-trait-members-override.scala b/tests/neg-scalajs/js-trait-members-override.scala index 25d25962a8f9..00caeba68d32 100644 --- a/tests/neg-scalajs/js-trait-members-override.scala +++ b/tests/neg-scalajs/js-trait-members-override.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* abstract class A1 extends js.Object { val a1: js.UndefOr[Int] = 5 diff --git a/tests/neg-scalajs/js-trait-members-wrong-kind.scala b/tests/neg-scalajs/js-trait-members-wrong-kind.scala index 1cc7610d1610..6bae46d717f2 100644 --- a/tests/neg-scalajs/js-trait-members-wrong-kind.scala +++ b/tests/neg-scalajs/js-trait-members-wrong-kind.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* trait A extends js.Object { lazy val a1: js.UndefOr[Int] = js.undefined // error diff --git a/tests/neg-scalajs/js-trait-members.scala b/tests/neg-scalajs/js-trait-members.scala index 69d4c5a9a295..84926f60ed70 100644 --- a/tests/neg-scalajs/js-trait-members.scala +++ b/tests/neg-scalajs/js-trait-members.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* trait A extends js.Object { val a1: js.UndefOr[Int] = 5 // error diff --git a/tests/neg-scalajs/js-type-bad-parents.scala b/tests/neg-scalajs/js-type-bad-parents.scala index cd55aaa0eb4a..5960d61c2a46 100644 --- a/tests/neg-scalajs/js-type-bad-parents.scala +++ b/tests/neg-scalajs/js-type-bad-parents.scala @@ -1,7 +1,7 @@ import scala.language.dynamics import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* // AnyRef as direct parent, invalid for non-native JS types, except traits diff --git a/tests/neg-scalajs/js-type-override-equals-hashcode.scala b/tests/neg-scalajs/js-type-override-equals-hashcode.scala index 0d5a53e2a719..946fc85ceda9 100644 --- a/tests/neg-scalajs/js-type-override-equals-hashcode.scala +++ b/tests/neg-scalajs/js-type-override-equals-hashcode.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A extends js.Object { override def hashCode(): Int = 1 // error diff --git a/tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala b/tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala index 59d4d27ff086..3f4f10a67958 100644 --- a/tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala +++ b/tests/neg-scalajs/jsconstructorof-error-in-prepjsinterop.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal class NativeJSClass extends js.Object @js.native trait NativeJSTrait extends js.Object diff --git a/tests/neg-scalajs/jsconstructorof-error-in-typer.scala b/tests/neg-scalajs/jsconstructorof-error-in-typer.scala index d70f4ef35d3f..22a523ec62fe 100644 --- a/tests/neg-scalajs/jsconstructorof-error-in-typer.scala +++ b/tests/neg-scalajs/jsconstructorof-error-in-typer.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class ScalaClass trait ScalaTrait diff --git a/tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala b/tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala index a57071259256..d9835a0223f9 100644 --- a/tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala +++ b/tests/neg-scalajs/jsconstructortag-error-in-prepjsinterop.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal class NativeJSClass extends js.Object @js.native trait NativeJSTrait extends js.Object diff --git a/tests/neg-scalajs/jsconstructortag-error-in-typer.scala b/tests/neg-scalajs/jsconstructortag-error-in-typer.scala index 0090fa7129f4..8f22b1524392 100644 --- a/tests/neg-scalajs/jsconstructortag-error-in-typer.scala +++ b/tests/neg-scalajs/jsconstructortag-error-in-typer.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class ScalaClass trait ScalaTrait diff --git a/tests/neg-scalajs/jsexport-bad-tostring.scala b/tests/neg-scalajs/jsexport-bad-tostring.scala index 53853b1f3a65..64ec10c5e0fa 100644 --- a/tests/neg-scalajs/jsexport-bad-tostring.scala +++ b/tests/neg-scalajs/jsexport-bad-tostring.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport("toString") // error diff --git a/tests/neg-scalajs/jsexport-conflict-method-prop.scala b/tests/neg-scalajs/jsexport-conflict-method-prop.scala index 1b879024b9d8..0fe0d9325618 100644 --- a/tests/neg-scalajs/jsexport-conflict-method-prop.scala +++ b/tests/neg-scalajs/jsexport-conflict-method-prop.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A1 { @JSExport("a") // error diff --git a/tests/neg-scalajs/jsexport-conflicts.scala b/tests/neg-scalajs/jsexport-conflicts.scala index 1b9aa5245bfe..8a181856cdfb 100644 --- a/tests/neg-scalajs/jsexport-conflicts.scala +++ b/tests/neg-scalajs/jsexport-conflicts.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport diff --git a/tests/neg-scalajs/jsexport-double-definition.scala b/tests/neg-scalajs/jsexport-double-definition.scala index f9ec73439b23..be304aaf8c50 100644 --- a/tests/neg-scalajs/jsexport-double-definition.scala +++ b/tests/neg-scalajs/jsexport-double-definition.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport("value") // error diff --git a/tests/neg-scalajs/jsexport-double-underscore.scala b/tests/neg-scalajs/jsexport-double-underscore.scala index 35d31713d9c6..e73aa22699c7 100644 --- a/tests/neg-scalajs/jsexport-double-underscore.scala +++ b/tests/neg-scalajs/jsexport-double-underscore.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport(name = "__") // error diff --git a/tests/neg-scalajs/jsexport-implicit-apply.scala b/tests/neg-scalajs/jsexport-implicit-apply.scala index 80400fa6556e..83e75516837a 100644 --- a/tests/neg-scalajs/jsexport-implicit-apply.scala +++ b/tests/neg-scalajs/jsexport-implicit-apply.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport // error diff --git a/tests/neg-scalajs/jsexport-js-member.scala b/tests/neg-scalajs/jsexport-js-member.scala index 4178a54df88d..5426350da300 100644 --- a/tests/neg-scalajs/jsexport-js-member.scala +++ b/tests/neg-scalajs/jsexport-js-member.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal diff --git a/tests/neg-scalajs/jsexport-local.scala b/tests/neg-scalajs/jsexport-local.scala index 84c830c4ca5c..a8e7ea50e4bf 100644 --- a/tests/neg-scalajs/jsexport-local.scala +++ b/tests/neg-scalajs/jsexport-local.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { def method(): Unit = { diff --git a/tests/neg-scalajs/jsexport-misplaced-default-or-vararg.scala b/tests/neg-scalajs/jsexport-misplaced-default-or-vararg.scala index eea2d0d373fe..d22ec413bf28 100644 --- a/tests/neg-scalajs/jsexport-misplaced-default-or-vararg.scala +++ b/tests/neg-scalajs/jsexport-misplaced-default-or-vararg.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport // error diff --git a/tests/neg-scalajs/jsexport-non-public.scala b/tests/neg-scalajs/jsexport-non-public.scala index f7e2908b8c50..95ebd09dd0b0 100644 --- a/tests/neg-scalajs/jsexport-non-public.scala +++ b/tests/neg-scalajs/jsexport-non-public.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Container { diff --git a/tests/neg-scalajs/jsexport-on-non-toplevel-class-object.scala b/tests/neg-scalajs/jsexport-on-non-toplevel-class-object.scala index abb4c383e814..7d127a5654ae 100644 --- a/tests/neg-scalajs/jsexport-on-non-toplevel-class-object.scala +++ b/tests/neg-scalajs/jsexport-on-non-toplevel-class-object.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport // error diff --git a/tests/neg-scalajs/jsexport-on-toplevel.scala b/tests/neg-scalajs/jsexport-on-toplevel.scala index ca84e2766472..84f62dd914aa 100644 --- a/tests/neg-scalajs/jsexport-on-toplevel.scala +++ b/tests/neg-scalajs/jsexport-on-toplevel.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @JSExport // error class A1 diff --git a/tests/neg-scalajs/jsexport-setter-with-bad-setter-sig.scala b/tests/neg-scalajs/jsexport-setter-with-bad-setter-sig.scala index f98bd56c9a26..1f6d3373ad00 100644 --- a/tests/neg-scalajs/jsexport-setter-with-bad-setter-sig.scala +++ b/tests/neg-scalajs/jsexport-setter-with-bad-setter-sig.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { @JSExport // error diff --git a/tests/neg-scalajs/jsexportall-bad-names.scala b/tests/neg-scalajs/jsexportall-bad-names.scala index 7e6b8350beda..46fafad578bc 100644 --- a/tests/neg-scalajs/jsexportall-bad-names.scala +++ b/tests/neg-scalajs/jsexportall-bad-names.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @JSExportAll class A { diff --git a/tests/neg-scalajs/jsexportany-non-literal-arguments.scala b/tests/neg-scalajs/jsexportany-non-literal-arguments.scala index 199073f0f393..bbf2b21756c1 100644 --- a/tests/neg-scalajs/jsexportany-non-literal-arguments.scala +++ b/tests/neg-scalajs/jsexportany-non-literal-arguments.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Names { val a = "Hello" diff --git a/tests/neg-scalajs/jsexportstatic-after-stat-or-non-static-field.scala b/tests/neg-scalajs/jsexportstatic-after-stat-or-non-static-field.scala index d6d956d3cdf5..9a0f834bc950 100644 --- a/tests/neg-scalajs/jsexportstatic-after-stat-or-non-static-field.scala +++ b/tests/neg-scalajs/jsexportstatic-after-stat-or-non-static-field.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class AfterVal extends js.Object diff --git a/tests/neg-scalajs/jsexportstatic-conflicts.scala b/tests/neg-scalajs/jsexportstatic-conflicts.scala index 14974ec92bfc..77f43b8988f4 100644 --- a/tests/neg-scalajs/jsexportstatic-conflicts.scala +++ b/tests/neg-scalajs/jsexportstatic-conflicts.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A extends js.Object object A { diff --git a/tests/neg-scalajs/jsexportstatic-twice-same-field.scala b/tests/neg-scalajs/jsexportstatic-twice-same-field.scala index 8764ef5a07b9..7daa5865a802 100644 --- a/tests/neg-scalajs/jsexportstatic-twice-same-field.scala +++ b/tests/neg-scalajs/jsexportstatic-twice-same-field.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class StaticContainer extends js.Object diff --git a/tests/neg-scalajs/jsexportstatic-wrong-kind.scala b/tests/neg-scalajs/jsexportstatic-wrong-kind.scala index fdf4d47b2380..f128e60fe65f 100644 --- a/tests/neg-scalajs/jsexportstatic-wrong-kind.scala +++ b/tests/neg-scalajs/jsexportstatic-wrong-kind.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class StaticContainer extends js.Object diff --git a/tests/neg-scalajs/jsexportstatic-wrong-place.scala b/tests/neg-scalajs/jsexportstatic-wrong-place.scala index c1b649cf39bd..39ca4c026c26 100644 --- a/tests/neg-scalajs/jsexportstatic-wrong-place.scala +++ b/tests/neg-scalajs/jsexportstatic-wrong-place.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { class A1 extends js.Object diff --git a/tests/neg-scalajs/jsexporttoplevel-abstract-class-or-trait.scala b/tests/neg-scalajs/jsexporttoplevel-abstract-class-or-trait.scala index 843e1bab7386..0fe48e0862b9 100644 --- a/tests/neg-scalajs/jsexporttoplevel-abstract-class-or-trait.scala +++ b/tests/neg-scalajs/jsexporttoplevel-abstract-class-or-trait.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @JSExportTopLevel("A") // error abstract class A diff --git a/tests/neg-scalajs/jsexporttoplevel-conflicts.scala b/tests/neg-scalajs/jsexporttoplevel-conflicts.scala index e684b7940ad8..e466fad9917a 100644 --- a/tests/neg-scalajs/jsexporttoplevel-conflicts.scala +++ b/tests/neg-scalajs/jsexporttoplevel-conflicts.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object A { @JSExportTopLevel("A") diff --git a/tests/neg-scalajs/jsexporttoplevel-in-js-type.scala b/tests/neg-scalajs/jsexporttoplevel-in-js-type.scala index fe0d12597a62..3382a3a8f15d 100644 --- a/tests/neg-scalajs/jsexporttoplevel-in-js-type.scala +++ b/tests/neg-scalajs/jsexporttoplevel-in-js-type.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object JSContainer extends js.Object { @JSExportTopLevel("A") // error diff --git a/tests/neg-scalajs/jsexporttoplevel-invalid-js-identifier.scala b/tests/neg-scalajs/jsexporttoplevel-invalid-js-identifier.scala index 0b97e384d407..e9379df5330b 100644 --- a/tests/neg-scalajs/jsexporttoplevel-invalid-js-identifier.scala +++ b/tests/neg-scalajs/jsexporttoplevel-invalid-js-identifier.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @JSExportTopLevel("not-a-valid-JS-identifier-1") // error object A diff --git a/tests/neg-scalajs/jsexporttoplevel-js-native.scala b/tests/neg-scalajs/jsexporttoplevel-js-native.scala index e5b1aa69f85c..bce1496947d6 100644 --- a/tests/neg-scalajs/jsexporttoplevel-js-native.scala +++ b/tests/neg-scalajs/jsexporttoplevel-js-native.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @JSExportTopLevel("A") // error @js.native diff --git a/tests/neg-scalajs/jsexporttoplevel-local.scala b/tests/neg-scalajs/jsexporttoplevel-local.scala index 71b89955d6ce..57c03fdee495 100644 --- a/tests/neg-scalajs/jsexporttoplevel-local.scala +++ b/tests/neg-scalajs/jsexporttoplevel-local.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A { def method(): Unit = { diff --git a/tests/neg-scalajs/jsexporttoplevel-non-public.scala b/tests/neg-scalajs/jsexporttoplevel-non-public.scala index 96466ab49707..1d18b1bab3f5 100644 --- a/tests/neg-scalajs/jsexporttoplevel-non-public.scala +++ b/tests/neg-scalajs/jsexporttoplevel-non-public.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Container { diff --git a/tests/neg-scalajs/jsexporttoplevel-non-static.scala b/tests/neg-scalajs/jsexporttoplevel-non-static.scala index 362717649380..3c02804c62b5 100644 --- a/tests/neg-scalajs/jsexporttoplevel-non-static.scala +++ b/tests/neg-scalajs/jsexporttoplevel-non-static.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class ClassContainer { @JSExportTopLevel("A") // error diff --git a/tests/neg-scalajs/jsexporttoplevel-wrong-kind.scala b/tests/neg-scalajs/jsexporttoplevel-wrong-kind.scala index f3c76d2802d8..b440c0f7750a 100644 --- a/tests/neg-scalajs/jsexporttoplevel-wrong-kind.scala +++ b/tests/neg-scalajs/jsexporttoplevel-wrong-kind.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object A { @JSExportTopLevel("a1") // error diff --git a/tests/neg-scalajs/jsglobalscope-on-non-object.scala b/tests/neg-scalajs/jsglobalscope-on-non-object.scala index e997d8fd3edc..ee5e14448835 100644 --- a/tests/neg-scalajs/jsglobalscope-on-non-object.scala +++ b/tests/neg-scalajs/jsglobalscope-on-non-object.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobalScope // error diff --git a/tests/neg-scalajs/jsname-argument.scala b/tests/neg-scalajs/jsname-argument.scala index 76375ebaa2f3..293433c8217f 100644 --- a/tests/neg-scalajs/jsname-argument.scala +++ b/tests/neg-scalajs/jsname-argument.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Names { val a = "Hello" diff --git a/tests/neg-scalajs/jsname-duplicate.scala b/tests/neg-scalajs/jsname-duplicate.scala index 295c8d3f8104..8d4c67f267ce 100644 --- a/tests/neg-scalajs/jsname-duplicate.scala +++ b/tests/neg-scalajs/jsname-duplicate.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Names { val a = js.Symbol() diff --git a/tests/neg-scalajs/jsname-on-private-members.scala b/tests/neg-scalajs/jsname-on-private-members.scala index 46b93f3d0897..12c800726711 100644 --- a/tests/neg-scalajs/jsname-on-private-members.scala +++ b/tests/neg-scalajs/jsname-on-private-members.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* class A extends js.Object { @JSName("toto1") // error diff --git a/tests/neg-scalajs/jsname-on-trait.scala b/tests/neg-scalajs/jsname-on-trait.scala index ebb4c8aa6946..f2cd689c025f 100644 --- a/tests/neg-scalajs/jsname-on-trait.scala +++ b/tests/neg-scalajs/jsname-on-trait.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal diff --git a/tests/neg-scalajs/jsname-override.scala b/tests/neg-scalajs/jsname-override.scala index 16f948964417..7f50ecf1d8f3 100644 --- a/tests/neg-scalajs/jsname-override.scala +++ b/tests/neg-scalajs/jsname-override.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* abstract class A1 extends js.Object { @JSName("foo") diff --git a/tests/neg-scalajs/jsname-symbol-override.scala b/tests/neg-scalajs/jsname-symbol-override.scala index fd3bf5c79057..1a961b1ba6d4 100644 --- a/tests/neg-scalajs/jsname-symbol-override.scala +++ b/tests/neg-scalajs/jsname-symbol-override.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Syms { val sym1 = js.Symbol() diff --git a/tests/neg-scalajs/jsname-wrong-place.scala b/tests/neg-scalajs/jsname-wrong-place.scala index 0fa8ed02a045..f91a3de1f596 100644 --- a/tests/neg-scalajs/jsname-wrong-place.scala +++ b/tests/neg-scalajs/jsname-wrong-place.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Sym { val sym = js.Symbol() diff --git a/tests/neg-scalajs/native-load-spec-argument.scala b/tests/neg-scalajs/native-load-spec-argument.scala index c5043362147a..33144c6f934b 100644 --- a/tests/neg-scalajs/native-load-spec-argument.scala +++ b/tests/neg-scalajs/native-load-spec-argument.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object Names { val a = "Hello" diff --git a/tests/neg-scalajs/native-load-spec-duplicate.scala b/tests/neg-scalajs/native-load-spec-duplicate.scala index 49d06967d118..e0039ba626c2 100644 --- a/tests/neg-scalajs/native-load-spec-duplicate.scala +++ b/tests/neg-scalajs/native-load-spec-duplicate.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobalScope diff --git a/tests/neg-scalajs/native-load-spec-missing.scala b/tests/neg-scalajs/native-load-spec-missing.scala index 103993bda2b3..4f3046ef42c0 100644 --- a/tests/neg-scalajs/native-load-spec-missing.scala +++ b/tests/neg-scalajs/native-load-spec-missing.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native object A1 extends js.Object // error diff --git a/tests/neg-scalajs/native-load-spec-need-explicit-name.scala b/tests/neg-scalajs/native-load-spec-need-explicit-name.scala index da59a3d57cd5..fc08d414dd63 100644 --- a/tests/neg-scalajs/native-load-spec-need-explicit-name.scala +++ b/tests/neg-scalajs/native-load-spec-need-explicit-name.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* object A { @js.native diff --git a/tests/neg-scalajs/native-load-spec-nested.scala b/tests/neg-scalajs/native-load-spec-nested.scala index 66e6a1d4b8f6..097d58fe0a58 100644 --- a/tests/neg-scalajs/native-load-spec-nested.scala +++ b/tests/neg-scalajs/native-load-spec-nested.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native trait A1 extends js.Object { diff --git a/tests/neg-scalajs/native-load-spec-on-non-js-native.scala b/tests/neg-scalajs/native-load-spec-on-non-js-native.scala index a41bee72a7e2..b9e198286694 100644 --- a/tests/neg-scalajs/native-load-spec-on-non-js-native.scala +++ b/tests/neg-scalajs/native-load-spec-on-non-js-native.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* // Non-native JS types diff --git a/tests/neg-scalajs/native-load-spec-on-trait.scala b/tests/neg-scalajs/native-load-spec-on-trait.scala index 0dd1c925d876..7cb893e04712 100644 --- a/tests/neg-scalajs/native-load-spec-on-trait.scala +++ b/tests/neg-scalajs/native-load-spec-on-trait.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal // error diff --git a/tests/neg-scalajs/non-native-js-types-inside-js-native.scala b/tests/neg-scalajs/non-native-js-types-inside-js-native.scala index c1007c9fc34d..dbfeb787be63 100644 --- a/tests/neg-scalajs/non-native-js-types-inside-js-native.scala +++ b/tests/neg-scalajs/non-native-js-types-inside-js-native.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal diff --git a/tests/neg-scalajs/package-object-extends-js-any.scala b/tests/neg-scalajs/package-object-extends-js-any.scala index 9933c5696d5e..cd7b75033c54 100644 --- a/tests/neg-scalajs/package-object-extends-js-any.scala +++ b/tests/neg-scalajs/package-object-extends-js-any.scala @@ -1,4 +1,4 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* package object jspackage extends js.Object // error diff --git a/tests/neg-scalajs/reflective-calls.scala b/tests/neg-scalajs/reflective-calls.scala index b241e9c72864..750c1ab5640f 100644 --- a/tests/neg-scalajs/reflective-calls.scala +++ b/tests/neg-scalajs/reflective-calls.scala @@ -1,4 +1,4 @@ -import scala.reflect.{ClassTag, Selectable => ReflectSel} +import scala.reflect.{ClassTag, Selectable as ReflectSel} import ReflectSel.reflectiveSelectable object Test { diff --git a/tests/neg-scalajs/scala-types-inside-js-native.scala b/tests/neg-scalajs/scala-types-inside-js-native.scala index 5f155e730f7a..c4d58cd75cf4 100644 --- a/tests/neg-scalajs/scala-types-inside-js-native.scala +++ b/tests/neg-scalajs/scala-types-inside-js-native.scala @@ -1,5 +1,5 @@ import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal diff --git a/tests/neg-staging/i5941/macro_1.scala b/tests/neg-staging/i5941/macro_1.scala index 7079673f6e0b..9eb20b1871c9 100644 --- a/tests/neg-staging/i5941/macro_1.scala +++ b/tests/neg-staging/i5941/macro_1.scala @@ -3,7 +3,7 @@ abstract class Lens[S, T] { def set(t: T, s: S) :S } -import scala.quoted._ +import scala.quoted.* object Lens { def apply[S, T](_get: S => T)(_set: T => S => S): Lens[S, T] = new Lens { @@ -13,8 +13,8 @@ object Lens { def impl[S: Type, T: Type](getter: Expr[S => T])(using Quotes): Expr[Lens[S, T]] = { implicit val toolbox: scala.quoted.staging.Compiler = scala.quoted.staging.Compiler.make(this.getClass.getClassLoader) - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* // obj.copy(field = value) def setterBody(obj: Expr[S], value: Expr[T], field: String): Expr[S] = Select.overloaded(obj.asTerm, "copy", Nil, NamedArg(field, value.asTerm) :: Nil, TypeBounds.empty).asExprOf[S] diff --git a/tests/neg-staging/i9692.scala b/tests/neg-staging/i9692.scala index 10991b379975..e38577f2d409 100644 --- a/tests/neg-staging/i9692.scala +++ b/tests/neg-staging/i9692.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test extends App { diff --git a/tests/neg-staging/i9693.scala b/tests/neg-staging/i9693.scala index 70bc18ac8b4a..ee34d7952df1 100644 --- a/tests/neg-staging/i9693.scala +++ b/tests/neg-staging/i9693.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test extends App { diff --git a/tests/neg-staging/quote-run-in-macro-1/quoted_1.scala b/tests/neg-staging/quote-run-in-macro-1/quoted_1.scala index 8549b2d1ad47..2551bcf76cf0 100644 --- a/tests/neg-staging/quote-run-in-macro-1/quoted_1.scala +++ b/tests/neg-staging/quote-run-in-macro-1/quoted_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Macros { diff --git a/tests/neg-staging/quote-run-in-macro-1/quoted_2.scala b/tests/neg-staging/quote-run-in-macro-1/quoted_2.scala index 9127d3d6be5d..606fbfc9339a 100644 --- a/tests/neg-staging/quote-run-in-macro-1/quoted_2.scala +++ b/tests/neg-staging/quote-run-in-macro-1/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { val x = 3 diff --git a/tests/neg-with-compiler/GenericNumLits/EvenFromDigitsImpl_1.scala b/tests/neg-with-compiler/GenericNumLits/EvenFromDigitsImpl_1.scala index 1d2e484daa5d..2c8e0d088ea8 100644 --- a/tests/neg-with-compiler/GenericNumLits/EvenFromDigitsImpl_1.scala +++ b/tests/neg-with-compiler/GenericNumLits/EvenFromDigitsImpl_1.scala @@ -1,7 +1,7 @@ import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ -import Even._ +import scala.quoted.* +import Even.* object EvenFromDigitsImpl: def apply(digits: Expr[String])(using Quotes): Expr[Even] = digits.value match { diff --git a/tests/neg-with-compiler/GenericNumLits/Even_1.scala b/tests/neg-with-compiler/GenericNumLits/Even_1.scala index 6dc1117f25b6..0867150dd944 100644 --- a/tests/neg-with-compiler/GenericNumLits/Even_1.scala +++ b/tests/neg-with-compiler/GenericNumLits/Even_1.scala @@ -1,6 +1,6 @@ import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ +import scala.quoted.* case class Even(n: Int) diff --git a/tests/neg-with-compiler/Main.scala b/tests/neg-with-compiler/Main.scala index b3b817284e4f..a2ed3c4767c1 100644 --- a/tests/neg-with-compiler/Main.scala +++ b/tests/neg-with-compiler/Main.scala @@ -6,7 +6,7 @@ package dotty.tools package dotc import core.Contexts.Context -import config.Settings.Setting._ +import config.Settings.Setting.* object Main extends Driver { def resident(compiler: Compiler): Unit = unsupported("resident") /*loop { line => diff --git a/tests/neg/6570-1.scala b/tests/neg/6570-1.scala index 046daba285b1..a8cdf6410ed5 100644 --- a/tests/neg/6570-1.scala +++ b/tests/neg/6570-1.scala @@ -1,4 +1,4 @@ -import scala.Tuple._ +import scala.Tuple.* trait Trait1 trait Trait2 diff --git a/tests/neg/6570.scala b/tests/neg/6570.scala index 069aa45313a7..d0b55fe739de 100644 --- a/tests/neg/6570.scala +++ b/tests/neg/6570.scala @@ -6,7 +6,7 @@ object Base { case Int => Trait2 } } -import Base._ +import Base.* object UpperBoundParametricVariant { trait Cov[+T] diff --git a/tests/neg/Iter3.scala b/tests/neg/Iter3.scala index 68dfdc1ac6de..d3bab8c34286 100644 --- a/tests/neg/Iter3.scala +++ b/tests/neg/Iter3.scala @@ -117,7 +117,7 @@ object Iter2 { } case class ArrayIterator[A](elems: Array[AnyRef], len: Int) extends Iterator[A] { - import ArrayIterator._ + import ArrayIterator.* private def elem(i: Int) = elems(i).asInstanceOf[A] diff --git a/tests/neg/OpaqueEscape.scala b/tests/neg/OpaqueEscape.scala index 974bb2c38aed..a6f701fd4e3b 100644 --- a/tests/neg/OpaqueEscape.scala +++ b/tests/neg/OpaqueEscape.scala @@ -1,7 +1,7 @@ object OpaqueEscape{ opaque type Wrapped = Int } -import OpaqueEscape._ +import OpaqueEscape.* abstract class EscaperBase { def unwrap(i:Wrapped):Int def wrap(i:Int):Wrapped diff --git a/tests/neg/caseclass-access.scala b/tests/neg/caseclass-access.scala index e43e6aaa5547..b14ee104ecca 100644 --- a/tests/neg/caseclass-access.scala +++ b/tests/neg/caseclass-access.scala @@ -18,7 +18,7 @@ object qualified_private { case class D private[qualified_private] (i: Int) // ok: no user-defined companion object } object QPrivTest { - import qualified_private._ + import qualified_private.* def c1: C = C(1) // error: apply is private def c2: C = c1.copy(2) // error: copy is private @@ -36,7 +36,7 @@ object qualified_protected { case class F protected[qualified_protected] (i: Int) } object QProtTest { - import qualified_protected._ + import qualified_protected.* def f1: F = F(1) def f2: F = f2.copy(2) // error: copy is protected } diff --git a/tests/neg/dynamicNoImport.scala b/tests/neg/dynamicNoImport.scala index ca12706735fa..44009d02e89d 100644 --- a/tests/neg/dynamicNoImport.scala +++ b/tests/neg/dynamicNoImport.scala @@ -5,13 +5,13 @@ object Baz extends scala.Dynamic // error package A { import scala.language.dynamics package B { - import scala.language.{ dynamics => _ } + import scala.language.dynamics as _ class Foo extends scala.Dynamic // error trait Bar extends scala.Dynamic // error object Baz extends scala.Dynamic // error package C { - import scala.language.{ dynamics => d } + import scala.language.dynamics as d class Foo extends scala.Dynamic // OK } } diff --git a/tests/neg/enum-List3.scala b/tests/neg/enum-List3.scala index 3229cdd82dec..3f0ece2ebed1 100644 --- a/tests/neg/enum-List3.scala +++ b/tests/neg/enum-List3.scala @@ -3,7 +3,7 @@ enum List[+T] { case Nil extends List[Nothing] } object Test { - import List._ + import List.* val xs = Cons(1, Cons(2, Cons(3, Nil))) def main(args: Array[String]) = println(xs) } diff --git a/tests/neg/enum-values.scala b/tests/neg/enum-values.scala index 08069251af0e..bee22094f641 100644 --- a/tests/neg/enum-values.scala +++ b/tests/neg/enum-values.scala @@ -27,7 +27,7 @@ object UnimportedExtensions: object NotAnEnum // object without a companion class def Test: Unit = - import Tag._, ListLike._, TypeCtorsK._, Extensions._ + import Tag._, ListLike._, TypeCtorsK._, Extensions.* val tags: Array[Tag[?]] = Tag.values // error val listlikes: Array[ListLike[?]] = ListLike.values // error diff --git a/tests/neg/enumsAccess.scala b/tests/neg/enumsAccess.scala index a654f0633ead..18b91b346b6a 100644 --- a/tests/neg/enumsAccess.scala +++ b/tests/neg/enumsAccess.scala @@ -15,7 +15,7 @@ object test1 { } object test2 { - import E5._ + import E5.* object E5 { type INT = Integer val defaultX = 2 @@ -34,7 +34,7 @@ object test3 { val defaultX = 2 } - import E5._ + import E5.* enum E5 { case C1(x: INT) // ok @@ -51,7 +51,7 @@ object test4 { case C3[T <: INT]() // error: illegal reference } - import E5._ + import E5.* object E5 { type INT = Integer @@ -73,7 +73,7 @@ object test5 { } object test6 { - import E5._ + import E5.* enum E5[T](x: T) { case C3() extends E5[INT](defaultX) // ok case C4() extends E5[INT](defaultX) // ok diff --git a/tests/neg/extend-java-enum-migration.scala b/tests/neg/extend-java-enum-migration.scala index ce781daf8668..0f006e032942 100644 --- a/tests/neg/extend-java-enum-migration.scala +++ b/tests/neg/extend-java-enum-migration.scala @@ -1,4 +1,4 @@ -import java.{lang => jl} +import java.{lang as jl} import language.`3.0-migration` diff --git a/tests/neg/extend-java-enum-nonstatic.scala b/tests/neg/extend-java-enum-nonstatic.scala index 5f0b6d36f8a8..efd2dcb8c6af 100644 --- a/tests/neg/extend-java-enum-nonstatic.scala +++ b/tests/neg/extend-java-enum-nonstatic.scala @@ -1,4 +1,4 @@ -import java.{lang => jl} +import java.{lang as jl} object TestSuite: def test(op: => Unit): Unit = op diff --git a/tests/neg/extend-java-enum.scala b/tests/neg/extend-java-enum.scala index 48b644cd8b24..c28ad618f1bd 100644 --- a/tests/neg/extend-java-enum.scala +++ b/tests/neg/extend-java-enum.scala @@ -1,4 +1,4 @@ -import java.{lang => jl} +import java.{lang as jl} class C1 extends jl.Enum[C1] // error: class C1 cannot extend java.lang.Enum diff --git a/tests/neg/gadt-alias-injectivity.scala b/tests/neg/gadt-alias-injectivity.scala index 34203a45f4f8..c385ee62754a 100644 --- a/tests/neg/gadt-alias-injectivity.scala +++ b/tests/neg/gadt-alias-injectivity.scala @@ -2,7 +2,7 @@ object Test { enum EQ[A, B] { case Refl[T]() extends EQ[T, T] } - import EQ._ + import EQ.* object A { type Foo[+X] = (X, X) diff --git a/tests/neg/i10511.scala b/tests/neg/i10511.scala index 4ceaae4141e4..67e5b28b5bb8 100644 --- a/tests/neg/i10511.scala +++ b/tests/neg/i10511.scala @@ -3,7 +3,7 @@ enum Bool { case False } -import Bool._ +import Bool.* type Not[B <: Bool] = B match { case True.type => False.type diff --git a/tests/neg/i10901.scala b/tests/neg/i10901.scala index 9552047c402f..19a2e3023c85 100644 --- a/tests/neg/i10901.scala +++ b/tests/neg/i10901.scala @@ -36,7 +36,7 @@ object BugExp4Point2D { case class Point2D[T1:Numeric, T2:Numeric](x:T1, y:T2) - import dsl._ + import dsl.* def main(args: Array[String]): Unit = { val x = IntT diff --git a/tests/neg/i1145.scala b/tests/neg/i1145.scala index b33300b912ae..30948d7f5f01 100644 --- a/tests/neg/i1145.scala +++ b/tests/neg/i1145.scala @@ -2,7 +2,7 @@ object A { def x = 3 def y = { - import B._ + import B.* x // error: ambiguous } } diff --git a/tests/neg/i1286.scala b/tests/neg/i1286.scala index 40db9ab1d46d..a2fcfc983fbc 100644 --- a/tests/neg/i1286.scala +++ b/tests/neg/i1286.scala @@ -6,8 +6,8 @@ import io.Idontexist2 // error import scala.io.{ AnsiColor, Idontexist3 } // error -import scala.io.{ Idontexist4 => Foo } // error -import scala.io.{ Idontexist5 => _ } // error +import scala.io.{ Idontexist4 as Foo } // error +import scala.io.{ Idontexist5 as _ } // error import scala.language.dynamics import scala.language.noAutoTupling diff --git a/tests/neg/i1707.scala b/tests/neg/i1707.scala index 8a6b17ec72f4..7b0486539b7d 100644 --- a/tests/neg/i1707.scala +++ b/tests/neg/i1707.scala @@ -13,11 +13,11 @@ object DepBug { val b = a mkB } def useDep(d: Dep) { // error: procedure syntax - import d._ + import d.* a m (b) } { - import dep._ + import dep.* a m (b) // error: not found: a } dep.a m (dep b) // error (follow on) diff --git a/tests/neg/i2033.scala b/tests/neg/i2033.scala index 16b2690365c7..5e3b9e40f26d 100644 --- a/tests/neg/i2033.scala +++ b/tests/neg/i2033.scala @@ -1,5 +1,5 @@ -import java.io._ -import collection._ +import java.io.* +import collection.* object Test { def check(obj: AnyRef): Unit = { val bos = new ByteArrayOutputStream() diff --git a/tests/neg/i2378.scala b/tests/neg/i2378.scala index 529eba1e6e57..b62aa9fcef6a 100644 --- a/tests/neg/i2378.scala +++ b/tests/neg/i2378.scala @@ -17,7 +17,7 @@ trait Toolbox { } class Test(val tb: Toolbox) { - import tb._ + import tb.* implicit val cap: Cap = null def foo(tree: Tree): Int = (tree: Any) match { diff --git a/tests/neg/i2960.scala b/tests/neg/i2960.scala index 435d9f5cbed1..d4d98d9fc11a 100644 --- a/tests/neg/i2960.scala +++ b/tests/neg/i2960.scala @@ -61,7 +61,7 @@ class Text(val value: String) extends Node { } object Test { -import org.glavo.dotty._ -import org.glavo.dotty.Tag._ +import org.glavo.dotty.* +import org.glavo.dotty.Tag.* 'html{} // error } diff --git a/tests/neg/i3083.scala b/tests/neg/i3083.scala index 916124db0517..28f1cc45250c 100644 --- a/tests/neg/i3083.scala +++ b/tests/neg/i3083.scala @@ -10,7 +10,7 @@ } def expression(adder: Addition) = { - import adder._ + import adder.* add(num(1), num(2)) // error // error (not found: num) } } diff --git a/tests/neg/i3745b.scala b/tests/neg/i3745b.scala index a2148178e205..7dca6390c627 100644 --- a/tests/neg/i3745b.scala +++ b/tests/neg/i3745b.scala @@ -1 +1 @@ -import scala.collection.{ Seq, Seq => _ } // error: Seq is renamed twice +import scala.collection.{ Seq, Seq as _ } // error: Seq is renamed twice diff --git a/tests/neg/i3745c.scala b/tests/neg/i3745c.scala index fd033e877266..40daf0072e05 100644 --- a/tests/neg/i3745c.scala +++ b/tests/neg/i3745c.scala @@ -1 +1 @@ -import scala.collection.{ Seq => A, Seq => B } // error: Seq is renamed twice +import scala.collection.{ Seq as A, Seq as B } // error: Seq is renamed twice diff --git a/tests/neg/i3976.scala b/tests/neg/i3976.scala index 7ec64b6ff23f..f5c1ac4bfcc0 100644 --- a/tests/neg/i3976.scala +++ b/tests/neg/i3976.scala @@ -3,7 +3,7 @@ object Test { case A extends Hoge[List] case B extends Hoge[[X] =>> String] } - import Hoge._ + import Hoge.* A == A A == (B: Hoge[_]) @@ -22,7 +22,7 @@ object Test2 { case A extends Hoge[[F[_]] =>> F[Int]] case B extends Hoge[[F[_]] =>> F[String]] } - import Hoge._ + import Hoge.* A == A A == (B: Hoge[_]) @@ -41,7 +41,7 @@ object Test3 { case A extends Hoge[[X] =>> List] // error: wrong kind case B extends Hoge[[X] =>> [Y] =>> String] // error: wrong kind } - import Hoge._ + import Hoge.* A == A A == (B: Hoge[_]) diff --git a/tests/neg/i4986c.scala b/tests/neg/i4986c.scala index f41948c19169..31458a7e9cbb 100644 --- a/tests/neg/i4986c.scala +++ b/tests/neg/i4986c.scala @@ -1,6 +1,6 @@ package pkg -import annotation._ +import annotation.* class myAnnot extends StaticAnnotation diff --git a/tests/neg/i5455.scala b/tests/neg/i5455.scala index 0d6c601ef985..d9f755407d7c 100644 --- a/tests/neg/i5455.scala +++ b/tests/neg/i5455.scala @@ -18,7 +18,7 @@ object Library { } object User extends App { - import Library._ + import Library.* val x = Nat(3) val y = Nat(4) diff --git a/tests/neg/i5546.scala b/tests/neg/i5546.scala index e261351b9480..d9b1220a6138 100644 --- a/tests/neg/i5546.scala +++ b/tests/neg/i5546.scala @@ -16,7 +16,7 @@ object O { } object Test { - import O._ + import O.* def main(args: Array[String]): Unit = { println(Feet(3) == Meters(3)) // error: cannot compare println(Feet(3) == 3.0) // error: cannot compare diff --git a/tests/neg/i5978.scala b/tests/neg/i5978.scala index 1c81160dba0a..5dddfafb8726 100644 --- a/tests/neg/i5978.scala +++ b/tests/neg/i5978.scala @@ -13,7 +13,7 @@ object TextParser { object Testcase { def main(args: Array[String]): Unit = { - import TextParser._ + import TextParser.* val tp_v: TokenParser[Char, Position[CharSequence]] = TextParser.TP val tp_i = summon[TokenParser[Char, Position[CharSequence]]] // error diff --git a/tests/neg/i6622.scala b/tests/neg/i6622.scala index d2002ed1370f..201f5c3170a2 100644 --- a/tests/neg/i6622.scala +++ b/tests/neg/i6622.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg/i6622a.scala b/tests/neg/i6622a.scala index 1b716444eb63..dd244d0e77d4 100644 --- a/tests/neg/i6622a.scala +++ b/tests/neg/i6622a.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg/i6622b.scala b/tests/neg/i6622b.scala index 48c8a24112cc..03e8c4b1ab5f 100644 --- a/tests/neg/i6622b.scala +++ b/tests/neg/i6622b.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg/i6622c.scala b/tests/neg/i6622c.scala index f9483d7fabdc..9355fa73a9b1 100644 --- a/tests/neg/i6622c.scala +++ b/tests/neg/i6622c.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg/i6622d.scala b/tests/neg/i6622d.scala index 1592086f67a6..ce4ff61d5187 100644 --- a/tests/neg/i6622d.scala +++ b/tests/neg/i6622d.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg/i6622e.scala b/tests/neg/i6622e.scala index 626c15bf4ef8..5b3e1bd2e913 100644 --- a/tests/neg/i6622e.scala +++ b/tests/neg/i6622e.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/neg/i6854.scala b/tests/neg/i6854.scala index 00e960bb670b..5eb0f8bf6028 100644 --- a/tests/neg/i6854.scala +++ b/tests/neg/i6854.scala @@ -1,5 +1,5 @@ object Test { - import Lib._ + import Lib.* val xs: IArray2[Int] = IArray2(1) } diff --git a/tests/neg/i7249.scala b/tests/neg/i7249.scala index 1f1fc3c9a829..6a5a0ba4312e 100644 --- a/tests/neg/i7249.scala +++ b/tests/neg/i7249.scala @@ -1,4 +1,4 @@ -import Predef.{$conforms => _, _} +import Predef.{$conforms as _, *} trait F[H, T] diff --git a/tests/neg/i7459.scala b/tests/neg/i7459.scala index 0635c7b1dcc0..b5b20d7bc22a 100644 --- a/tests/neg/i7459.scala +++ b/tests/neg/i7459.scala @@ -5,7 +5,7 @@ object Foo { println(summon) // error } -import scala.deriving._ +import scala.deriving.* import scala.compiletime.erasedValue inline def summon[T](using t:T): T = t match { diff --git a/tests/neg/i7526.scala b/tests/neg/i7526.scala index ed37df14aa73..c3a3745b8579 100644 --- a/tests/neg/i7526.scala +++ b/tests/neg/i7526.scala @@ -12,7 +12,7 @@ def compQ(name: => String) : (n: NetApi) ?=> Tr[Nothing, n.Comp, n.Comp] = ??? object net extends NetDB with NetHelper -import net._ +import net.* given n: NetApi = net val q: Tr[Nothing, Comp, Comp] = compQ("???") // error Found: Tr[Nothing, ?1.Comp, ?1.Comp] Required: Tr[Nothing, net.Comp, net.Comp] \ No newline at end of file diff --git a/tests/neg/i7575b.scala b/tests/neg/i7575b.scala index af71c535df5f..e85606fe492a 100644 --- a/tests/neg/i7575b.scala +++ b/tests/neg/i7575b.scala @@ -1,2 +1,2 @@ -import scala.language._ +import scala.language.* class Foo() extends Dynamic // error: extension of type scala.Dynamic needs to be enabled diff --git a/tests/neg/i997a.scala b/tests/neg/i997a.scala index eae56400fe51..cb323e1c852b 100644 --- a/tests/neg/i997a.scala +++ b/tests/neg/i997a.scala @@ -9,7 +9,7 @@ class C { private implicit class D(x: Int) extends Super } - import O._ + import O.* println(O.CC(1)) // error: CC cannot be accessed diff --git a/tests/neg/implicitDefs.scala b/tests/neg/implicitDefs.scala index 7c1fcc21d7d6..fbf91ee5c70d 100644 --- a/tests/neg/implicitDefs.scala +++ b/tests/neg/implicitDefs.scala @@ -1,6 +1,6 @@ package test -import Predef.{any2stringadd => _, StringAdd => _, _} +import Predef.{any2stringadd as _, StringAdd as _, *} object implicitDefs { diff --git a/tests/neg/implied-for.scala b/tests/neg/implied-for.scala index 8e9e44b2e413..87f762870400 100644 --- a/tests/neg/implied-for.scala +++ b/tests/neg/implied-for.scala @@ -8,7 +8,7 @@ object A { } object Test extends App { - import A._ + import A.* import A.{given B} val x: B = b // OK diff --git a/tests/neg/import-given.scala b/tests/neg/import-given.scala index ddc3da2fa5cb..080ed1e77ec5 100644 --- a/tests/neg/import-given.scala +++ b/tests/neg/import-given.scala @@ -4,13 +4,13 @@ object A { def foo(using TC) = () } object B { - import A._ + import A.* foo // error: no implicit argument was found foo(using tc) // error: not found: tc foo(using A.tc) // ok } object C { - import A._ + import A.* import A.tc foo // ok foo(using tc) // ok diff --git a/tests/neg/mirror-implicit-scope.scala b/tests/neg/mirror-implicit-scope.scala index 88e909506bed..d8e5048fcd30 100644 --- a/tests/neg/mirror-implicit-scope.scala +++ b/tests/neg/mirror-implicit-scope.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* object Test { class SomeClass diff --git a/tests/neg/missing-implicit-2.scala b/tests/neg/missing-implicit-2.scala index bec1013dbd29..7a76cef05862 100644 --- a/tests/neg/missing-implicit-2.scala +++ b/tests/neg/missing-implicit-2.scala @@ -1,4 +1,4 @@ -import Predef.{byte2Byte => _, _} +import Predef.{byte2Byte as _, *} import scala.concurrent.Future val f = Future[Unit] { } // error diff --git a/tests/neg/missing-implicit-3.scala b/tests/neg/missing-implicit-3.scala index 618a33d88101..387efdb1b48d 100644 --- a/tests/neg/missing-implicit-3.scala +++ b/tests/neg/missing-implicit-3.scala @@ -1,4 +1,4 @@ -import Predef.{byte2Byte => _, _} +import Predef.{byte2Byte as _, *} import math.Numeric val DAYS = scala.concurrent.duration.DAYS diff --git a/tests/neg/missing-implicit.scala b/tests/neg/missing-implicit.scala index 2467fb3d8c20..3968eef97b22 100644 --- a/tests/neg/missing-implicit.scala +++ b/tests/neg/missing-implicit.scala @@ -1,4 +1,4 @@ -import Predef.{byte2Byte => _, _} +import Predef.{byte2Byte as _, *} import math.Numeric def consume[T: Numeric](xs: List[T], limit: T): List[T] = xs match diff --git a/tests/neg/multi-param-derives.scala b/tests/neg/multi-param-derives.scala index d428df806a9c..1e228bf38bcf 100644 --- a/tests/neg/multi-param-derives.scala +++ b/tests/neg/multi-param-derives.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* object Test extends App { { diff --git a/tests/neg/nopredef.scala b/tests/neg/nopredef.scala index 0079be41ee10..0a22e200805a 100644 --- a/tests/neg/nopredef.scala +++ b/tests/neg/nopredef.scala @@ -1,4 +1,4 @@ -import Predef.{assert => _} +import Predef.{assert as _} object Test { assert("asdf" == "asdf") // error: not found assert diff --git a/tests/neg/opaque-bounds.scala b/tests/neg/opaque-bounds.scala index 299d56c3e6e1..3eb03117e469 100644 --- a/tests/neg/opaque-bounds.scala +++ b/tests/neg/opaque-bounds.scala @@ -36,7 +36,7 @@ object Access { } object User { - import Access._ + import Access.* case class Item(rights: Permissions) diff --git a/tests/neg/opaque-id.scala b/tests/neg/opaque-id.scala index 8a46380762fb..e2ad769622d1 100644 --- a/tests/neg/opaque-id.scala +++ b/tests/neg/opaque-id.scala @@ -6,7 +6,7 @@ object Test { } } object Test2 { - import Test._ + import Test.* val x: T[Int] = 2 // error val y: Int = x // error } diff --git a/tests/neg/opaque-immutable-array.scala b/tests/neg/opaque-immutable-array.scala index 82e55eb21f5d..479477f37b6a 100644 --- a/tests/neg/opaque-immutable-array.scala +++ b/tests/neg/opaque-immutable-array.scala @@ -43,7 +43,7 @@ object ia { def xs: IArray[Long] = ??? } object Test { - import ia._ + import ia.* xs.length // error: not a member xs.apply(2) // error: not a member diff --git a/tests/neg/opaque.scala b/tests/neg/opaque.scala index f702b0047f2e..9478683e9345 100644 --- a/tests/neg/opaque.scala +++ b/tests/neg/opaque.scala @@ -49,7 +49,7 @@ object logs { } object Test { - import logs._ + import logs.* val l = Logarithm(2.0) val d: Double = l // error: found: Logarithm, required: Double val l2: Logarithm = 1.0 // error: found: Double, required: Logarithm diff --git a/tests/neg/overrides.scala b/tests/neg/overrides.scala index 590a7db61f6a..48f3260721e9 100644 --- a/tests/neg/overrides.scala +++ b/tests/neg/overrides.scala @@ -27,7 +27,7 @@ package p1 { } } package p2 { // all being in the same package compiles fine - import p1._ + import p1.* abstract class T2 extends T1 { class A { bug() diff --git a/tests/neg/parser-stability-10.scala b/tests/neg/parser-stability-10.scala index 005476163a3d..6414f63af360 100644 --- a/tests/neg/parser-stability-10.scala +++ b/tests/neg/parser-stability-10.scala @@ -8,7 +8,7 @@ def unapply(i1: Int)(i6: List[Int]): Int = { } } // error object i5 { - import collection.mutable._ + import collection.mutable.* try { ??? mutable { case i1(i5, i3, i4) => i5 }} // error } // error \ No newline at end of file diff --git a/tests/neg/parser-stability-23.scala b/tests/neg/parser-stability-23.scala index 2b46f582e819..d63059288b63 100644 --- a/tests/neg/parser-stability-23.scala +++ b/tests/neg/parser-stability-23.scala @@ -1,3 +1,3 @@ object i0 { - import Ordering.{ implicitly => } (true: Boolean) match { case _: i1 => true } // error // error // error + import Ordering.{ implicitly as } (true: Boolean) match { case _: i1 as true } // error // error // error } diff --git a/tests/neg/renaming-imports.scala b/tests/neg/renaming-imports.scala new file mode 100644 index 000000000000..35d661bac68b --- /dev/null +++ b/tests/neg/renaming-imports.scala @@ -0,0 +1,14 @@ +object a: + def * = 1 + def other = 2 + +def test = + object foo: + var x = 0 + import foo as f // error + f.x + + import a.`*` + println(*) // ok + println(other) // error +end test diff --git a/tests/neg/rootImplicits.scala b/tests/neg/rootImplicits.scala index f2f39392597f..f3cfd4b8a42b 100644 --- a/tests/neg/rootImplicits.scala +++ b/tests/neg/rootImplicits.scala @@ -1,6 +1,6 @@ package test -import Predef.{any2stringadd => _, StringAdd => _, _} +import Predef.{any2stringadd as _, StringAdd as _, *} object rootImplicits { diff --git a/tests/neg/shapeless-hcons.scala b/tests/neg/shapeless-hcons.scala index a38effea5d13..701c5c35a9a3 100644 --- a/tests/neg/shapeless-hcons.scala +++ b/tests/neg/shapeless-hcons.scala @@ -18,7 +18,7 @@ sealed trait HNil extends HList { case object HNil extends HNil } -import shapeless._ +import shapeless.* package test { diff --git a/tests/neg/singleton-ops-any.scala b/tests/neg/singleton-ops-any.scala index 2f4112dbe5e1..0d7c05b55fec 100644 --- a/tests/neg/singleton-ops-any.scala +++ b/tests/neg/singleton-ops-any.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.any._ +import scala.compiletime.ops.any.* object Test { val t32: 1 == 1 = true diff --git a/tests/neg/singleton-ops-boolean.scala b/tests/neg/singleton-ops-boolean.scala index 407560cfde57..c7b132851191 100644 --- a/tests/neg/singleton-ops-boolean.scala +++ b/tests/neg/singleton-ops-boolean.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.boolean._ +import scala.compiletime.ops.boolean.* object Test { val t0: ![true] = false diff --git a/tests/neg/singleton-ops-int.scala b/tests/neg/singleton-ops-int.scala index 8b0288dd0ea9..d2fd3a73afcd 100644 --- a/tests/neg/singleton-ops-int.scala +++ b/tests/neg/singleton-ops-int.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* object Test { summon[2 + 3 =:= 6 - 1] diff --git a/tests/neg/singleton-ops-match-type-scrutinee.scala b/tests/neg/singleton-ops-match-type-scrutinee.scala index ed749fa4718d..3b2e71f5bfa1 100644 --- a/tests/neg/singleton-ops-match-type-scrutinee.scala +++ b/tests/neg/singleton-ops-match-type-scrutinee.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* object Test { type Max2[A <: Int, B <: Int] <: Int = (A < B) match { diff --git a/tests/neg/singleton-ops-recursive-match-type.scala b/tests/neg/singleton-ops-recursive-match-type.scala index ca7161e8fcbf..311e397b2e1f 100644 --- a/tests/neg/singleton-ops-recursive-match-type.scala +++ b/tests/neg/singleton-ops-recursive-match-type.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* object Test { type GCD[A <: Int, B <: Int] <: Int = B match { diff --git a/tests/neg/singleton-ops-string.scala b/tests/neg/singleton-ops-string.scala index 9d3b83808092..46093121d3c4 100644 --- a/tests/neg/singleton-ops-string.scala +++ b/tests/neg/singleton-ops-string.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.string._ +import scala.compiletime.ops.string.* object Test { val t0: "Hello " + "world" = "Hello world" diff --git a/tests/neg/singleton-ops-type-alias.scala b/tests/neg/singleton-ops-type-alias.scala index 6b32ca93e338..da24cbe29a79 100644 --- a/tests/neg/singleton-ops-type-alias.scala +++ b/tests/neg/singleton-ops-type-alias.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.boolean._ +import scala.compiletime.ops.boolean.* object Test { type Xor[A <: Boolean, B <: Boolean] = (A && ![B]) || (![A] && B) diff --git a/tests/neg/t6810.scala b/tests/neg/t6810.scala index ff353bb08f1d..1a31a7b9926f 100644 --- a/tests/neg/t6810.scala +++ b/tests/neg/t6810.scala @@ -18,7 +18,7 @@ trait t6810 { val B = s""" """ // or the same for interpolated strings - import System.{lineSeparator => EOL} + import System.{lineSeparator as EOL} val `\u000A` = EOL // backquoted identifiers are arbitrary string literals // anypos-error so as not to interfere with the following bad syntax val ` @@ -27,7 +27,8 @@ trait t6810 { val firebreak = 42 // help parser recovery, could also use rbrace val a = '\u000D' // similar treatment of CR - val b = ' ' // anypos-error CR seen as EOL by scanner; FSR, error only on open quote, unlike `y` + val b = ' +' // anypos-error CR seen as EOL by scanner; FSR, error only on open quote, unlike `y` println(); // scanner firewall val c = '\r' // traditionally } diff --git a/tests/neg/t7239.scala b/tests/neg/t7239.scala index f3a379b4eba5..046fa39fa9ae 100644 --- a/tests/neg/t7239.scala +++ b/tests/neg/t7239.scala @@ -21,12 +21,12 @@ object Test { BrokenMethod().filter(_ => true) // ok locally { - import addWithFilter._ + import addWithFilter.* BrokenMethod().withFilter((_: (Int, String)) => true) // error } locally { - import addWithFilter._ + import addWithFilter.* // adaptToMemberWithArgs sets the type of the tree `x` // to ErrorType (while in silent mode, so the error is not // reported. Later, when the fallback from `withFilter` diff --git a/tests/neg/tagging.scala b/tests/neg/tagging.scala index addf283aec05..548770870981 100644 --- a/tests/neg/tagging.scala +++ b/tests/neg/tagging.scala @@ -38,7 +38,7 @@ object tagging { trait Fathom } object test { - import tagging._ + import tagging.* val x: Double @@ Meter = (1e7).tag[Meter] val y: Double @@ Foot = (123.0).tag[Foot] diff --git a/tests/neg/toplevel-privates/Test_2.scala b/tests/neg/toplevel-privates/Test_2.scala index c2120e2fbd86..4514e820f8f3 100644 --- a/tests/neg/toplevel-privates/Test_2.scala +++ b/tests/neg/toplevel-privates/Test_2.scala @@ -1,6 +1,6 @@ package q -import p._ +import p.* val x1 = x // error: not found diff --git a/tests/neg/unsound-union-gadt.scala b/tests/neg/unsound-union-gadt.scala index 9412f1581e1a..703d4a56e3dc 100644 --- a/tests/neg/unsound-union-gadt.scala +++ b/tests/neg/unsound-union-gadt.scala @@ -3,7 +3,7 @@ object Test { case StrLit() extends Expr[String] case IntLit() extends Expr[Int] } - import Expr._ + import Expr.* def foo[T](e: Expr[T]) = e match { case _: (StrLit | IntLit) => diff --git a/tests/new/imports-pos.scala b/tests/new/imports-pos.scala index f6a55e5e07e7..a9b90dbf4527 100644 --- a/tests/new/imports-pos.scala +++ b/tests/new/imports-pos.scala @@ -1,9 +1,9 @@ package test; -import java.lang.{System => S} +import java.lang.System as S object test { - import S.out.{print => p, println => print} + import S.out.{print as p, println as print} val foo = 1; diff --git a/tests/new/looping-jsig.scala b/tests/new/looping-jsig.scala index 6e3313c463bc..18777ed121b4 100644 --- a/tests/new/looping-jsig.scala +++ b/tests/new/looping-jsig.scala @@ -1,4 +1,4 @@ -import scala.collection.mutable._ +import scala.collection.mutable.* trait BugTrack { trait B[+T] diff --git a/tests/patmat/3455.scala b/tests/patmat/3455.scala index 720b45bc08a7..0359c280d585 100644 --- a/tests/patmat/3455.scala +++ b/tests/patmat/3455.scala @@ -7,7 +7,7 @@ trait AxisCompanion { } object Axis extends AxisCompanion class Axis { - import Axis._ + import Axis.* def test( f: Format ) = f match { case Format.Integer => "Int" } diff --git a/tests/patmat/enum-HList.scala b/tests/patmat/enum-HList.scala index c019cb6cc78c..476b4a3284af 100644 --- a/tests/patmat/enum-HList.scala +++ b/tests/patmat/enum-HList.scala @@ -4,7 +4,7 @@ enum HLst { } object Test { - import HLst._ + import HLst.* def length(hl: HLst): Int = hl match { case HCons(_, tl) => 1 + length(tl) case HNil => 0 diff --git a/tests/patmat/enum-Tree.scala b/tests/patmat/enum-Tree.scala index 25993f459875..fca17947c719 100644 --- a/tests/patmat/enum-Tree.scala +++ b/tests/patmat/enum-Tree.scala @@ -9,7 +9,7 @@ enum Tree[T] { } object Test { - import Tree._ + import Tree.* def eval[T](e: Tree[T]): T = e match { case True => true diff --git a/tests/patmat/enum-approx.scala b/tests/patmat/enum-approx.scala index b29d5ad9d148..7f1f88db99a4 100644 --- a/tests/patmat/enum-approx.scala +++ b/tests/patmat/enum-approx.scala @@ -19,7 +19,7 @@ object Test { assert(Fun.ConstNullSimple.f == null) } - import Fun._ + import Fun.* def f[T, U >: Null](f: Fun[T, U]): T => U = f match { case Identity(g) => g diff --git a/tests/patmat/enum/patmat-enum.scala b/tests/patmat/enum/patmat-enum.scala index ec5c90255f7a..a22d5a5a5ed5 100644 --- a/tests/patmat/enum/patmat-enum.scala +++ b/tests/patmat/enum/patmat-enum.scala @@ -9,7 +9,7 @@ object Test1 { } object Test2 { - import Day._ + import Day.* val day: Day = ??? day match { diff --git a/tests/patmat/enumColor.scala b/tests/patmat/enumColor.scala index 60d610d0d7cf..10156b906393 100644 --- a/tests/patmat/enumColor.scala +++ b/tests/patmat/enumColor.scala @@ -4,7 +4,7 @@ object Test { def f(color: Color) = { - import Color._ + import Color.* color match { case Red | Green | Blue => } diff --git a/tests/patmat/i10085.scala b/tests/patmat/i10085.scala index 314f4253cde8..84b34a334ac8 100644 --- a/tests/patmat/i10085.scala +++ b/tests/patmat/i10085.scala @@ -2,13 +2,13 @@ enum Bool: case True case False -import Bool._ +import Bool.* enum SBool[B <: Bool]: case STrue extends SBool[True.type] case SFalse extends SBool[False.type] -import SBool._ +import SBool.* def f(b: SBool[True.type]): Unit = b match case STrue => () diff --git a/tests/patmat/i3938.scala b/tests/patmat/i3938.scala index 0a6395b0a727..6658903d033d 100644 --- a/tests/patmat/i3938.scala +++ b/tests/patmat/i3938.scala @@ -21,7 +21,7 @@ class Foo { class Test { val foo = new Foo - import foo.bar._ + import foo.bar.* def h(a: A) = { a match { diff --git a/tests/patmat/i7186.scala b/tests/patmat/i7186.scala index d34945bed756..d828cc78b070 100644 --- a/tests/patmat/i7186.scala +++ b/tests/patmat/i7186.scala @@ -1,4 +1,4 @@ -import MIPS._ +import MIPS.* import deriving.Mirror.SumOf @@ -79,14 +79,14 @@ enum PseudoUnary { case class Comment(msg: String) object printMips { - import MIPS._ - import Misc._ - import PseudoZero._ - import PseudoUnary._ - import ZeroAddr._ - import OneAddr._ - import TwoAddr._ - import ThreeAddr._ + import MIPS.* + import Misc.* + import PseudoZero.* + import PseudoUnary.* + import ZeroAddr.* + import OneAddr.* + import TwoAddr.* + import ThreeAddr.* private val endl = System.lineSeparator diff --git a/tests/patmat/i8922.scala b/tests/patmat/i8922.scala index 946b1834998f..132cb359e6aa 100644 --- a/tests/patmat/i8922.scala +++ b/tests/patmat/i8922.scala @@ -15,8 +15,8 @@ enum Expr { } object Interpreter: - import Expr._ - import TokenType._ + import Expr.* + import TokenType.* def eval(expr: Expr): String | Int | Double | Boolean | Unit = expr match diff --git a/tests/patmat/i8922c.scala b/tests/patmat/i8922c.scala index 63d968c80345..ef5b72ec993d 100644 --- a/tests/patmat/i8922c.scala +++ b/tests/patmat/i8922c.scala @@ -15,8 +15,8 @@ enum Expr { } object Interpreter: - import Expr._ - import TokenType._ + import Expr.* + import TokenType.* def eval(expr: Expr): String | Int | Double | Boolean | Unit = expr match diff --git a/tests/patmat/i9489.scala b/tests/patmat/i9489.scala index ef24a4b4c553..234c2f7e9f05 100644 --- a/tests/patmat/i9489.scala +++ b/tests/patmat/i9489.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def summonTypedType[T : Type](using Quotes): String = Type.of[T] match { case '[Boolean] => "Boolean" diff --git a/tests/patmat/i9489b.scala b/tests/patmat/i9489b.scala index c75b125122ad..ee5e3d35a5bf 100644 --- a/tests/patmat/i9489b.scala +++ b/tests/patmat/i9489b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def summonTypedType[T : Type](using Quotes): String = '{ ??? : T } match { case '{ $_ : Boolean } => "Boolean" diff --git a/tests/patmat/i9841.scala b/tests/patmat/i9841.scala index 928cacd999e8..31e5b89aeeb2 100644 --- a/tests/patmat/i9841.scala +++ b/tests/patmat/i9841.scala @@ -6,7 +6,7 @@ object Impl { } trait Impl[T <: Txn[T], K] { - import Impl._ + import Impl.* def put[A](): Unit = { val opt: Option[Entry[T, A]] = ??? diff --git a/tests/patmat/planets.scala b/tests/patmat/planets.scala index 2c4f31b17ca3..d6ee4b5d00ef 100644 --- a/tests/patmat/planets.scala +++ b/tests/patmat/planets.scala @@ -14,7 +14,7 @@ enum Planet(mass: Double, radius: Double) { } object Test { def main(args: Array[String]) = { - import Planet._ + import Planet.* assert(valueOf("SATURN") == SATURN) val earthWeight = 100 val mass = earthWeight/EARTH.surfaceGravity diff --git a/tests/patmat/sealed-java-enums.scala b/tests/patmat/sealed-java-enums.scala index 2daf93f3088d..33d6ea495907 100644 --- a/tests/patmat/sealed-java-enums.scala +++ b/tests/patmat/sealed-java-enums.scala @@ -1,5 +1,5 @@ import java.lang.Thread.State -import java.lang.Thread.State._ +import java.lang.Thread.State.* object Test { def f(state: State) = state match { diff --git a/tests/patmat/t11620b.scala b/tests/patmat/t11620b.scala index 40fb444b0499..a71f9ee4ade5 100644 --- a/tests/patmat/t11620b.scala +++ b/tests/patmat/t11620b.scala @@ -5,7 +5,7 @@ object Length { case object StateColumn extends Length } -import Length._ +import Length.* case class Indent[T <: Length](length: T) diff --git a/tests/patmat/t2442/t2442.scala b/tests/patmat/t2442/t2442.scala index b0a0f3cd4145..4350a489576e 100644 --- a/tests/patmat/t2442/t2442.scala +++ b/tests/patmat/t2442/t2442.scala @@ -1,5 +1,5 @@ class Test { - import MyEnum._ + import MyEnum.* def f(e: MyEnum) = e match { case ONE => println("one") @@ -7,7 +7,7 @@ class Test { // missing case --> exhaustivity warning! } - import MySecondEnum._ + import MySecondEnum.* def g(e: MySecondEnum) = e match { case RED => println("red") // missing case --> exhaustivity warning! diff --git a/tests/patmat/t4661.scala b/tests/patmat/t4661.scala index e87490457ddf..6e13298bef4f 100644 --- a/tests/patmat/t4661.scala +++ b/tests/patmat/t4661.scala @@ -20,7 +20,7 @@ trait Prefix { } class TestPrefix(val p: Prefix) { - import p._ + import p.* def test(b: Bar) = b match { case b: Bar => case b: BarOne => // unreachable diff --git a/tests/patmat/t4661b.scala b/tests/patmat/t4661b.scala index 84bb802036da..ee95ff08ca07 100644 --- a/tests/patmat/t4661b.scala +++ b/tests/patmat/t4661b.scala @@ -6,7 +6,7 @@ class C { } class Test(val c: C) { - import c._ + import c.* def test(f: Foo) = f match { // not exhaustive case f: One => case f: Two => diff --git a/tests/patmat/t6146.scala b/tests/patmat/t6146.scala index b5bde826b1c1..e2d1070110ec 100644 --- a/tests/patmat/t6146.scala +++ b/tests/patmat/t6146.scala @@ -15,7 +15,7 @@ trait AxisCompanion { } object Axis extends AxisCompanion class Axis { - import Axis._ + import Axis.* def test( f: Format ) = f match { case Format.Integer => "Int" // case Format.Time( hours, millis ) => "Time" @@ -47,7 +47,7 @@ object O1 extends T1[Any] { case object Shorty extends O1.O2.Format class Test1 { - import O1.O2._ + import O1.O2.* val FI: Format.Integer.type = Format.Integer def test( f: Format ) = { val ff: f.type = f diff --git a/tests/patmat/t6582_exhaust_big.scala b/tests/patmat/t6582_exhaust_big.scala index dd639eb56ee0..4c0b45b49f7a 100644 --- a/tests/patmat/t6582_exhaust_big.scala +++ b/tests/patmat/t6582_exhaust_big.scala @@ -23,7 +23,7 @@ object Z { } object Test { - import Z._ + import Z.* def foo(z: Z) = z match { case Z0 | Z1() | Z2 | Z3() | Z4 | Z5() | Z6 | Z7() | Z8 | Z9() | Z10 | Z12 | Z13() | Z14 | Z15() | Z16 | Z17() | Z18 | Z19() diff --git a/tests/patmat/t7285.scala b/tests/patmat/t7285.scala index d40df7fe8919..e79b8c334bd2 100644 --- a/tests/patmat/t7285.scala +++ b/tests/patmat/t7285.scala @@ -46,7 +46,7 @@ object Test4 { case object Up extends Base } - import Test4.Base._ + import Test4.Base.* def foo(d1: Base, d2: Base) = (d1, d2) match { case (Up, Up) | (Down, Down) => false diff --git a/tests/patmat/t7285a.scala b/tests/patmat/t7285a.scala index 49f6b663b28c..9cb33bf47ca2 100644 --- a/tests/patmat/t7285a.scala +++ b/tests/patmat/t7285a.scala @@ -73,7 +73,7 @@ object Test4 { } } - import Test4.Base._ + import Test4.Base.* def foo(d1: Base, d2: Base) = (d1, d2) match { case (Up, Up) | (Down, Down) => false diff --git a/tests/patmat/t9672.scala b/tests/patmat/t9672.scala index fe068f3d5e78..d29d270acddc 100644 --- a/tests/patmat/t9672.scala +++ b/tests/patmat/t9672.scala @@ -18,7 +18,7 @@ object SimpleExpr extends Hierarchy with If with Word with IntExpr //object OtherExpr extends Hierarchy with If with IntExpr object Demo extends App { - import SimpleExpr._ + import SimpleExpr.* def func(expr: Expr) = expr match { case If(cond, yes, no) => cond case Word(name) => name diff --git a/tests/pending/pos/cps-async-failure.scala b/tests/pending/pos/cps-async-failure.scala index 9f8da4c7f8b8..bf6a586123b2 100644 --- a/tests/pending/pos/cps-async-failure.scala +++ b/tests/pending/pos/cps-async-failure.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* trait App[F[_],CT]: this: Base[F,CT] => - import quotes.reflect._ + import quotes.reflect.* trait AA diff --git a/tests/pending/pos/overloaded_extractor_and_regular_def.scala b/tests/pending/pos/overloaded_extractor_and_regular_def.scala index 72b9f65d8480..fb11826528e3 100644 --- a/tests/pending/pos/overloaded_extractor_and_regular_def.scala +++ b/tests/pending/pos/overloaded_extractor_and_regular_def.scala @@ -24,7 +24,7 @@ class Universe extends TreesApi { object Test extends App { def foo(tapi: TreesApi): Unit = { - import tapi._ + import tapi.* def bar(tree: Tree): Unit = { val Apply(x) = tree } diff --git a/tests/pending/pos/t7232b/Test.scala b/tests/pending/pos/t7232b/Test.scala index 6377e26becc5..b1399c84e988 100644 --- a/tests/pending/pos/t7232b/Test.scala +++ b/tests/pending/pos/t7232b/Test.scala @@ -1,5 +1,5 @@ object Test { - import pack._ + import pack.* Foo.list().packList() } diff --git a/tests/pending/pos/t8146b.scala b/tests/pending/pos/t8146b.scala index 1a65ed518e4c..bc693ccfc7a2 100644 --- a/tests/pending/pos/t8146b.scala +++ b/tests/pending/pos/t8146b.scala @@ -42,7 +42,7 @@ object syntax { class HListBench { - import syntax._ + import syntax.* implicit def columnShape[T, Level <: ShapeLevel]: Shape[Level, Column[T], T, Column[T]] = ??? implicit def provenShape[T, P](implicit shape: Shape[_ <: FlatShapeLevel, T, _, P]): Shape[FlatShapeLevel, ProvenShape[T], T, P] = ??? diff --git a/tests/pending/run/concurrent-stream.scala b/tests/pending/run/concurrent-stream.scala index 8946a85fd182..bdf9b05861a4 100644 --- a/tests/pending/run/concurrent-stream.scala +++ b/tests/pending/run/concurrent-stream.scala @@ -17,7 +17,7 @@ object Test { } def testCons(cons: (Int, => Stream[Int]) => Stream[Int]): Unit = { - import scala.actors.Actor._ + import scala.actors.Actor.* val stream = slowRange(0, 10, cons) val main = self diff --git a/tests/pending/run/elidable-opt.scala b/tests/pending/run/elidable-opt.scala index 7f3b8011dbeb..62d19acc7dfe 100644 --- a/tests/pending/run/elidable-opt.scala +++ b/tests/pending/run/elidable-opt.scala @@ -1,5 +1,5 @@ -import annotation._ -import elidable._ +import annotation.* +import elidable.* trait T { @elidable(FINEST) def f1(): Unit diff --git a/tests/pending/run/elidable.scala b/tests/pending/run/elidable.scala index 7f3b8011dbeb..62d19acc7dfe 100644 --- a/tests/pending/run/elidable.scala +++ b/tests/pending/run/elidable.scala @@ -1,5 +1,5 @@ -import annotation._ -import elidable._ +import annotation.* +import elidable.* trait T { @elidable(FINEST) def f1(): Unit diff --git a/tests/pending/run/imain.scala b/tests/pending/run/imain.scala index cc939e39fd6d..ac8a44d87d75 100644 --- a/tests/pending/run/imain.scala +++ b/tests/pending/run/imain.scala @@ -1,6 +1,6 @@ object Test { - import scala.tools.nsc._ - import interpreter._ + import scala.tools.nsc.* + import interpreter.* import java.io.PrintWriter class NullOutputStream extends OutputStream { def write(b: Int): Unit = { } } diff --git a/tests/pending/run/partialfun.scala b/tests/pending/run/partialfun.scala index 68f8c8c92682..fcbcd2386f81 100644 --- a/tests/pending/run/partialfun.scala +++ b/tests/pending/run/partialfun.scala @@ -1,5 +1,5 @@ -import collection._ -import collection.generic._ +import collection.* +import collection.generic.* object Test { def collectIDA[A, B, Repr, That](_this: TraversableLike[A, Repr])(pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = { diff --git a/tests/pending/run/patmat-behavior.scala b/tests/pending/run/patmat-behavior.scala index 0129a23e10a9..35df7d31230d 100644 --- a/tests/pending/run/patmat-behavior.scala +++ b/tests/pending/run/patmat-behavior.scala @@ -29,7 +29,7 @@ package s { object G11 { def unapplySeq[A](x: C11[A]): Option[(A, Seq[A])] = ??? } object G21 { def unapplySeq[A](x: C21[A]): Option[(A, A, Seq[A])] = ??? } } -import s._ +import s.* package pos { object Test { diff --git a/tests/pending/run/patmat-exprs.scala b/tests/pending/run/patmat-exprs.scala index 78e1811169bc..daebb1a1513e 100644 --- a/tests/pending/run/patmat-exprs.scala +++ b/tests/pending/run/patmat-exprs.scala @@ -1,10 +1,10 @@ -import scala.language.{ implicitConversions } +import scala.language.implicitConversions import runtime.ScalaRunTime object Test { val p = new Pattern { } - import p._ + import p.* implicit object IntOps extends NumericOps[Int] { def zero = 0 def one = 1 @@ -108,7 +108,7 @@ trait Pattern { trait Expr[T] { - import Expr._ + import Expr.* /** Evaluates value of the expression. */ def eval(context: Any => Any): T diff --git a/tests/pending/run/patmatnew.scala b/tests/pending/run/patmatnew.scala index 218e60671199..d81f8698258e 100644 --- a/tests/pending/run/patmatnew.scala +++ b/tests/pending/run/patmatnew.scala @@ -1,5 +1,5 @@ -import scala.language.{ postfixOps } +import scala.language.postfixOps object Test { diff --git a/tests/pending/run/pf-catch.scala b/tests/pending/run/pf-catch.scala index 4f515357242c..8eccfeb5ea25 100644 --- a/tests/pending/run/pf-catch.scala +++ b/tests/pending/run/pf-catch.scala @@ -1,5 +1,5 @@ -import scala.language.{ postfixOps } +import scala.language.postfixOps object Test { def shortName(x: AnyRef) = x.getClass.getName split '.' last type Handler[+T] = PartialFunction[Throwable, T] diff --git a/tests/pending/run/private-inline.scala b/tests/pending/run/private-inline.scala index 60fef9efca30..b2cec09355e4 100644 --- a/tests/pending/run/private-inline.scala +++ b/tests/pending/run/private-inline.scala @@ -34,7 +34,7 @@ object Test { def main(args: Array[String]): Unit = { val a = new A - import a._ + import a.* println(f1a() + f1b() + f2a() + f2b()) // Don't know how else to test this: all these should have been diff --git a/tests/pending/run/reflection-names.scala b/tests/pending/run/reflection-names.scala index a297b85825b5..dd145653adef 100644 --- a/tests/pending/run/reflection-names.scala +++ b/tests/pending/run/reflection-names.scala @@ -1,8 +1,8 @@ -import scala.tools.nsc._ +import scala.tools.nsc.* object Test { val global = new Global(new Settings()) - import global._ + import global.* val x1 = "abc" drop 1 // "bc": String val x2 = TermName("abc") drop 1 // "bc": TermName diff --git a/tests/pending/run/sequenceComparisons.scala b/tests/pending/run/sequenceComparisons.scala index b0564aad4d2c..14eceaf18b9e 100644 --- a/tests/pending/run/sequenceComparisons.scala +++ b/tests/pending/run/sequenceComparisons.scala @@ -100,7 +100,7 @@ object Test { def runSeqs() = { for (s1f <- seqMakers ; s2f <- seqMakers ; testData <- List(test1)) { - import testData._ + import testData.* val scrut = s1f(seq) for (Method(f, (trueList, falseList), descr) <- methodList) { diff --git a/tests/pending/run/settings-parse.scala b/tests/pending/run/settings-parse.scala index 2754feb97208..b35ddf1a3d89 100644 --- a/tests/pending/run/settings-parse.scala +++ b/tests/pending/run/settings-parse.scala @@ -1,6 +1,6 @@ import scala.language.postfixOps -import scala.tools.nsc._ +import scala.tools.nsc.* object Test { val tokens = List("", "-deprecation", "foo.scala") diff --git a/tests/pending/run/synchronized.scala b/tests/pending/run/synchronized.scala index d5f6d8651087..af8fda306ddb 100644 --- a/tests/pending/run/synchronized.scala +++ b/tests/pending/run/synchronized.scala @@ -20,7 +20,7 @@ object Util { } class C1 { - import Util._ + import Util.* val lock = new AnyRef @@ -108,7 +108,7 @@ class C1 { } object O1 { - import Util._ + import Util.* val lock = new AnyRef @@ -196,7 +196,7 @@ object O1 { } trait T { - import Util._ + import Util.* val Tclass = Class.forName("T$class") diff --git a/tests/pending/run/t1195-old.scala b/tests/pending/run/t1195-old.scala index f80734c22868..ce9d132d425e 100644 --- a/tests/pending/run/t1195-old.scala +++ b/tests/pending/run/t1195-old.scala @@ -1,5 +1,5 @@ -import scala.language.{ existentials } +import scala.language.existentials object Test { def f() = { case class Bar(x: Int); Bar } diff --git a/tests/pending/run/t1427.scala b/tests/pending/run/t1427.scala index 4784fad8ba52..f6c7914acae7 100644 --- a/tests/pending/run/t1427.scala +++ b/tests/pending/run/t1427.scala @@ -1,5 +1,5 @@ -import scala.language.{ higherKinds } +import scala.language.higherKinds class Bob[K[_]] { def foo(other: Any) = other match { diff --git a/tests/pending/run/t1500.scala b/tests/pending/run/t1500.scala index 743a9216727c..3af1bb5daf13 100644 --- a/tests/pending/run/t1500.scala +++ b/tests/pending/run/t1500.scala @@ -1,30 +1,30 @@ -import scala.tools.nsc._ +import scala.tools.nsc.* object Test { - + /** * Type inference overlooks constraints posed by type parameters in annotations on types. */ - + val testCode = """ - + class posingAs[A] extends annotation.TypeConstraint - + def resolve[A,B](x: A @posingAs[B]): B = x.asInstanceOf[B] - + val x = resolve(7: @posingAs[Any]) - + """ - + def main(args: Array[String]): Unit = { - + val settings = new Settings() settings.classpath.value = System.getProperty("java.class.path") val tool = new interpreter.IMain(settings) val global = tool.global - import global._ - import definitions._ + import global.* + import definitions.* object checker extends AnnotationChecker { @@ -35,11 +35,11 @@ object Test { } } - + global.addAnnotationChecker(checker) - + tool.interpret(testCode) - + } } diff --git a/tests/pending/run/t1501.scala b/tests/pending/run/t1501.scala index 7a9a695d883d..c91f9467259c 100644 --- a/tests/pending/run/t1501.scala +++ b/tests/pending/run/t1501.scala @@ -1,15 +1,15 @@ -import scala.tools.nsc._ +import scala.tools.nsc._ object Test { - + /** * ... */ - + val testCode = """ - + class xyz[A] extends annotation.TypeConstraint - + def loopWhile[T](cond: =>Boolean)(body: =>(Unit @xyz[T])): Unit @ xyz[T] = {{ if (cond) {{ body @@ -24,17 +24,17 @@ object Test { (): @xyz[Int] }} }} - + """ - + def main(args: Array[String]): Unit = { val settings = new Settings() settings.classpath.value = System.getProperty("java.class.path") val tool = new interpreter.IMain(settings) val global = tool.global - import global._ - import definitions._ + import global.* + import definitions.* object checker extends AnnotationChecker { @@ -45,11 +45,11 @@ object Test { } } - + global.addAnnotationChecker(checker) - + tool.interpret(testCode) - + } } diff --git a/tests/pending/run/t3346e.scala b/tests/pending/run/t3346e.scala index e74f29f8935d..c7646d6837fd 100644 --- a/tests/pending/run/t3346e.scala +++ b/tests/pending/run/t3346e.scala @@ -16,7 +16,7 @@ class QuickSort[Coll](a: Coll) { def quickSortAnything[T](implicit ev0: Coll => TraversableLike[T, Coll], cbf: CanBuildFrom[Coll, T, Coll], n: Ordering[T]): Coll = { - import n._ + import n.* if (a.size < 2) { a } else { @@ -55,7 +55,7 @@ object MyEnhancements { object Test extends App { - import MyEnhancements._ + import MyEnhancements.* println("qwe".quickSort) println(Array(2, 0).quickSort.toList) diff --git a/tests/pending/run/t4426.scala b/tests/pending/run/t4426.scala index 1cbd42da252d..1f6a6afc759d 100644 --- a/tests/pending/run/t4426.scala +++ b/tests/pending/run/t4426.scala @@ -1,4 +1,4 @@ -import scala.tools.nsc._ +import scala.tools.nsc.* object Test { val x = { diff --git a/tests/pending/run/t4461.scala b/tests/pending/run/t4461.scala index 0fd82265bb6e..fbe4fe2ffb26 100644 --- a/tests/pending/run/t4461.scala +++ b/tests/pending/run/t4461.scala @@ -1,5 +1,5 @@ -import scala.collection.mutable._ -import scala.collection.script._ +import scala.collection.mutable.* +import scala.collection.script.* // #4461 diff --git a/tests/pending/run/t5018.scala b/tests/pending/run/t5018.scala index 147d69cf867a..49dbeb32ef65 100644 --- a/tests/pending/run/t5018.scala +++ b/tests/pending/run/t5018.scala @@ -1,8 +1,8 @@ -import java.io._ -import collection._ +import java.io.* +import collection.* diff --git a/tests/pending/run/t5134.scala b/tests/pending/run/t5134.scala index 384442fda289..2bfd4969f0c6 100644 --- a/tests/pending/run/t5134.scala +++ b/tests/pending/run/t5134.scala @@ -1,4 +1,4 @@ -import language._ +import language.* object Test extends App { def b = new AnyRef { diff --git a/tests/pending/run/t5500.scala b/tests/pending/run/t5500.scala index 881a83ca9bd7..c15c216fc485 100644 --- a/tests/pending/run/t5500.scala +++ b/tests/pending/run/t5500.scala @@ -1,4 +1,4 @@ -import scala.{specialized => spec} +import scala.{specialized as spec} class C1[@spec(Int, AnyRef) A, @spec(Int, AnyRef) B](v:A, w:B) diff --git a/tests/pending/run/t5500b.scala b/tests/pending/run/t5500b.scala index 0d8edc094775..16f360d2b1d1 100644 --- a/tests/pending/run/t5500b.scala +++ b/tests/pending/run/t5500b.scala @@ -1,4 +1,4 @@ -import scala.{specialized => spec} +import scala.{specialized as spec} class C1A[ @spec(Double, Int, AnyRef) A, diff --git a/tests/pending/run/t6308.scala b/tests/pending/run/t6308.scala index 62983abe57f9..f03ccd8ea4e4 100644 --- a/tests/pending/run/t6308.scala +++ b/tests/pending/run/t6308.scala @@ -1,4 +1,4 @@ -import scala.{specialized => sp} +import scala.{specialized as sp} // NOTE: `{ val c = caller; print(""); c }` is used instead of a simple `caller`, // because we want to prevent tail-call optimization from eliding the stack- diff --git a/tests/pending/run/t6327.scala b/tests/pending/run/t6327.scala index 7683101f1424..e5fabb613aeb 100644 --- a/tests/pending/run/t6327.scala +++ b/tests/pending/run/t6327.scala @@ -1,4 +1,4 @@ -import language._ +import language.* object Test extends App { diff --git a/tests/pending/run/t657.scala b/tests/pending/run/t657.scala index ea2b008b3831..f936f6350431 100644 --- a/tests/pending/run/t657.scala +++ b/tests/pending/run/t657.scala @@ -1,5 +1,5 @@ -import scala.language.{ implicitConversions } +import scala.language.implicitConversions abstract class BaseList { type Node <: NodeImpl; implicit def convertNode(ni : NodeImpl): BaseList.this.Node = ni.asInstanceOf[Node]; diff --git a/tests/pending/run/t6935.scala b/tests/pending/run/t6935.scala index fdaf02e5ce3b..6a5a1971f667 100644 --- a/tests/pending/run/t6935.scala +++ b/tests/pending/run/t6935.scala @@ -1,7 +1,7 @@ object Test { def main(args: Array[String]): Unit = { - import java.io._ + import java.io.* val bytes = new ByteArrayOutputStream() val out = new ObjectOutputStream(bytes) out.writeObject(()) diff --git a/tests/pending/run/t7700.scala b/tests/pending/run/t7700.scala index 76d16b808c52..06340a738b4e 100644 --- a/tests/pending/run/t7700.scala +++ b/tests/pending/run/t7700.scala @@ -1,4 +1,4 @@ -import scala.annotation._ +import scala.annotation.* trait C[@specialized U] { @unspecialized diff --git a/tests/pending/run/t7715.scala b/tests/pending/run/t7715.scala index 0ad39130163e..6c39786725c8 100644 --- a/tests/pending/run/t7715.scala +++ b/tests/pending/run/t7715.scala @@ -1,6 +1,6 @@ import PartialFunction.cond -import util._ +import util.* object Test extends App { diff --git a/tests/pending/run/tasty-comments/quoted_1.scala b/tests/pending/run/tasty-comments/quoted_1.scala index 60de1ef1c2d5..7501fe0d3cec 100644 --- a/tests/pending/run/tasty-comments/quoted_1.scala +++ b/tests/pending/run/tasty-comments/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -7,7 +7,7 @@ object Macros { ${ impl('t) } def impl[T](x: Expr[T])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = x.asTerm tree.symbol.comment.map(_.raw) match { diff --git a/tests/pending/run/tasty-comments/quoted_2.scala b/tests/pending/run/tasty-comments/quoted_2.scala index e426a5f4cd22..66b757033937 100644 --- a/tests/pending/run/tasty-comments/quoted_2.scala +++ b/tests/pending/run/tasty-comments/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/pending/run/treePrint.scala b/tests/pending/run/treePrint.scala index 8bbf645faebb..eef4f59a5a79 100644 --- a/tests/pending/run/treePrint.scala +++ b/tests/pending/run/treePrint.scala @@ -1,8 +1,8 @@ /** Testing compact tree printers. */ object Test { - import scala.tools.nsc._ - import interpreter._ + import scala.tools.nsc.* + import interpreter.* import java.io.{ OutputStream, BufferedReader, StringReader, PrintWriter, Writer, OutputStreamWriter} val code = """ diff --git a/tests/plugins/custom/analyzer/Analyzer_1.scala b/tests/plugins/custom/analyzer/Analyzer_1.scala index 8c7cea47f0f6..1a42119f8878 100644 --- a/tests/plugins/custom/analyzer/Analyzer_1.scala +++ b/tests/plugins/custom/analyzer/Analyzer_1.scala @@ -8,21 +8,21 @@ package analyzer import scala.language.implicitConversions -import dotty.tools.dotc._ -import core._ +import dotty.tools.dotc.* +import core.* import Contexts.Context -import plugins._ +import plugins.* import Phases.Phase import ast.tpd import transform.MegaPhase.MiniPhase -import Decorators._ +import Decorators.* import Symbols.{Symbol, requiredPackage} import Constants.Constant -import Types._ +import Types.* import transform.{PickleQuotes, FirstTransform} class SetDefTree extends PluginPhase { - import tpd._ + import tpd.* override val phaseName: String = SetDefTree.name override def runsAfter: Set[String] = Set(PickleQuotes.name) @@ -42,7 +42,7 @@ object SetDefTree { } class InitChecker extends PluginPhase with StandardPlugin { - import tpd._ + import tpd.* val name: String = "initChecker" override val description: String = "checks that under -Yretain-trees we may get tree for all symbols" diff --git a/tests/plugins/custom/analyzer/Hello_3.scala b/tests/plugins/custom/analyzer/Hello_3.scala index 9585a8fbe7e7..1d9db0dcad1b 100644 --- a/tests/plugins/custom/analyzer/Hello_3.scala +++ b/tests/plugins/custom/analyzer/Hello_3.scala @@ -1,6 +1,6 @@ package hello -import lib._ +import lib.* case class Student(name: String) diff --git a/tests/plugins/neg/divideZero-research/plugin_1.scala b/tests/plugins/neg/divideZero-research/plugin_1.scala index 411d01e7d26b..20dfa536b2a3 100644 --- a/tests/plugins/neg/divideZero-research/plugin_1.scala +++ b/tests/plugins/neg/divideZero-research/plugin_1.scala @@ -1,14 +1,14 @@ -import dotty.tools.dotc._ -import core._ +import dotty.tools.dotc.* +import core.* import Contexts.Context -import plugins._ +import plugins.* import Phases.Phase import ast.tpd import transform.MegaPhase.MiniPhase -import Decorators._ +import Decorators.* import Symbols.{Symbol, requiredClass} import Constants.Constant -import StdNames._ +import StdNames.* class DivideZero extends MiniPhase with ResearchPlugin { val name: String = "divideZero" diff --git a/tests/plugins/neg/divideZero/plugin_1.scala b/tests/plugins/neg/divideZero/plugin_1.scala index 0ca48c3e4a32..ef8e077fd14d 100644 --- a/tests/plugins/neg/divideZero/plugin_1.scala +++ b/tests/plugins/neg/divideZero/plugin_1.scala @@ -1,15 +1,15 @@ -import dotty.tools.dotc._ -import core._ +import dotty.tools.dotc.* +import core.* import Contexts.Context -import plugins._ +import plugins.* import Phases.Phase import ast.tpd import transform.MegaPhase.MiniPhase -import Decorators._ +import Decorators.* import Symbols.{Symbol, requiredClass} import Constants.Constant import transform.{Pickler, PickleQuotes} -import StdNames._ +import StdNames.* class DivideZero extends PluginPhase with StandardPlugin { val name: String = "divideZero" diff --git a/tests/pos-custom-args/erased/i7868.scala b/tests/pos-custom-args/erased/i7868.scala index 2753cf444af4..c8034adf993d 100644 --- a/tests/pos-custom-args/erased/i7868.scala +++ b/tests/pos-custom-args/erased/i7868.scala @@ -1,5 +1,5 @@ import language.experimental.namedTypeArguments -import scala.compiletime._ +import scala.compiletime.* final case class Coproduct[+Set, +Value, Index <: Int](value: Value & Set, index: Index) @@ -33,7 +33,7 @@ object Coproduct { } object Test extends App { - import Coproduct._ + import Coproduct.* // Error: No singleton value available for scala.compiletime.S[scala.compiletime.S[(0 : Int)]]. val c = from[Set = Int +: String +: Seq[Double] +: Nothing](Nil) diff --git a/tests/pos-custom-args/erased/i7878.scala b/tests/pos-custom-args/erased/i7878.scala index d47bb32f1a65..8504af0f1021 100644 --- a/tests/pos-custom-args/erased/i7878.scala +++ b/tests/pos-custom-args/erased/i7878.scala @@ -1,5 +1,5 @@ object Boom { - import scala.compiletime._ + import scala.compiletime.* trait Fail[A <: Int, B <: Int] erased inline given fail[X <: Int, Y <: Int]: Fail[X, Y] = { diff --git a/tests/pos-custom-args/i5498-postfixOps.scala b/tests/pos-custom-args/i5498-postfixOps.scala index bfde706b963b..1dd55274fec6 100644 --- a/tests/pos-custom-args/i5498-postfixOps.scala +++ b/tests/pos-custom-args/i5498-postfixOps.scala @@ -1,4 +1,4 @@ -import scala.concurrent.duration._ +import scala.concurrent.duration.* import scala.language.postfixOps diff --git a/tests/pos-custom-args/matchtype.scala b/tests/pos-custom-args/matchtype.scala index 16f284d3b434..746301622864 100644 --- a/tests/pos-custom-args/matchtype.scala +++ b/tests/pos-custom-args/matchtype.scala @@ -1,4 +1,4 @@ -import compiletime._ +import compiletime.* object Test { type T[X] = X match { case String => Int diff --git a/tests/pos-custom-args/phantom-Eq.scala b/tests/pos-custom-args/phantom-Eq.scala index beb6397d0ad7..3bd16323524f 100644 --- a/tests/pos-custom-args/phantom-Eq.scala +++ b/tests/pos-custom-args/phantom-Eq.scala @@ -1,5 +1,5 @@ object PhantomEq { - import EqUtil._ + import EqUtil.* "ghi" === "jkl" 3 === 4 diff --git a/tests/pos-custom-args/phantom-Eq2/Phantom-Eq_2.scala b/tests/pos-custom-args/phantom-Eq2/Phantom-Eq_2.scala index c3f3254f6144..87c6cc2275f1 100644 --- a/tests/pos-custom-args/phantom-Eq2/Phantom-Eq_2.scala +++ b/tests/pos-custom-args/phantom-Eq2/Phantom-Eq_2.scala @@ -1,7 +1,7 @@ /* This is a version of ../pos/phantom.scala that tests phantom clases with separate compilation */ object PhantomEq { - import EqUtil._ + import EqUtil.* "ghi" === "jkl" 3 === 4 diff --git a/tests/pos-custom-args/phantom-Evidence.scala b/tests/pos-custom-args/phantom-Evidence.scala index 4c416a7aa237..414f96f3ef33 100644 --- a/tests/pos-custom-args/phantom-Evidence.scala +++ b/tests/pos-custom-args/phantom-Evidence.scala @@ -1,6 +1,6 @@ /** In this implementation variant of =:= (called =::=) we erase all instantiations and definitions of =::= */ object WithNormalState { - import Utils._ + import Utils.* trait State sealed trait On extends State diff --git a/tests/pos-custom-args/semanticdb/inline-unapply/Macro_1.scala b/tests/pos-custom-args/semanticdb/inline-unapply/Macro_1.scala index dc431c14ef14..0c15284141cb 100644 --- a/tests/pos-custom-args/semanticdb/inline-unapply/Macro_1.scala +++ b/tests/pos-custom-args/semanticdb/inline-unapply/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Succ: diff --git a/tests/pos-custom-args/semanticdb/macro-pos/example_1.scala b/tests/pos-custom-args/semanticdb/macro-pos/example_1.scala index f7750d9f0795..08e57680c74d 100644 --- a/tests/pos-custom-args/semanticdb/macro-pos/example_1.scala +++ b/tests/pos-custom-args/semanticdb/macro-pos/example_1.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* object CodeImpl { def codeExpr(using Quotes): Expr[String] = '{""} diff --git a/tests/pos-custom-args/semanticdb/macro-pos/example_2.scala b/tests/pos-custom-args/semanticdb/macro-pos/example_2.scala index 2273d60a54d4..0e11dae6718d 100644 --- a/tests/pos-custom-args/semanticdb/macro-pos/example_2.scala +++ b/tests/pos-custom-args/semanticdb/macro-pos/example_2.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* object TestImpl { transparent inline def fun (inline arg: String): String = diff --git a/tests/pos-deep-subtype/inductive-implicits-bench.scala b/tests/pos-deep-subtype/inductive-implicits-bench.scala index 0df40e8cc286..aff8bffd8024 100644 --- a/tests/pos-deep-subtype/inductive-implicits-bench.scala +++ b/tests/pos-deep-subtype/inductive-implicits-bench.scala @@ -54,7 +54,7 @@ package shapeless { } } -import shapeless._ +import shapeless.* object Test extends App { val sel = Selector[L, Boolean] diff --git a/tests/pos-java-interop-separate/i8588/Test_2.scala b/tests/pos-java-interop-separate/i8588/Test_2.scala index 28efb9ef38b6..3174c6487b8f 100644 --- a/tests/pos-java-interop-separate/i8588/Test_2.scala +++ b/tests/pos-java-interop-separate/i8588/Test_2.scala @@ -1,4 +1,4 @@ -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* object Test { ConfigFactory_1.parseMap(Map("a" -> 1).asJava) ConfigFactory_1.parseMap(Map("a" -> "", "b" -> true).asJava) diff --git a/tests/pos-java-interop/t2377/a.scala b/tests/pos-java-interop/t2377/a.scala index bda59ce0dba5..c45086686103 100644 --- a/tests/pos-java-interop/t2377/a.scala +++ b/tests/pos-java-interop/t2377/a.scala @@ -1,4 +1,4 @@ -import Q._ +import Q.* class Bop(var workUnit: WorkUnit) { def addStages(stageBuilder: Stage.Builder): Unit = { diff --git a/tests/pos-macros/asExprOf.scala b/tests/pos-macros/asExprOf.scala index dd0c4e57a2d0..5d0be15227a0 100644 --- a/tests/pos-macros/asExprOf.scala +++ b/tests/pos-macros/asExprOf.scala @@ -1,7 +1,7 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes)(x: Expr[_]) = { - import quotes.reflect._ + import quotes.reflect.* x.asTerm.asExprOf[Any] } diff --git a/tests/pos-macros/f64Pow5Split/Macro.scala b/tests/pos-macros/f64Pow5Split/Macro.scala index 0e9fd5e84616..22b2525f36fd 100644 --- a/tests/pos-macros/f64Pow5Split/Macro.scala +++ b/tests/pos-macros/f64Pow5Split/Macro.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/pos-macros/i10050.scala b/tests/pos-macros/i10050.scala index 5a80ce7aa7cf..218200f9781e 100644 --- a/tests/pos-macros/i10050.scala +++ b/tests/pos-macros/i10050.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test[T: Type](x: Expr[Any])(using Quotes): Unit = diff --git a/tests/pos-macros/i10107b/Macro_1.scala b/tests/pos-macros/i10107b/Macro_1.scala index 6fecabf4d1a6..aa9fc8dc8aae 100644 --- a/tests/pos-macros/i10107b/Macro_1.scala +++ b/tests/pos-macros/i10107b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def isTrue: Boolean = ${ isTrueImpl } def isTrueImpl(using Quotes) = { diff --git a/tests/pos-macros/i10127.scala b/tests/pos-macros/i10127.scala index ccd710728d21..13551d697c34 100644 --- a/tests/pos-macros/i10127.scala +++ b/tests/pos-macros/i10127.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object T { def impl[A](using Type[A])(using Quotes): Expr[Unit] = { diff --git a/tests/pos-macros/i10151/Macro_1.scala b/tests/pos-macros/i10151/Macro_1.scala index f5170c83da12..c7a2b9a301c2 100644 --- a/tests/pos-macros/i10151/Macro_1.scala +++ b/tests/pos-macros/i10151/Macro_1.scala @@ -1,6 +1,6 @@ package x -import scala.quoted._ +import scala.quoted.* trait CB[T]: def map[S](f: T=>S): CB[S] = ??? @@ -22,7 +22,7 @@ object X: } def processImpl[T:Type](f:Expr[T])(using Quotes):Expr[CB[T]] = - import quotes.reflect._ + import quotes.reflect.* def transform(term:Term):Term = term match diff --git a/tests/pos-macros/i10211/Macro_1.scala b/tests/pos-macros/i10211/Macro_1.scala index ebf9b76ff77e..ecca6c9dbbec 100644 --- a/tests/pos-macros/i10211/Macro_1.scala +++ b/tests/pos-macros/i10211/Macro_1.scala @@ -1,6 +1,6 @@ package x -import scala.quoted._ +import scala.quoted.* trait CB[T]: def map[S](f: T=>S): CB[S] = ??? @@ -36,7 +36,7 @@ object X: } def processImpl[T:Type](f:Expr[T])(using Quotes):Expr[CB[T]] = - import quotes.reflect._ + import quotes.reflect.* def transform(term:Term):Term = term match diff --git a/tests/pos-macros/i10573/Macro_1.scala b/tests/pos-macros/i10573/Macro_1.scala index 7c49a8e5ca13..86b1fb5c3881 100644 --- a/tests/pos-macros/i10573/Macro_1.scala +++ b/tests/pos-macros/i10573/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait A { def foo: Int } diff --git a/tests/pos-macros/i10771/MacroA_1.scala b/tests/pos-macros/i10771/MacroA_1.scala index 88da14fe31ac..7d1ff0880e8e 100644 --- a/tests/pos-macros/i10771/MacroA_1.scala +++ b/tests/pos-macros/i10771/MacroA_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class MyQuoted(val ast: String, runtimeQuotes: List[String]) diff --git a/tests/pos-macros/i10771/MacroB_1.scala b/tests/pos-macros/i10771/MacroB_1.scala index e9bfe73fb1a2..b9bb934c5187 100644 --- a/tests/pos-macros/i10771/MacroB_1.scala +++ b/tests/pos-macros/i10771/MacroB_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PullAst: def applyImpl(quoted: Expr[MyQuoted])(using qctx: Quotes): Expr[String] = diff --git a/tests/pos-macros/i10910/Macro_1.scala b/tests/pos-macros/i10910/Macro_1.scala index ae5643b1a9ea..a2378b70ac7d 100644 --- a/tests/pos-macros/i10910/Macro_1.scala +++ b/tests/pos-macros/i10910/Macro_1.scala @@ -1,6 +1,6 @@ package x -import scala.quoted._ +import scala.quoted.* trait CB[T]: def map[S](f: T=>S): CB[S] = ??? @@ -17,7 +17,7 @@ object X: } def processImpl[T:Type](f:Expr[T])(using qctx: Quotes):Expr[CB[T]] = - import quotes.reflect._ + import quotes.reflect.* def transform(term:Term): Either[Term, Term] = term match diff --git a/tests/pos-macros/i10910/Test_2.scala b/tests/pos-macros/i10910/Test_2.scala index 056e496ace3f..0016e931f27c 100644 --- a/tests/pos-macros/i10910/Test_2.scala +++ b/tests/pos-macros/i10910/Test_2.scala @@ -1,4 +1,4 @@ -import x._ +import x.* class Writer[A] { diff --git a/tests/pos-macros/i3898/quoted_1.scala b/tests/pos-macros/i3898/quoted_1.scala index 2b8870420795..464083c997d5 100644 --- a/tests/pos-macros/i3898/quoted_1.scala +++ b/tests/pos-macros/i3898/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def ff(args: Any*): String = ${impl('args)} def impl(args: Expr[Seq[Any]])(using Quotes): Expr[String] = '{""} diff --git a/tests/pos-macros/i3898b/quoted_1.scala b/tests/pos-macros/i3898b/quoted_1.scala index 78d88158c05c..df7946f6b8bf 100644 --- a/tests/pos-macros/i3898b/quoted_1.scala +++ b/tests/pos-macros/i3898b/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def ff(x: Int, inline y: Int): String = ${impl('x)} def impl(x: Expr[Int])(using Quotes): Expr[String] = '{""} diff --git a/tests/pos-macros/i3912-1/i3912_1.scala b/tests/pos-macros/i3912-1/i3912_1.scala index 949c4fb6fc8b..fede57b62b0b 100644 --- a/tests/pos-macros/i3912-1/i3912_1.scala +++ b/tests/pos-macros/i3912-1/i3912_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def foo(): Int = { ${ impl() } } diff --git a/tests/pos-macros/i3912-1/i3912_2.scala b/tests/pos-macros/i3912-1/i3912_2.scala index d933fef2935c..00125c49be99 100644 --- a/tests/pos-macros/i3912-1/i3912_2.scala +++ b/tests/pos-macros/i3912-1/i3912_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* class Test { val a: Unit = foo() diff --git a/tests/pos-macros/i3912-2/i3912_1.scala b/tests/pos-macros/i3912-2/i3912_1.scala index 7c8e6af936d3..aaf232ea05a4 100644 --- a/tests/pos-macros/i3912-2/i3912_1.scala +++ b/tests/pos-macros/i3912-2/i3912_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def foo2(): Unit = ${ impl() } diff --git a/tests/pos-macros/i3912-2/i3912_2.scala b/tests/pos-macros/i3912-2/i3912_2.scala index 8530ba3ffe62..dda259b399ee 100644 --- a/tests/pos-macros/i3912-2/i3912_2.scala +++ b/tests/pos-macros/i3912-2/i3912_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* class Test { val a2: Unit = foo2() diff --git a/tests/pos-macros/i3912-3/i3912_1.scala b/tests/pos-macros/i3912-3/i3912_1.scala index 5af4c931b05a..eb29e6090d7c 100644 --- a/tests/pos-macros/i3912-3/i3912_1.scala +++ b/tests/pos-macros/i3912-3/i3912_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def foo3(): Int = { diff --git a/tests/pos-macros/i3912-3/i3912_2.scala b/tests/pos-macros/i3912-3/i3912_2.scala index a029cdff8165..06c2e0628b5f 100644 --- a/tests/pos-macros/i3912-3/i3912_2.scala +++ b/tests/pos-macros/i3912-3/i3912_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* class Test { val a3: Unit = foo3() diff --git a/tests/pos-macros/i4023/Macro_1.scala b/tests/pos-macros/i4023/Macro_1.scala index 34551e3123fc..6b04716a6402 100644 --- a/tests/pos-macros/i4023/Macro_1.scala +++ b/tests/pos-macros/i4023/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def ff[T: Type](x: T): T = ${ impl('x) } def impl[T](x: Expr[T]): Expr[T] = x diff --git a/tests/pos-macros/i4023b/Macro_1.scala b/tests/pos-macros/i4023b/Macro_1.scala index 223758cf393d..b2c51eb82107 100644 --- a/tests/pos-macros/i4023b/Macro_1.scala +++ b/tests/pos-macros/i4023b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def ff[T](implicit t: Type[T]): Int = ${ impl[T] } def impl[T](using Quotes): Expr[Int] = '{4} diff --git a/tests/pos-macros/i4023c/Macro_1.scala b/tests/pos-macros/i4023c/Macro_1.scala index 31bdc14379ad..d8c08cd853ce 100644 --- a/tests/pos-macros/i4023c/Macro_1.scala +++ b/tests/pos-macros/i4023c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def ff[T](x: T): T = ${ impl('x) } def impl[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = '{ $x: T } diff --git a/tests/pos-macros/i4350.scala b/tests/pos-macros/i4350.scala index f8a642de360d..4b733d4e7835 100644 --- a/tests/pos-macros/i4350.scala +++ b/tests/pos-macros/i4350.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo[T: Type](using Quotes) { '{null.asInstanceOf[T]} diff --git a/tests/pos-macros/i4380a.scala b/tests/pos-macros/i4380a.scala index ed015ef4b13c..74195faf8dab 100644 --- a/tests/pos-macros/i4380a.scala +++ b/tests/pos-macros/i4380a.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/pos-macros/i4380b.scala b/tests/pos-macros/i4380b.scala index f24b17a558b7..dba65da6c0d3 100644 --- a/tests/pos-macros/i4380b.scala +++ b/tests/pos-macros/i4380b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test(using Quotes) { def step(k: (String => Expr[Unit])): Expr[Unit] = '{} diff --git a/tests/pos-macros/i4396a.scala b/tests/pos-macros/i4396a.scala index 8a8e0190a6bf..20575a0c8ad4 100644 --- a/tests/pos-macros/i4396a.scala +++ b/tests/pos-macros/i4396a.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { '{ Option(4) match { case Some(a) => a; case None => 1 }} } diff --git a/tests/pos-macros/i4414.scala b/tests/pos-macros/i4414.scala index b0e3b06d9460..58ca5f7c3389 100644 --- a/tests/pos-macros/i4414.scala +++ b/tests/pos-macros/i4414.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { given Quotes = ??? diff --git a/tests/pos-macros/i4514.scala b/tests/pos-macros/i4514.scala index e13e47a407f4..e4dfd7050eac 100644 --- a/tests/pos-macros/i4514.scala +++ b/tests/pos-macros/i4514.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def foo[X](x: X): Unit = ${fooImpl('x)} def fooImpl[X: Type](x: X)(using Quotes): Expr[Unit] = '{} diff --git a/tests/pos-macros/i4539.scala b/tests/pos-macros/i4539.scala index a1a6bf98359d..2f17ecec19da 100644 --- a/tests/pos-macros/i4539.scala +++ b/tests/pos-macros/i4539.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { val q = Type.of[String] Type.of[String] diff --git a/tests/pos-macros/i4539b.scala b/tests/pos-macros/i4539b.scala index 8cf1b40352ab..1d3245b05e84 100644 --- a/tests/pos-macros/i4539b.scala +++ b/tests/pos-macros/i4539b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes): Unit = { def f = { { diff --git a/tests/pos-macros/i4734/Macro_1.scala b/tests/pos-macros/i4734/Macro_1.scala index aff918025a77..513c6a9e59b5 100644 --- a/tests/pos-macros/i4734/Macro_1.scala +++ b/tests/pos-macros/i4734/Macro_1.scala @@ -1,5 +1,5 @@ import scala.annotation.tailrec -import scala.quoted._ +import scala.quoted.* object Macros { inline def unrolledForeach(f: Int => Int): Int = diff --git a/tests/pos-macros/i4734/Test_2.scala b/tests/pos-macros/i4734/Test_2.scala index 4ee69acc363f..4097f9f6c8a5 100644 --- a/tests/pos-macros/i4734/Test_2.scala +++ b/tests/pos-macros/i4734/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i4773.scala b/tests/pos-macros/i4773.scala index 188d36642d1c..d97311c97aa1 100644 --- a/tests/pos-macros/i4773.scala +++ b/tests/pos-macros/i4773.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def foo2(): Unit = ${foo2Impl()} diff --git a/tests/pos-macros/i4774a.scala b/tests/pos-macros/i4774a.scala index c117c7dcd0d9..e0ce93f9c843 100644 --- a/tests/pos-macros/i4774a.scala +++ b/tests/pos-macros/i4774a.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def loop[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = '{ diff --git a/tests/pos-macros/i4774b.scala b/tests/pos-macros/i4774b.scala index e384f8edcccf..18a76bc81811 100644 --- a/tests/pos-macros/i4774b.scala +++ b/tests/pos-macros/i4774b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def loop[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = '{ diff --git a/tests/pos-macros/i4774c.scala b/tests/pos-macros/i4774c.scala index 3fba38cdecc9..00980c060117 100644 --- a/tests/pos-macros/i4774c.scala +++ b/tests/pos-macros/i4774c.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def loop[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = '{ val y = $x; ${loop('y)} } diff --git a/tests/pos-macros/i4774d.scala b/tests/pos-macros/i4774d.scala index e9662c12d8e3..27ff4e3cf71d 100644 --- a/tests/pos-macros/i4774d.scala +++ b/tests/pos-macros/i4774d.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def loop[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = diff --git a/tests/pos-macros/i4774e.scala b/tests/pos-macros/i4774e.scala index df057bf326d2..61969cf024fa 100644 --- a/tests/pos-macros/i4774e.scala +++ b/tests/pos-macros/i4774e.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def loop[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = diff --git a/tests/pos-macros/i4774f.scala b/tests/pos-macros/i4774f.scala index 17174fc2a35a..59d21eb2d2d4 100644 --- a/tests/pos-macros/i4774f.scala +++ b/tests/pos-macros/i4774f.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def loop[T](x: Expr[T])(implicit t: Type[T], qctx: Quotes): Expr[T] = diff --git a/tests/pos-macros/i4891.scala b/tests/pos-macros/i4891.scala index c0c58a65cc91..7c46be84ec52 100644 --- a/tests/pos-macros/i4891.scala +++ b/tests/pos-macros/i4891.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def foo(using Quotes): Expr[Option[String]] = '{None} diff --git a/tests/pos-macros/i5547.scala b/tests/pos-macros/i5547.scala index 646039635847..4e9f34701f3a 100644 --- a/tests/pos-macros/i5547.scala +++ b/tests/pos-macros/i5547.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert1(condition: => Boolean): Unit = diff --git a/tests/pos-macros/i5954.scala b/tests/pos-macros/i5954.scala index 6632dfb8e2db..ca024effc25e 100644 --- a/tests/pos-macros/i5954.scala +++ b/tests/pos-macros/i5954.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1 { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl(self: Expr[MatcherFactory1#AndNotWord])(using Quotes) = '{ val a: Any = $self } diff --git a/tests/pos-macros/i5954b.scala b/tests/pos-macros/i5954b.scala index 8f3fcb8b2657..4bd2c0d41d50 100644 --- a/tests/pos-macros/i5954b.scala +++ b/tests/pos-macros/i5954b.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1 { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl(self: Expr[MatcherFactory1#AndNotWord[Int]])(using Quotes) = '{ val a: Any = $self } diff --git a/tests/pos-macros/i5954c.scala b/tests/pos-macros/i5954c.scala index 2f40717740e8..63d47787e894 100644 --- a/tests/pos-macros/i5954c.scala +++ b/tests/pos-macros/i5954c.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1[A] { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl(self: Expr[MatcherFactory1[Int]#AndNotWord])(using Quotes) = '{ val a: Any = $self } diff --git a/tests/pos-macros/i5954d.scala b/tests/pos-macros/i5954d.scala index f1d7506fd003..8b3b31a36c22 100644 --- a/tests/pos-macros/i5954d.scala +++ b/tests/pos-macros/i5954d.scala @@ -3,7 +3,7 @@ abstract class MatcherFactory1 { } object MatcherFactory1 { - import scala.quoted._ + import scala.quoted.* def impl(self: Expr[MatcherFactory1#AndNotWord])(using Quotes) = '{ val a: Any = $self } diff --git a/tests/pos-macros/i5962.scala b/tests/pos-macros/i5962.scala index 973c3f42f155..594bbed1451f 100644 --- a/tests/pos-macros/i5962.scala +++ b/tests/pos-macros/i5962.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class MatchFactory1[T, S[_]] { def f: Int = 2 diff --git a/tests/pos-macros/i6008.scala b/tests/pos-macros/i6008.scala index 9005a9625254..1367a74086ca 100644 --- a/tests/pos-macros/i6008.scala +++ b/tests/pos-macros/i6008.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class C { type T = Int diff --git a/tests/pos-macros/i6140.scala b/tests/pos-macros/i6140.scala index 4dba5cbbeba6..64c02c57577a 100644 --- a/tests/pos-macros/i6140.scala +++ b/tests/pos-macros/i6140.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* sealed trait Trait[T] { type t = T } diff --git a/tests/pos-macros/i6142.scala b/tests/pos-macros/i6142.scala index 38b4a960be4f..919a0c9eeeae 100644 --- a/tests/pos-macros/i6142.scala +++ b/tests/pos-macros/i6142.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object O { def foo(using Quotes) = { diff --git a/tests/pos-macros/i6171/Macro_1.scala b/tests/pos-macros/i6171/Macro_1.scala index e996206bc24f..1ae349a26ec4 100644 --- a/tests/pos-macros/i6171/Macro_1.scala +++ b/tests/pos-macros/i6171/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(x: => Any): Unit = ${ assertImpl('x) } def assertImpl(x: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* x.asTerm.underlyingArgument '{ () } } diff --git a/tests/pos-macros/i6171/Test_2.scala b/tests/pos-macros/i6171/Test_2.scala index 778dd129fcf8..095c699dd107 100644 --- a/tests/pos-macros/i6171/Test_2.scala +++ b/tests/pos-macros/i6171/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* def main(args: Array[String]): Unit = { assert(new Some(5)) diff --git a/tests/pos-macros/i6210/Macros_1.scala b/tests/pos-macros/i6210/Macros_1.scala index 6c995b7c4b95..232443935d08 100644 --- a/tests/pos-macros/i6210/Macros_1.scala +++ b/tests/pos-macros/i6210/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def test[A, B]: Any = diff --git a/tests/pos-macros/i6214.scala b/tests/pos-macros/i6214.scala index beb394a70950..530d3ffe9edf 100644 --- a/tests/pos-macros/i6214.scala +++ b/tests/pos-macros/i6214.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def res(x: quoted.Expr[Int])(using Quotes): quoted.Expr[Int] = x match { case '{ val a: Int = $y; 1} => y // owner of `y` is `res` diff --git a/tests/pos-macros/i6253.scala b/tests/pos-macros/i6253.scala index 1409d2312127..62d77d6c7b8d 100644 --- a/tests/pos-macros/i6253.scala +++ b/tests/pos-macros/i6253.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def impl(self: Expr[StringContext])(using Quotes): Expr[String] = self match { case '{ StringContext() } => '{""} diff --git a/tests/pos-macros/i6435.scala b/tests/pos-macros/i6435.scala index 23038c40ae5b..82310cfdc55a 100644 --- a/tests/pos-macros/i6435.scala +++ b/tests/pos-macros/i6435.scala @@ -1,5 +1,5 @@ class Foo { - import scala.quoted._ + import scala.quoted.* def f(sc: quoted.Expr[StringContext])(using Quotes): Unit = { diff --git a/tests/pos-macros/i6535/Macro_1.scala b/tests/pos-macros/i6535/Macro_1.scala index a00360a2dddb..de8b4f643323 100644 --- a/tests/pos-macros/i6535/Macro_1.scala +++ b/tests/pos-macros/i6535/Macro_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition) } def assertImpl(cond: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* import ValDef.let cond.asTerm.underlyingArgument match { diff --git a/tests/pos-macros/i6535/Test_2.scala b/tests/pos-macros/i6535/Test_2.scala index 0969d8d42c2c..db78642cc15d 100644 --- a/tests/pos-macros/i6535/Test_2.scala +++ b/tests/pos-macros/i6535/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* def neverRuns(f: => Unit): Boolean = true diff --git a/tests/pos-macros/i6588.scala b/tests/pos-macros/i6588.scala index 214dd999ff63..587da09db919 100644 --- a/tests/pos-macros/i6588.scala +++ b/tests/pos-macros/i6588.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def foo[T:Type]: Int = 10 diff --git a/tests/pos-macros/i6783.scala b/tests/pos-macros/i6783.scala index 35a199fdb2bc..9fbbe749b320 100644 --- a/tests/pos-macros/i6783.scala +++ b/tests/pos-macros/i6783.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def testImpl(f: Expr[(Int, Int) => Int])(using Quotes): Expr[Int] = Expr.betaReduce('{$f(1, 2)}) diff --git a/tests/pos-macros/i6803b/Macro_1.scala b/tests/pos-macros/i6803b/Macro_1.scala index f533e360b248..29ec437dd763 100644 --- a/tests/pos-macros/i6803b/Macro_1.scala +++ b/tests/pos-macros/i6803b/Macro_1.scala @@ -1,7 +1,7 @@ package blah import scala.language.implicitConversions -import scala.quoted._ +import scala.quoted.* object AsObject { final class LineNo(val lineNo: Int) @@ -9,7 +9,7 @@ object AsObject { def unsafe(i: Int): LineNo = new LineNo(i) inline given x: LineNo = ${impl} private def impl(using Quotes) : Expr[LineNo] = { - import quotes.reflect._ + import quotes.reflect.* '{unsafe(${Expr(Position.ofMacroExpansion.startLine)})} } } diff --git a/tests/pos-macros/i6803b/Test_2.scala b/tests/pos-macros/i6803b/Test_2.scala index 562d780d9162..a0bbc3b4fa3c 100644 --- a/tests/pos-macros/i6803b/Test_2.scala +++ b/tests/pos-macros/i6803b/Test_2.scala @@ -1,4 +1,4 @@ -import blah._ +import blah.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i6997c.scala b/tests/pos-macros/i6997c.scala index 443cb0de44a3..ec0b56fbfc7f 100644 --- a/tests/pos-macros/i6997c.scala +++ b/tests/pos-macros/i6997c.scala @@ -1,6 +1,6 @@ package playground -import scala.quoted._ +import scala.quoted.* inline def mcr(x: => Any): Any = ${mcrImpl('x)} diff --git a/tests/pos-macros/i6998.scala b/tests/pos-macros/i6998.scala index dc0e0357099d..032a58b795e2 100644 --- a/tests/pos-macros/i6998.scala +++ b/tests/pos-macros/i6998.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def foo(using Quotes) : Unit = { val '{ $f : (Int => Double) } = ??? : Expr[Any] diff --git a/tests/pos-macros/i7011/Macros_1.scala b/tests/pos-macros/i7011/Macros_1.scala index 2854ccffe103..cf3dd3f4971b 100644 --- a/tests/pos-macros/i7011/Macros_1.scala +++ b/tests/pos-macros/i7011/Macros_1.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* inline def mcr(body: => Any): Unit = ${mcrImpl('body)} def mcrImpl[T](body: Expr[Any])(using Quotes) : Expr[Any] = { - import quotes.reflect._ + import quotes.reflect.* val bTree = body.asTerm val under = bTree.underlyingArgument diff --git a/tests/pos-macros/i7030/Macros_1.scala b/tests/pos-macros/i7030/Macros_1.scala index 9a4b8e277bed..72e59e651491 100644 --- a/tests/pos-macros/i7030/Macros_1.scala +++ b/tests/pos-macros/i7030/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def inner(exprs: Any): Any = ${innerImpl('exprs)} def innerImpl(exprs: Expr[Any])(using Quotes): Expr[Any] = @@ -6,6 +6,6 @@ def innerImpl(exprs: Expr[Any])(using Quotes): Expr[Any] = inline def outer(expr: => Any): Any = ${outerImpl('expr)} def outerImpl(body: Expr[Any])(using Quotes): Expr[Any] = { - import quotes.reflect._ + import quotes.reflect.* body.asTerm.underlyingArgument.asExpr } diff --git a/tests/pos-macros/i7046.scala b/tests/pos-macros/i7046.scala index 8f296ad0fb43..a2e7972bb743 100644 --- a/tests/pos-macros/i7046.scala +++ b/tests/pos-macros/i7046.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def mcr: Any = ${mcrImpl} def mcrImpl(using ctx: Quotes): Expr[Any] = { diff --git a/tests/pos-macros/i7048.scala b/tests/pos-macros/i7048.scala index a9a889bb4853..b7431edbbfef 100644 --- a/tests/pos-macros/i7048.scala +++ b/tests/pos-macros/i7048.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait IsExpr[T] { type Underlying diff --git a/tests/pos-macros/i7048b.scala b/tests/pos-macros/i7048b.scala index e4e78c2ae5ea..3989391d0dc8 100644 --- a/tests/pos-macros/i7048b.scala +++ b/tests/pos-macros/i7048b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait IsExpr { type Underlying diff --git a/tests/pos-macros/i7048c.scala b/tests/pos-macros/i7048c.scala index 15c14e6a83d7..a783ab622c1e 100644 --- a/tests/pos-macros/i7048c.scala +++ b/tests/pos-macros/i7048c.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait IsExpr { type Underlying diff --git a/tests/pos-macros/i7048d.scala b/tests/pos-macros/i7048d.scala index ee9ce70de927..242169be5085 100644 --- a/tests/pos-macros/i7048d.scala +++ b/tests/pos-macros/i7048d.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait IsExpr { class Underlying diff --git a/tests/pos-macros/i7048e.scala b/tests/pos-macros/i7048e.scala index 43636f199d89..c590525351ed 100644 --- a/tests/pos-macros/i7048e.scala +++ b/tests/pos-macros/i7048e.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* abstract class Test { type T diff --git a/tests/pos-macros/i7052.scala b/tests/pos-macros/i7052.scala index c6eaf7a01776..e7b56f964294 100644 --- a/tests/pos-macros/i7052.scala +++ b/tests/pos-macros/i7052.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test { def foo(str: Expr[String])(using Quotes) = '{ @deprecated($str, "") diff --git a/tests/pos-macros/i7110a/Macro_1.scala b/tests/pos-macros/i7110a/Macro_1.scala index 98b2dbe09eba..a979c79e342c 100644 --- a/tests/pos-macros/i7110a/Macro_1.scala +++ b/tests/pos-macros/i7110a/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/pos-macros/i7110a/Test_2.scala b/tests/pos-macros/i7110a/Test_2.scala index c901785a7bf1..42b27f8c0da7 100644 --- a/tests/pos-macros/i7110a/Test_2.scala +++ b/tests/pos-macros/i7110a/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i7110b/Macro_1.scala b/tests/pos-macros/i7110b/Macro_1.scala index 9bc5998c4860..c068a7c96aab 100644 --- a/tests/pos-macros/i7110b/Macro_1.scala +++ b/tests/pos-macros/i7110b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/pos-macros/i7110b/Test_2.scala b/tests/pos-macros/i7110b/Test_2.scala index b4ee47b71e14..efee3942815f 100644 --- a/tests/pos-macros/i7110b/Test_2.scala +++ b/tests/pos-macros/i7110b/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i7110c/Macro_1.scala b/tests/pos-macros/i7110c/Macro_1.scala index 119175f84ace..8a0a833001ae 100644 --- a/tests/pos-macros/i7110c/Macro_1.scala +++ b/tests/pos-macros/i7110c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/pos-macros/i7110c/Test_2.scala b/tests/pos-macros/i7110c/Test_2.scala index efb82b88f669..eef6bca90d42 100644 --- a/tests/pos-macros/i7110c/Test_2.scala +++ b/tests/pos-macros/i7110c/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i7110d/Macro_1.scala b/tests/pos-macros/i7110d/Macro_1.scala index fc1d8e1b0478..fb59a2a22d2c 100644 --- a/tests/pos-macros/i7110d/Macro_1.scala +++ b/tests/pos-macros/i7110d/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/pos-macros/i7110d/Test_2.scala b/tests/pos-macros/i7110d/Test_2.scala index 5582ec55a133..b29bc73aba59 100644 --- a/tests/pos-macros/i7110d/Test_2.scala +++ b/tests/pos-macros/i7110d/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i7110e/Macro_1.scala b/tests/pos-macros/i7110e/Macro_1.scala index f9470255366d..08bd2cc03e47 100644 --- a/tests/pos-macros/i7110e/Macro_1.scala +++ b/tests/pos-macros/i7110e/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/pos-macros/i7110e/Test_2.scala b/tests/pos-macros/i7110e/Test_2.scala index 881ce247c65c..a3917270a614 100644 --- a/tests/pos-macros/i7110e/Test_2.scala +++ b/tests/pos-macros/i7110e/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i7110f/Macro_1.scala b/tests/pos-macros/i7110f/Macro_1.scala index 98b2dbe09eba..a979c79e342c 100644 --- a/tests/pos-macros/i7110f/Macro_1.scala +++ b/tests/pos-macros/i7110f/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/pos-macros/i7110f/Test_2.scala b/tests/pos-macros/i7110f/Test_2.scala index c901785a7bf1..42b27f8c0da7 100644 --- a/tests/pos-macros/i7110f/Test_2.scala +++ b/tests/pos-macros/i7110f/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/pos-macros/i7204.scala b/tests/pos-macros/i7204.scala index 51a9141f56c3..ad7a27670de8 100644 --- a/tests/pos-macros/i7204.scala +++ b/tests/pos-macros/i7204.scala @@ -1,8 +1,8 @@ -import scala.quoted._ +import scala.quoted.* object Foo { def impl(using Quotes) : Unit = { - import quotes.reflect._ + import quotes.reflect.* val Select(_, _) = (??? : Term) } } diff --git a/tests/pos-macros/i7262.scala b/tests/pos-macros/i7262.scala index 23b0af1f3fde..b4cfd7463280 100644 --- a/tests/pos-macros/i7262.scala +++ b/tests/pos-macros/i7262.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f[T](t: Type[T])(using Quotes) = t match { case '[ Int *: EmptyTuple ] => diff --git a/tests/pos-macros/i7264.scala b/tests/pos-macros/i7264.scala index 3e15b16d5a1b..c87409561bee 100644 --- a/tests/pos-macros/i7264.scala +++ b/tests/pos-macros/i7264.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f[T2](t: Type[T2])(using Quotes) = t match { case '[ *:[Int, t2] ] => diff --git a/tests/pos-macros/i7264b.scala b/tests/pos-macros/i7264b.scala index feaee449e0ce..e0d72ad1a27b 100644 --- a/tests/pos-macros/i7264b.scala +++ b/tests/pos-macros/i7264b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f[T2: Type](e: Expr[T2])(using Quotes) = e match { case '{ $x: *:[Int, t] } => diff --git a/tests/pos-macros/i7264c.scala b/tests/pos-macros/i7264c.scala index c61e4e31535e..0248c1da37e2 100644 --- a/tests/pos-macros/i7264c.scala +++ b/tests/pos-macros/i7264c.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f[T2: Type](e: Expr[T2])(using Quotes) = e match { case '{ $x: t0 } => diff --git a/tests/pos-macros/i7358.scala b/tests/pos-macros/i7358.scala index 0c8f18b1b84b..58df7ebbb875 100644 --- a/tests/pos-macros/i7358.scala +++ b/tests/pos-macros/i7358.scala @@ -1,7 +1,7 @@ package test -import scala.quoted._ -import scala.compiletime._ +import scala.quoted.* +import scala.compiletime.* transparent inline def summonT[Tp <: Tuple](using Quotes): Tuple = inline erasedValue[Tp] match { case _ : EmptyTuple => Tuple() diff --git a/tests/pos-macros/i7405.scala b/tests/pos-macros/i7405.scala index ba5596c046f7..0fd81f7366fe 100644 --- a/tests/pos-macros/i7405.scala +++ b/tests/pos-macros/i7405.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f(using Quotes): Expr[Any] = { '{ diff --git a/tests/pos-macros/i7405b.scala b/tests/pos-macros/i7405b.scala index c11dc9b91516..df7218608e88 100644 --- a/tests/pos-macros/i7405b.scala +++ b/tests/pos-macros/i7405b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def f(using Quotes): Expr[Any] = { diff --git a/tests/pos-macros/i7513/Macro_1.scala b/tests/pos-macros/i7513/Macro_1.scala index e0add6b02552..3feb00c1e435 100644 --- a/tests/pos-macros/i7513/Macro_1.scala +++ b/tests/pos-macros/i7513/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait Quoted { def foo: Int diff --git a/tests/pos-macros/i7513b/Macro_1.scala b/tests/pos-macros/i7513b/Macro_1.scala index 4b71f53de8e6..91531bd20c83 100644 --- a/tests/pos-macros/i7513b/Macro_1.scala +++ b/tests/pos-macros/i7513b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait Quoted { val foo: Int diff --git a/tests/pos-macros/i7513c/Macro_1.scala b/tests/pos-macros/i7513c/Macro_1.scala index 40504e3e24d4..025c4b62adb1 100644 --- a/tests/pos-macros/i7513c/Macro_1.scala +++ b/tests/pos-macros/i7513c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { trait Quoted { diff --git a/tests/pos-macros/i7519.scala b/tests/pos-macros/i7519.scala index c0af9b9971d3..b3fe924aa03b 100644 --- a/tests/pos-macros/i7519.scala +++ b/tests/pos-macros/i7519.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.annotation.StaticAnnotation object Test { diff --git a/tests/pos-macros/i7519b.scala b/tests/pos-macros/i7519b.scala index 580a200a4589..a9a74ad58b12 100644 --- a/tests/pos-macros/i7519b.scala +++ b/tests/pos-macros/i7519b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.annotation.StaticAnnotation class Annot(in: Int) extends StaticAnnotation diff --git a/tests/pos-macros/i7521.scala b/tests/pos-macros/i7521.scala index 66a6ebf22e06..330565f2dbe4 100644 --- a/tests/pos-macros/i7521.scala +++ b/tests/pos-macros/i7521.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.annotation.StaticAnnotation object Test { diff --git a/tests/pos-macros/i7887.scala b/tests/pos-macros/i7887.scala index 61bfb573b869..da3768e404c4 100644 --- a/tests/pos-macros/i7887.scala +++ b/tests/pos-macros/i7887.scala @@ -1,5 +1,5 @@ def typed[A](using t: quoted.Type[A], q: quoted.Quotes): Unit = { - import q.reflect._ + import q.reflect.* '{ type T = A ${'{???}.asExprOf[T]} diff --git a/tests/pos-macros/i7997.scala b/tests/pos-macros/i7997.scala index 09036b23230e..70611665c2c7 100644 --- a/tests/pos-macros/i7997.scala +++ b/tests/pos-macros/i7997.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def oops(using Quotes) = { val q = '{ class Foo { val x = 3; ${ val v = 'x; '{} } }} } diff --git a/tests/pos-macros/i8045.scala b/tests/pos-macros/i8045.scala index 3cc2db538fba..15a233192295 100644 --- a/tests/pos-macros/i8045.scala +++ b/tests/pos-macros/i8045.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test def run(using Quotes)(tree: quotes.reflect.Tree): Unit = def makeExpr(tree: quotes.reflect.Tree): Expr[Int] = ??? diff --git a/tests/pos-macros/i8045b.scala b/tests/pos-macros/i8045b.scala index 71a0086de286..96b185ea4f52 100644 --- a/tests/pos-macros/i8045b.scala +++ b/tests/pos-macros/i8045b.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test def run(using q: Quotes)(tree: q.reflect.Tree): Unit = def makeExpr(tree: q.reflect.Tree): Expr[Int] = ??? diff --git a/tests/pos-macros/i8052.scala b/tests/pos-macros/i8052.scala index e671c52846a8..53d49e1f2c88 100644 --- a/tests/pos-macros/i8052.scala +++ b/tests/pos-macros/i8052.scala @@ -1,5 +1,5 @@ -import scala.deriving._ -import scala.quoted._ +import scala.deriving.* +import scala.quoted.* object Macro2 { diff --git a/tests/pos-macros/i8100.scala b/tests/pos-macros/i8100.scala index 898cfcd4e89c..0cf80fe920ee 100644 --- a/tests/pos-macros/i8100.scala +++ b/tests/pos-macros/i8100.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class M { type E diff --git a/tests/pos-macros/i8302.scala b/tests/pos-macros/i8302.scala index ef930c2e9570..4aeb3e1fdc76 100644 --- a/tests/pos-macros/i8302.scala +++ b/tests/pos-macros/i8302.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def foo[T](using Quotes, Type[T]): Expr[Any] = '{ (q: Quotes) ?=> type TT = T diff --git a/tests/pos-macros/i8325/Macro_1.scala b/tests/pos-macros/i8325/Macro_1.scala index b3f14e80157c..18466e17b3df 100644 --- a/tests/pos-macros/i8325/Macro_1.scala +++ b/tests/pos-macros/i8325/Macro_1.scala @@ -1,6 +1,6 @@ package a -import scala.quoted._ +import scala.quoted.* object A: @@ -12,7 +12,7 @@ object A: def pure[A](a:A):A = ??? def transformImplExpr[A:Type](using Quotes)(expr: Expr[A]): Expr[A] = { - import quotes.reflect._ + import quotes.reflect.* expr.asTerm match { case Inlined(x,y,z) => transformImplExpr(z.asExpr.asInstanceOf[Expr[A]]) case Apply(fun,args) => '{ A.pure(${Apply(fun,args).asExpr.asInstanceOf[Expr[A]]}) } diff --git a/tests/pos-macros/i8325b/Macro_1.scala b/tests/pos-macros/i8325b/Macro_1.scala index aa4255f6f3a0..181efa260f9b 100644 --- a/tests/pos-macros/i8325b/Macro_1.scala +++ b/tests/pos-macros/i8325b/Macro_1.scala @@ -1,6 +1,6 @@ package a -import scala.quoted._ +import scala.quoted.* object A: @@ -12,7 +12,7 @@ object A: def pure[A](a:A):A = ??? def transformImplExpr[A:Type](using Quotes)(expr: Expr[A]): Expr[A] = { - import quotes.reflect._ + import quotes.reflect.* expr.asTerm match { case Inlined(x,y,z) => transformImplExpr(z.asExpr.asInstanceOf[Expr[A]]) case r@Apply(fun,args) => '{ diff --git a/tests/pos-macros/i8521/Macro_1.scala b/tests/pos-macros/i8521/Macro_1.scala index 63aed53debb9..04c5e57109e3 100644 --- a/tests/pos-macros/i8521/Macro_1.scala +++ b/tests/pos-macros/i8521/Macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* object Foo { inline def foo[T <: AnyKind]: String = ${ bar[T] } def bar[T <: AnyKind : Type](using Quotes): Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* def packageToName(sym: Symbol): Unit = { if sym.isPackageDef then diff --git a/tests/pos-macros/i8651a.scala b/tests/pos-macros/i8651a.scala index 24cad01570d4..fb3827ea202e 100644 --- a/tests/pos-macros/i8651a.scala +++ b/tests/pos-macros/i8651a.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def coroutineImpl(using Quotes): Expr[Any] = '{ new { diff --git a/tests/pos-macros/i8651b.scala b/tests/pos-macros/i8651b.scala index a7d2a9a72016..31d73271ff40 100644 --- a/tests/pos-macros/i8651b.scala +++ b/tests/pos-macros/i8651b.scala @@ -4,12 +4,12 @@ abstract class Coroutine[+T] { object Macros { - import scala.quoted._ + import scala.quoted.* inline def coroutine[T](inline body: Any): Coroutine[T] = ${ coroutineImpl('{body}) } def coroutineImpl[T: Type](expr: Expr[_ <: Any])(using Quotes): Expr[Coroutine[T]] = { - import quotes.reflect._ + import quotes.reflect.* '{ new Coroutine[T] { diff --git a/tests/pos-macros/i8865.scala b/tests/pos-macros/i8865.scala index ed4b5ae48033..586f87b8ddec 100644 --- a/tests/pos-macros/i8865.scala +++ b/tests/pos-macros/i8865.scala @@ -1,8 +1,8 @@ -import scala.quoted._ +import scala.quoted.* object Macro { def impl[A : Type](using Quotes): Expr[A] = { - import quotes.reflect._ + import quotes.reflect.* TypeRepr.of[A].asType match case '[tpe] => '{ (a: tpe) => ???} '{???} diff --git a/tests/pos-macros/i8866/Macro_1.scala b/tests/pos-macros/i8866/Macro_1.scala index d6f33392e211..d533a6269884 100644 --- a/tests/pos-macros/i8866/Macro_1.scala +++ b/tests/pos-macros/i8866/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object OtherMacro { @@ -12,7 +12,7 @@ object OtherMacro { object Macro { def impl(using Quotes): Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* ValDef.let( Symbol.spliceOwner, diff --git a/tests/pos-macros/i8866b/Macro_1.scala b/tests/pos-macros/i8866b/Macro_1.scala index 71e00123ba56..9f2f543c1a8b 100644 --- a/tests/pos-macros/i8866b/Macro_1.scala +++ b/tests/pos-macros/i8866b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Other { inline def apply = 5 @@ -7,7 +7,7 @@ object Other { object Macro { def impl(using Quotes): Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* ValDef.let( Symbol.spliceOwner, diff --git a/tests/pos-macros/i8866c/Macro_1.scala b/tests/pos-macros/i8866c/Macro_1.scala index 53118b4580ce..57800ef11c7f 100644 --- a/tests/pos-macros/i8866c/Macro_1.scala +++ b/tests/pos-macros/i8866c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(xs: Boolean*): Unit = ??? diff --git a/tests/pos-macros/i8879/Macro_1.scala b/tests/pos-macros/i8879/Macro_1.scala index ec667c654888..4b1a478fa70e 100644 --- a/tests/pos-macros/i8879/Macro_1.scala +++ b/tests/pos-macros/i8879/Macro_1.scala @@ -2,12 +2,12 @@ case class Foo[A](a: A) object Test { - import scala.quoted._ + import scala.quoted.* def impl[T](t: T)(using Quotes, Type[T]): Expr[Any] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* val foo = TypeRepr.of[Foo[String]] val symbol = foo.typeSymbol.memberField("a") diff --git a/tests/pos-macros/i8945.scala b/tests/pos-macros/i8945.scala index 5bb028355e9f..5dded16f0160 100644 --- a/tests/pos-macros/i8945.scala +++ b/tests/pos-macros/i8945.scala @@ -6,7 +6,7 @@ trait Context { } class MacroImpl(val c: Context) { - import c.universe._ + import c.universe.* def mono: Literal = ??? } diff --git a/tests/pos-macros/i9020-a/Macro_1.scala b/tests/pos-macros/i9020-a/Macro_1.scala index 124a1604ca9f..da490f40c01a 100644 --- a/tests/pos-macros/i9020-a/Macro_1.scala +++ b/tests/pos-macros/i9020-a/Macro_1.scala @@ -5,7 +5,7 @@ trait Show[T] { object Show { inline def deriveWithMacro[T]: Show[T] = ${ impl[T] } - import quoted._ + import quoted.* def impl[T](using ctx: Quotes, tpe: Type[T]): Expr[Show[T]] = '{ new Show[T] { diff --git a/tests/pos-macros/i9020-b/Macro_1.scala b/tests/pos-macros/i9020-b/Macro_1.scala index 503eb48d0fa5..569eeaf452ae 100644 --- a/tests/pos-macros/i9020-b/Macro_1.scala +++ b/tests/pos-macros/i9020-b/Macro_1.scala @@ -5,7 +5,7 @@ trait Show[T] { object Show { inline def deriveWithMacro[T]: Show[T] = ${ impl[T] } - import quoted._ + import quoted.* def impl[T](using ctx: Quotes, tpe: Type[T]): Expr[Show[T]] = '{ new Show[tpe.Underlying] { diff --git a/tests/pos-macros/i9240/Macro_1.scala b/tests/pos-macros/i9240/Macro_1.scala index 1323e016e9a8..9e019d351643 100644 --- a/tests/pos-macros/i9240/Macro_1.scala +++ b/tests/pos-macros/i9240/Macro_1.scala @@ -1,13 +1,13 @@ -import scala.quoted._ +import scala.quoted.* inline def diveInto[T]: String = ${ diveIntoImpl[T]() } def diveIntoImpl[T]()(implicit qctx: Quotes, ttype: Type[T]): Expr[String] = - import quotes.reflect._ + import quotes.reflect.* Expr( unwindType(TypeRepr.of[T]) ) def unwindType(using Quotes)(aType: quotes.reflect.TypeRepr): String = - import quotes.reflect._ + import quotes.reflect.* aType match { case AppliedType(t,tob) => diff --git a/tests/pos-macros/i9251/Macro_1.scala b/tests/pos-macros/i9251/Macro_1.scala index f055d1f595a8..4b1b467bff22 100644 --- a/tests/pos-macros/i9251/Macro_1.scala +++ b/tests/pos-macros/i9251/Macro_1.scala @@ -1,6 +1,6 @@ package cps -import scala.quoted._ +import scala.quoted.* trait CpsMonad[F[_]] @@ -19,7 +19,7 @@ object Async { def checkPrintTypeImpl[F[_]:Type,T:Type](f: Expr[T])(using Quotes): Expr[Unit] = - import quotes.reflect._ + import quotes.reflect.* val fu = f.asTerm fu match diff --git a/tests/pos-macros/i9254/Macros_1.scala b/tests/pos-macros/i9254/Macros_1.scala index 69a78b865d6f..aa2c71c8a343 100644 --- a/tests/pos-macros/i9254/Macros_1.scala +++ b/tests/pos-macros/i9254/Macros_1.scala @@ -1,6 +1,6 @@ package cps -import scala.quoted._ +import scala.quoted.* trait CpsMonad[F[_]] @@ -27,7 +27,7 @@ object Async { } def transformImpl[F[_]:Type,T:Type](f: Expr[T])(using Quotes): Expr[Unit] = - import quotes.reflect._ + import quotes.reflect.* def uninline(t:Term):Term = t match diff --git a/tests/pos-macros/i9296/Macros_1.scala b/tests/pos-macros/i9296/Macros_1.scala index 240cd97eabae..4e1a66dfb373 100644 --- a/tests/pos-macros/i9296/Macros_1.scala +++ b/tests/pos-macros/i9296/Macros_1.scala @@ -1,7 +1,7 @@ package a -import scala.quoted._ -import scala.concurrent._ +import scala.quoted.* +import scala.concurrent.* object M { @@ -10,7 +10,7 @@ object M { def resolveInMacrosImpl[F[_]:Type,T:Type](f:Expr[Future[T]])(using qctx:Quotes):Expr[ Conversion[Future[T],F[T]]]={ - import quotes.reflect._ + import quotes.reflect.* val conversion = TypeIdent(Symbol.classSymbol("scala.Conversion")).tpe val inFuture = f.asTerm.tpe.widen val tType = TypeRepr.of[T] diff --git a/tests/pos-macros/i9296/Test_2.scala b/tests/pos-macros/i9296/Test_2.scala index 8e22c5ae841b..456a0b47ec04 100644 --- a/tests/pos-macros/i9296/Test_2.scala +++ b/tests/pos-macros/i9296/Test_2.scala @@ -1,7 +1,7 @@ package a import scala.language.implicitConversions -import scala.concurrent._ +import scala.concurrent.* trait CB[T] diff --git a/tests/pos-macros/i9321/macros.scala b/tests/pos-macros/i9321/macros.scala index 96fa2663f240..8eeb11f7a03b 100644 --- a/tests/pos-macros/i9321/macros.scala +++ b/tests/pos-macros/i9321/macros.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* type Foo type F[X] diff --git a/tests/pos-macros/i9465.scala b/tests/pos-macros/i9465.scala index 6141cbea5927..1f313c3f90f4 100644 --- a/tests/pos-macros/i9465.scala +++ b/tests/pos-macros/i9465.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait Coll[A] { type C[X] // must be abstract diff --git a/tests/pos-macros/i9484/C.scala b/tests/pos-macros/i9484/C.scala index e4c6185c705d..f83e69f3c724 100644 --- a/tests/pos-macros/i9484/C.scala +++ b/tests/pos-macros/i9484/C.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object C { inline def m: Any = ${ mExpr } diff --git a/tests/pos-macros/i9484/L.scala b/tests/pos-macros/i9484/L.scala index ce9c12566eb6..a30f210a0cc2 100644 --- a/tests/pos-macros/i9484/L.scala +++ b/tests/pos-macros/i9484/L.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object L { val m = C.m diff --git a/tests/pos-macros/i9484/Q.scala b/tests/pos-macros/i9484/Q.scala index 411ca6bca67a..28f8574180e2 100644 --- a/tests/pos-macros/i9484/Q.scala +++ b/tests/pos-macros/i9484/Q.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Q { inline def f(): Any = ${ fExpr } diff --git a/tests/pos-macros/i9484b/C.scala b/tests/pos-macros/i9484b/C.scala index 987bd6a40136..5ced384a7a72 100644 --- a/tests/pos-macros/i9484b/C.scala +++ b/tests/pos-macros/i9484b/C.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object C { inline def m: Any = ${ mExpr } diff --git a/tests/pos-macros/i9484b/Q.scala b/tests/pos-macros/i9484b/Q.scala index 94b2bd60bb45..5a23a10e0257 100644 --- a/tests/pos-macros/i9484b/Q.scala +++ b/tests/pos-macros/i9484b/Q.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Q { inline def f(inline f: Any): Any = ${ Q2.fExpr('f) } diff --git a/tests/pos-macros/i9518/Macro_1.scala b/tests/pos-macros/i9518/Macro_1.scala index c5507da6ba4b..126bfbe7e8eb 100644 --- a/tests/pos-macros/i9518/Macro_1.scala +++ b/tests/pos-macros/i9518/Macro_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* trait CB[T] inline def shift : Unit = ${ shiftTerm } def shiftTerm(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val nTree = '{ ??? : CB[Int] }.asTerm val tp1 = TypeRepr.of[CB[Int]] val tp2 = TypeRepr.of[([X] =>> CB[X])[Int]] diff --git a/tests/pos-macros/i9570.scala b/tests/pos-macros/i9570.scala index 90d3aa85081f..295969813df6 100644 --- a/tests/pos-macros/i9570.scala +++ b/tests/pos-macros/i9570.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -8,7 +8,7 @@ object Macros { case object HNil extends HList private def sizeImpl(e: Expr[HList], n:Int)(using qctx:Quotes): Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* e match { case '{HCons(_,$t)} => // error if run with fatal warinings in BootstrappedOnlyCompilationTests sizeImpl(t,n+1) diff --git a/tests/pos-macros/i9687/Macro_1.scala b/tests/pos-macros/i9687/Macro_1.scala index 267b4cbe8bc6..cd7d2c6c38ae 100644 --- a/tests/pos-macros/i9687/Macro_1.scala +++ b/tests/pos-macros/i9687/Macro_1.scala @@ -1,6 +1,6 @@ package x -import scala.quoted._ +import scala.quoted.* object FastPath { @@ -23,7 +23,7 @@ object X { } def transformImpl[A:Type](x:Expr[A])(using Quotes):Expr[A] = { - import quotes.reflect._ + import quotes.reflect.* val slowPath = '{ SlowPath }.asTerm val fastPath = '{ FastPath }.asTerm val transformer = new TreeMap() { diff --git a/tests/pos-macros/i9802/Macro_1.scala b/tests/pos-macros/i9802/Macro_1.scala index a3e7760a5644..19cb6cadfd22 100644 --- a/tests/pos-macros/i9802/Macro_1.scala +++ b/tests/pos-macros/i9802/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def fun(inline prog: Double): Double = ${impl('prog)} diff --git a/tests/pos-macros/i9812.scala b/tests/pos-macros/i9812.scala index e09db34fea2a..6fb314d8db30 100644 --- a/tests/pos-macros/i9812.scala +++ b/tests/pos-macros/i9812.scala @@ -1,5 +1,5 @@ // compile with -Ycheck:reifyQuotes -Ystop-after:reifyQuotes -import quoted._ +import quoted.* sealed abstract class SomeEnum object SomeEnum: diff --git a/tests/pos-macros/i9894/Macro_1.scala b/tests/pos-macros/i9894/Macro_1.scala index 7135cb6a7029..02bab94d209f 100644 --- a/tests/pos-macros/i9894/Macro_1.scala +++ b/tests/pos-macros/i9894/Macro_1.scala @@ -1,6 +1,6 @@ package x -import scala.quoted._ +import scala.quoted.* trait CB[T]: def map[S](f: T=>S): CB[S] = ??? @@ -21,7 +21,7 @@ object X: } def processImpl[T:Type](f:Expr[T])(using Quotes):Expr[CB[T]] = - import quotes.reflect._ + import quotes.reflect.* def transform(term:Term):Term = term match diff --git a/tests/pos-macros/macro-classloaders/Macro.scala b/tests/pos-macros/macro-classloaders/Macro.scala index 947edf652bfa..28e1b8f83319 100644 --- a/tests/pos-macros/macro-classloaders/Macro.scala +++ b/tests/pos-macros/macro-classloaders/Macro.scala @@ -1,6 +1,6 @@ import java.net.URLClassLoader -import scala.quoted._ +import scala.quoted.* object Macro { self => inline def f: Any = ${ impl } diff --git a/tests/pos-macros/macro-docs.scala b/tests/pos-macros/macro-docs.scala index 8d741ff07e06..f3cd6e3ef00a 100644 --- a/tests/pos-macros/macro-docs.scala +++ b/tests/pos-macros/macro-docs.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object MacrosMD_ToExpr { diff --git a/tests/pos-macros/macro-with-type/Macro_1.scala b/tests/pos-macros/macro-with-type/Macro_1.scala index 73bf4bae895d..9010f0f11313 100644 --- a/tests/pos-macros/macro-with-type/Macro_1.scala +++ b/tests/pos-macros/macro-with-type/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def ff: Unit = ${impl(Type.of[Int])} def impl(t: Type[Int])(using Quotes): Expr[Unit] = '{} diff --git a/tests/pos-macros/macros-in-same-project-1/Foo.scala b/tests/pos-macros/macros-in-same-project-1/Foo.scala index e463e43fe840..653150d5dcd5 100644 --- a/tests/pos-macros/macros-in-same-project-1/Foo.scala +++ b/tests/pos-macros/macros-in-same-project-1/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/pos-macros/macros-in-same-project-2/Foo.scala b/tests/pos-macros/macros-in-same-project-2/Foo.scala index 7f77c8e356fd..f326d6031b93 100644 --- a/tests/pos-macros/macros-in-same-project-2/Foo.scala +++ b/tests/pos-macros/macros-in-same-project-2/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/pos-macros/macros-in-same-project-3/Bar.scala b/tests/pos-macros/macros-in-same-project-3/Bar.scala index 26bbb440fac8..09870ba91305 100644 --- a/tests/pos-macros/macros-in-same-project-3/Bar.scala +++ b/tests/pos-macros/macros-in-same-project-3/Bar.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Bar { diff --git a/tests/pos-macros/macros-in-same-project-3/Foo.scala b/tests/pos-macros/macros-in-same-project-3/Foo.scala index c2d88908dcb4..d6c3dd285c6d 100644 --- a/tests/pos-macros/macros-in-same-project-3/Foo.scala +++ b/tests/pos-macros/macros-in-same-project-3/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/pos-macros/macros-in-same-project-4/Bar.scala b/tests/pos-macros/macros-in-same-project-4/Bar.scala index 9bcb16bdc9ac..4633d3183a59 100644 --- a/tests/pos-macros/macros-in-same-project-4/Bar.scala +++ b/tests/pos-macros/macros-in-same-project-4/Bar.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Bar { diff --git a/tests/pos-macros/nil-liftable.scala b/tests/pos-macros/nil-liftable.scala index 490291bc48f7..a3277510d7bf 100644 --- a/tests/pos-macros/nil-liftable.scala +++ b/tests/pos-macros/nil-liftable.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test: given NilToExpr: ToExpr[Nil.type] with { diff --git a/tests/pos-macros/power-macro/Macro_1.scala b/tests/pos-macros/power-macro/Macro_1.scala index b809890370d1..009947d4fe1f 100644 --- a/tests/pos-macros/power-macro/Macro_1.scala +++ b/tests/pos-macros/power-macro/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { diff --git a/tests/pos-macros/power-macro/PowerInlined-1_2.scala b/tests/pos-macros/power-macro/PowerInlined-1_2.scala index ec46c956cc28..a223887ae53c 100644 --- a/tests/pos-macros/power-macro/PowerInlined-1_2.scala +++ b/tests/pos-macros/power-macro/PowerInlined-1_2.scala @@ -1,5 +1,5 @@ object PowerInlined1 { - import PowerMacro._ + import PowerMacro.* power(1, 5.0) // 1 quotes to unpickle } diff --git a/tests/pos-macros/power-macro/PowerInlined-1k_2.scala b/tests/pos-macros/power-macro/PowerInlined-1k_2.scala index 26ea6bf8308a..5fca8f856e0d 100644 --- a/tests/pos-macros/power-macro/PowerInlined-1k_2.scala +++ b/tests/pos-macros/power-macro/PowerInlined-1k_2.scala @@ -1,5 +1,5 @@ object PowerInlined1k { - import PowerMacro._ + import PowerMacro.* // FIXME Sometimes stack overflows in CI // power(9223372036854775807L, 5.0) // 125 quotes to unpickle diff --git a/tests/pos-macros/quote-1.scala b/tests/pos-macros/quote-1.scala index 23107f72053b..381e5476de0a 100644 --- a/tests/pos-macros/quote-1.scala +++ b/tests/pos-macros/quote-1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test(using Quotes) { diff --git a/tests/pos-macros/quote-aliases.scala b/tests/pos-macros/quote-aliases.scala index e6c0e50593fb..ab236c99b6d6 100644 --- a/tests/pos-macros/quote-aliases.scala +++ b/tests/pos-macros/quote-aliases.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test: diff --git a/tests/pos-macros/quote-bind-T.scala b/tests/pos-macros/quote-bind-T.scala index 99553e5ed742..51aafbd3d085 100644 --- a/tests/pos-macros/quote-bind-T.scala +++ b/tests/pos-macros/quote-bind-T.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def matchX[T](x: Expr[T])(using Type[T], Quotes): Expr[T] = '{ diff --git a/tests/pos-macros/quote-lift.scala b/tests/pos-macros/quote-lift.scala index 92dd80ef1941..62aae9895da1 100644 --- a/tests/pos-macros/quote-lift.scala +++ b/tests/pos-macros/quote-lift.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* class Test(using Quotes) { '{ ${implicitly[ToExpr[Int]].apply(1)} } { - import ToExpr._ + import ToExpr.* '{ ${summon[ToExpr[Int]].apply(1)} } diff --git a/tests/pos-macros/quote-liftable-list-2.scala b/tests/pos-macros/quote-liftable-list-2.scala index 713b1f771766..54c247aa5607 100644 --- a/tests/pos-macros/quote-liftable-list-2.scala +++ b/tests/pos-macros/quote-liftable-list-2.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/pos-macros/quote-liftable-list-3.scala b/tests/pos-macros/quote-liftable-list-3.scala index 1aeba2c365c8..537ad9ef19c9 100644 --- a/tests/pos-macros/quote-liftable-list-3.scala +++ b/tests/pos-macros/quote-liftable-list-3.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/pos-macros/quote-liftable-list.scala b/tests/pos-macros/quote-liftable-list.scala index a670855fcd07..64f40b4f27ee 100644 --- a/tests/pos-macros/quote-liftable-list.scala +++ b/tests/pos-macros/quote-liftable-list.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/pos-macros/quote-liftable.scala b/tests/pos-macros/quote-liftable.scala index 034a13c51f6a..f50728521a75 100644 --- a/tests/pos-macros/quote-liftable.scala +++ b/tests/pos-macros/quote-liftable.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def test(using Quotes) = { diff --git a/tests/pos-macros/quote-matching-implicit-types.scala b/tests/pos-macros/quote-matching-implicit-types.scala index e75749dbc4ab..aae9fd5ebaec 100644 --- a/tests/pos-macros/quote-matching-implicit-types.scala +++ b/tests/pos-macros/quote-matching-implicit-types.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/pos-macros/quote-nested-object/Macro_1.scala b/tests/pos-macros/quote-nested-object/Macro_1.scala index 6894a8409641..19746c270840 100644 --- a/tests/pos-macros/quote-nested-object/Macro_1.scala +++ b/tests/pos-macros/quote-nested-object/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/pos-macros/quote-nested-object/Test_2.scala b/tests/pos-macros/quote-nested-object/Test_2.scala index bcc073c6061a..6c0a9628b0bd 100644 --- a/tests/pos-macros/quote-nested-object/Test_2.scala +++ b/tests/pos-macros/quote-nested-object/Test_2.scala @@ -1,5 +1,5 @@ object PowerInlined1 { - import Macro.Implementation._ + import Macro.Implementation.* plus(0, 2) plus(1, 3) diff --git a/tests/pos-macros/quote-nested.scala b/tests/pos-macros/quote-nested.scala index 7a35c482c989..98cba9efdb9a 100644 --- a/tests/pos-macros/quote-nested.scala +++ b/tests/pos-macros/quote-nested.scala @@ -1,5 +1,5 @@ import scala.annotation.tailrec -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/pos-macros/quote-no-splices.scala b/tests/pos-macros/quote-no-splices.scala index 6ed98ff4c048..76ccc30c26dc 100644 --- a/tests/pos-macros/quote-no-splices.scala +++ b/tests/pos-macros/quote-no-splices.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def foo(using Quotes): Unit = { val expr ='{ diff --git a/tests/pos-macros/quote-non-static-macro.scala b/tests/pos-macros/quote-non-static-macro.scala index 6896b57f7d47..5c63b7f1a634 100644 --- a/tests/pos-macros/quote-non-static-macro.scala +++ b/tests/pos-macros/quote-non-static-macro.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { inline def foo: Unit = ${Foo.impl} diff --git a/tests/pos-macros/quote-this.scala b/tests/pos-macros/quote-this.scala index ea9173c5d0c7..20f3ff2f5b3b 100644 --- a/tests/pos-macros/quote-this.scala +++ b/tests/pos-macros/quote-this.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo { def a(using Quotes): Expr[Int] = '{1} diff --git a/tests/pos-macros/quote-type-with-param.scala b/tests/pos-macros/quote-type-with-param.scala index b7ab6ca11426..4f6da9aa1940 100644 --- a/tests/pos-macros/quote-type-with-param.scala +++ b/tests/pos-macros/quote-type-with-param.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(using Quotes): Unit = '{ type T[X] = List[X] } diff --git a/tests/pos-macros/quote-whitebox-2/Macro_1.scala b/tests/pos-macros/quote-whitebox-2/Macro_1.scala index 351f6c1216ba..8113cedbc113 100644 --- a/tests/pos-macros/quote-whitebox-2/Macro_1.scala +++ b/tests/pos-macros/quote-whitebox-2/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/pos-macros/quote-whitebox-2/Test_2.scala b/tests/pos-macros/quote-whitebox-2/Test_2.scala index da5757f22d79..12137c5749f3 100644 --- a/tests/pos-macros/quote-whitebox-2/Test_2.scala +++ b/tests/pos-macros/quote-whitebox-2/Test_2.scala @@ -1,4 +1,4 @@ -import Macro._ +import Macro.* object Test { diff --git a/tests/pos-macros/quoted-inline-quote.scala b/tests/pos-macros/quoted-inline-quote.scala index dc8a5d9ad8b5..7fc216e169d3 100644 --- a/tests/pos-macros/quoted-inline-quote.scala +++ b/tests/pos-macros/quoted-inline-quote.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Foo(using Quotes) { inline def foo(x: Expr[String])(using Quotes) = '{ println(${x}) } diff --git a/tests/pos-macros/quoted-pattern-type.scala b/tests/pos-macros/quoted-pattern-type.scala index 4cf7e0f43bab..0a3e0f279df1 100644 --- a/tests/pos-macros/quoted-pattern-type.scala +++ b/tests/pos-macros/quoted-pattern-type.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Lib { diff --git a/tests/pos-macros/quoted-splice-pattern-applied.scala b/tests/pos-macros/quoted-splice-pattern-applied.scala index b6f5065905cd..9547282b8cbd 100644 --- a/tests/pos-macros/quoted-splice-pattern-applied.scala +++ b/tests/pos-macros/quoted-splice-pattern-applied.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(x: Expr[Int])(using Quotes) = x match { case '{ ${f}($a: Int): Int } => diff --git a/tests/pos-macros/quoted-var.scala b/tests/pos-macros/quoted-var.scala index 847151733674..2ebfdac77d6e 100644 --- a/tests/pos-macros/quoted-var.scala +++ b/tests/pos-macros/quoted-var.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Var[T] diff --git a/tests/pos-macros/quotedPatterns-4.scala b/tests/pos-macros/quotedPatterns-4.scala index 9ac6c1f1245a..309b026e3d54 100644 --- a/tests/pos-macros/quotedPatterns-4.scala +++ b/tests/pos-macros/quotedPatterns-4.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def impl(receiver: Expr[StringContext])(using qctx: scala.quoted.Quotes) = { import quotes.reflect.Repeated diff --git a/tests/pos-macros/quotedPatterns.scala b/tests/pos-macros/quotedPatterns.scala index ec4d32cdf588..6a298eb8b0a6 100644 --- a/tests/pos-macros/quotedPatterns.scala +++ b/tests/pos-macros/quotedPatterns.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def x(using Quotes) = '{1 + 2} diff --git a/tests/pos-macros/scala2-macro-compat-1.scala b/tests/pos-macros/scala2-macro-compat-1.scala index 63a9d0d6c43e..d4cc508a471c 100644 --- a/tests/pos-macros/scala2-macro-compat-1.scala +++ b/tests/pos-macros/scala2-macro-compat-1.scala @@ -18,9 +18,9 @@ object LineNumberMacro2 { } object LineNumberMacro3 { - import scala.quoted._ + import scala.quoted.* def thisLineNumberExpr(using Quotes): Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* Expr(Position.ofMacroExpansion.startLine + 1) } } diff --git a/tests/pos-macros/splice-with-explicit-context.scala b/tests/pos-macros/splice-with-explicit-context.scala index 2e4ba6f7497b..d05aa254feb4 100644 --- a/tests/pos-macros/splice-with-explicit-context.scala +++ b/tests/pos-macros/splice-with-explicit-context.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f(a: Expr[Int])(using q: Quotes): Unit = diff --git a/tests/pos-macros/tasty-constant-type/Macro_1.scala b/tests/pos-macros/tasty-constant-type/Macro_1.scala index b0b4d546548e..86250bca306b 100644 --- a/tests/pos-macros/tasty-constant-type/Macro_1.scala +++ b/tests/pos-macros/tasty-constant-type/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { @@ -7,7 +7,7 @@ object Macro { transparent inline def ff[A <: Int, B <: Int](): AddInt[A, B] = ${ impl[A, B] } def impl[A <: Int : Type, B <: Int : Type](using Quotes) : Expr[AddInt[A, B]] = { - import quotes.reflect._ + import quotes.reflect.* val ConstantType(IntConstant(v1)) = TypeRepr.of[A] val ConstantType(IntConstant(v2)) = TypeRepr.of[B] diff --git a/tests/pos-macros/toexproftuple.scala b/tests/pos-macros/toexproftuple.scala index e71ea1802c59..acb93d9736d5 100644 --- a/tests/pos-macros/toexproftuple.scala +++ b/tests/pos-macros/toexproftuple.scala @@ -1,4 +1,4 @@ -import scala.quoted._, scala.deriving._ +import scala.quoted._, scala.deriving.* inline def mcr: Any = ${mcrImpl} def mcrImpl(using ctx: Quotes): Expr[Any] = { diff --git a/tests/pos-macros/treemap-unapply/Macro.scala b/tests/pos-macros/treemap-unapply/Macro.scala index 7e389e666fa7..a709ff797b3d 100644 --- a/tests/pos-macros/treemap-unapply/Macro.scala +++ b/tests/pos-macros/treemap-unapply/Macro.scala @@ -1,8 +1,8 @@ -import scala.quoted._ +import scala.quoted.* inline def mcr(x: => Unit): Unit = ${mcrImpl('x)} def mcrImpl(x: Expr[Unit])(using Quotes) : Expr[Unit] = - import quotes.reflect._ + import quotes.reflect.* val tr: Term = x.asTerm object m extends TreeMap m.transformTerm(tr)(Symbol.spliceOwner).asExprOf[Unit] diff --git a/tests/pos-macros/typetags.scala b/tests/pos-macros/typetags.scala index 97e915dda84c..3a6e60c2e91c 100644 --- a/tests/pos-macros/typetags.scala +++ b/tests/pos-macros/typetags.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/pos-macros/using-quote-context.scala b/tests/pos-macros/using-quote-context.scala index 1581356517a0..f55198416a22 100644 --- a/tests/pos-macros/using-quote-context.scala +++ b/tests/pos-macros/using-quote-context.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Test { def fold[W: Type](s: Expr[W]): Quotes ?=> Expr[W] = diff --git a/tests/pos-scala2/hk-infer.scala b/tests/pos-scala2/hk-infer.scala index 2bf898c485cf..44b4553e5951 100644 --- a/tests/pos-scala2/hk-infer.scala +++ b/tests/pos-scala2/hk-infer.scala @@ -5,7 +5,7 @@ object Basis { val x1 = Seq(X("asdf")) val x2 = Seq(X('d')) } -import Basis._ +import Basis.* object DoesWork { // Doesn'tWork diff --git a/tests/pos-scala2/t2030.scala b/tests/pos-scala2/t2030.scala index 2333c3981b99..9d4a139c8425 100644 --- a/tests/pos-scala2/t2030.scala +++ b/tests/pos-scala2/t2030.scala @@ -1,4 +1,4 @@ -import scala.collection.immutable._ +import scala.collection.immutable.* object Test extends App { val res0 = TreeSet(1, 2, 3, 4, 5, 6) diff --git a/tests/pos-scala2/t3568.scala b/tests/pos-scala2/t3568.scala index 59b6753cd342..76517def917b 100644 --- a/tests/pos-scala2/t3568.scala +++ b/tests/pos-scala2/t3568.scala @@ -1,6 +1,6 @@ -import scala.annotation._ -import scala.annotation.unchecked._ -import scala.collection._ +import scala.annotation.* +import scala.annotation.unchecked.* +import scala.collection.* package object buffer { diff --git a/tests/pos-scala2/t5070.scala b/tests/pos-scala2/t5070.scala index c236b4f9ea21..127f82d484ae 100644 --- a/tests/pos-scala2/t5070.scala +++ b/tests/pos-scala2/t5070.scala @@ -10,7 +10,7 @@ trait WebDSL[W <: Web] { } object Test { def t[W <: Web](implicit webDSL: WebDSL[W]): Unit = { - import webDSL._ + import webDSL.* implicitly[LocalNameCompanion] // succeeds implicitly[Companion1[W#LocalName]] // fails } diff --git a/tests/pos-scala2/typerep-stephane.scala b/tests/pos-scala2/typerep-stephane.scala index 2cb899591afc..7af225613a00 100644 --- a/tests/pos-scala2/typerep-stephane.scala +++ b/tests/pos-scala2/typerep-stephane.scala @@ -42,7 +42,7 @@ object typerep { } object test extends App { - import typerep._ + import typerep.* println(3.getType) println(List(3).getType) } diff --git a/tests/pos-special/extend-java-enum.scala b/tests/pos-special/extend-java-enum.scala index d6b03048411e..323b6d82639f 100644 --- a/tests/pos-special/extend-java-enum.scala +++ b/tests/pos-special/extend-java-enum.scala @@ -1,4 +1,4 @@ -import java.{lang => jl} +import java.{lang as jl} final class ConfigSyntax private (name: String, ordinal: Int) extends jl.Enum[ConfigSyntax](name, ordinal) diff --git a/tests/pos-special/fatal-warnings/i7219.scala b/tests/pos-special/fatal-warnings/i7219.scala index 903fc0429bf2..fe50549e2710 100644 --- a/tests/pos-special/fatal-warnings/i7219.scala +++ b/tests/pos-special/fatal-warnings/i7219.scala @@ -10,7 +10,7 @@ object Bar { type Blue = Foo.Blue } -import Foo._ +import Foo.* def foo(a: MyEnum): Seq[Bar.Blue] = a match { case Red => Seq.empty diff --git a/tests/pos-special/fatal-warnings/i7219b.scala b/tests/pos-special/fatal-warnings/i7219b.scala index f2fea75771ea..869c72b3b7d0 100644 --- a/tests/pos-special/fatal-warnings/i7219b.scala +++ b/tests/pos-special/fatal-warnings/i7219b.scala @@ -10,7 +10,7 @@ object Bar { export Foo.Blue } -import Foo._ +import Foo.* def foo(a: MyEnum): Seq[Bar.Blue] = a match { case Red => Seq.empty diff --git a/tests/pos-special/fatal-warnings/i9804.scala b/tests/pos-special/fatal-warnings/i9804.scala index 8aa4c34eca31..e42c13f3ebdc 100644 --- a/tests/pos-special/fatal-warnings/i9804.scala +++ b/tests/pos-special/fatal-warnings/i9804.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def f[A: Type](e: Expr[A])(using Quotes): Expr[A] = e match { case '{ $e2 } => e2 diff --git a/tests/pos-special/fatal-warnings/switches.scala b/tests/pos-special/fatal-warnings/switches.scala index 723727df493c..142aec175f3c 100644 --- a/tests/pos-special/fatal-warnings/switches.scala +++ b/tests/pos-special/fatal-warnings/switches.scala @@ -1,7 +1,7 @@ import scala.annotation.switch class Test { - import Test._ + import Test.* def test1(x: Int): Int = (x: @switch) match { case 1 => 1 diff --git a/tests/pos-special/fatal-warnings/tasty-parent-unapply.scala b/tests/pos-special/fatal-warnings/tasty-parent-unapply.scala index 196d31a07c4d..f76faa8f0e93 100644 --- a/tests/pos-special/fatal-warnings/tasty-parent-unapply.scala +++ b/tests/pos-special/fatal-warnings/tasty-parent-unapply.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def impl(using Quotes): Unit = { - import quotes.reflect._ + import quotes.reflect.* def foo(tree: Tree, term: Term, typeTree: TypeTree, parent: Tree) = { diff --git a/tests/pos-special/i7592/Macros_1.scala b/tests/pos-special/i7592/Macros_1.scala index 4794c704c61f..7564433fdc20 100644 --- a/tests/pos-special/i7592/Macros_1.scala +++ b/tests/pos-special/i7592/Macros_1.scala @@ -1,7 +1,7 @@ -import scala.quoted._ +import scala.quoted.* def compileImpl[T](expr : Expr[T])(using Quotes) : Expr[T] = { - import quotes.reflect._ + import quotes.reflect.* def proc(term : Term): Term = { term match { diff --git a/tests/pos-special/sourcepath/outer/Test2.scala b/tests/pos-special/sourcepath/outer/Test2.scala index 0d0012204065..50e5e00122da 100644 --- a/tests/pos-special/sourcepath/outer/Test2.scala +++ b/tests/pos-special/sourcepath/outer/Test2.scala @@ -1,5 +1,5 @@ package outer -import nested._ +import nested.* class Test2 extends A(22) { diff --git a/tests/pos-special/sourcepath/outer/Test3.scala b/tests/pos-special/sourcepath/outer/Test3.scala index f092aba589b6..8a270409bf3d 100644 --- a/tests/pos-special/sourcepath/outer/Test3.scala +++ b/tests/pos-special/sourcepath/outer/Test3.scala @@ -1,5 +1,5 @@ package outer -import nested._ +import nested.* class Test3 { diff --git a/tests/pos-special/sourcepath/outer/indent2.scala b/tests/pos-special/sourcepath/outer/indent2.scala index 354b92601e05..90de7f409f30 100644 --- a/tests/pos-special/sourcepath/outer/indent2.scala +++ b/tests/pos-special/sourcepath/outer/indent2.scala @@ -1,5 +1,5 @@ package outer -import nested._ +import nested.* object indent2 { val x2: Int = indent1.inner.x diff --git a/tests/pos-special/sourcepath/outer/toplevel2.scala b/tests/pos-special/sourcepath/outer/toplevel2.scala index d20c7a10e0ab..9609f6057c1b 100644 --- a/tests/pos-special/sourcepath/outer/toplevel2.scala +++ b/tests/pos-special/sourcepath/outer/toplevel2.scala @@ -1,5 +1,5 @@ package outer -import nested._ +import nested.* object toplevel2 { val a: Int = one diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan1.scala b/tests/pos-special/strawman-collections/CollectionStrawMan1.scala index 631e2f8e3b71..09f0d54b0bdd 100644 --- a/tests/pos-special/strawman-collections/CollectionStrawMan1.scala +++ b/tests/pos-special/strawman-collections/CollectionStrawMan1.scala @@ -1,6 +1,6 @@ package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag /** A strawman architecture for new collections. It contains some diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan4.scala b/tests/pos-special/strawman-collections/CollectionStrawMan4.scala index 5383acc02293..5ca8a978c4fd 100644 --- a/tests/pos-special/strawman-collections/CollectionStrawMan4.scala +++ b/tests/pos-special/strawman-collections/CollectionStrawMan4.scala @@ -1,6 +1,6 @@ package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan5.scala b/tests/pos-special/strawman-collections/CollectionStrawMan5.scala index 2296b29c82f1..52c5f3baa2e1 100644 --- a/tests/pos-special/strawman-collections/CollectionStrawMan5.scala +++ b/tests/pos-special/strawman-collections/CollectionStrawMan5.scala @@ -1,6 +1,6 @@ package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan6.scala b/tests/pos-special/strawman-collections/CollectionStrawMan6.scala index f13c19dad04e..9f189afbcf3a 100644 --- a/tests/pos-special/strawman-collections/CollectionStrawMan6.scala +++ b/tests/pos-special/strawman-collections/CollectionStrawMan6.scala @@ -1,13 +1,13 @@ package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec import compiletime.uninitialized class LowPriority { - import CollectionStrawMan6._ + import CollectionStrawMan6.* /** Convert array to iterable via view. Lower priority than ArrayOps */ implicit def arrayToView[T](xs: Array[T]): ArrayView[T] = new ArrayView[T](xs) diff --git a/tests/pos-special/typeclass-scaling.scala b/tests/pos-special/typeclass-scaling.scala index 6102e346136b..4b809de664f3 100644 --- a/tests/pos-special/typeclass-scaling.scala +++ b/tests/pos-special/typeclass-scaling.scala @@ -19,7 +19,7 @@ import scala.annotation.tailrec // user 1m6.337s // sys 0m1.344s object datatypes { - import typeclasses._ + import typeclasses.* enum E1[T] derives Eq, Pickler { case C1(x1: T) @@ -215,8 +215,8 @@ object typeclasses { object Eq { import scala.compiletime.erasedValue - import compiletime._ - import scala.deriving._ + import compiletime.* + import scala.deriving.* inline def tryEql[TT](x: TT, y: TT): Boolean = summonInline[Eq[TT]].eql(x, y) @@ -266,8 +266,8 @@ object typeclasses { object Pickler { import scala.compiletime.{erasedValue, constValue} - import compiletime._ - import deriving._ + import compiletime.* + import deriving.* def nextInt(buf: mutable.ListBuffer[Int]): Int = try buf.head finally buf.trimStart(1) @@ -356,8 +356,8 @@ object typeclasses { } } } -import datatypes._ -import typeclasses._ +import datatypes.* +import typeclasses.* // Tests object Test extends App { diff --git a/tests/pos-staging/quote-0.scala b/tests/pos-staging/quote-0.scala index a772a6395999..a9eb68ffce5f 100644 --- a/tests/pos-staging/quote-0.scala +++ b/tests/pos-staging/quote-0.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Macros { @@ -31,7 +31,7 @@ class Test { run { val program = '{ - import Macros._ + import Macros.* val x = 1 assert(x != 0) diff --git a/tests/pos-staging/quote-assert/quoted_1.scala b/tests/pos-staging/quote-assert/quoted_1.scala index 83a707770474..2bf170574eb4 100644 --- a/tests/pos-staging/quote-assert/quoted_1.scala +++ b/tests/pos-staging/quote-assert/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def assertImpl(expr: Expr[Boolean])(using Quotes) = diff --git a/tests/pos-staging/quote-assert/quoted_2.scala b/tests/pos-staging/quote-assert/quoted_2.scala index c9c8caf4112e..95a2044cf271 100644 --- a/tests/pos-staging/quote-assert/quoted_2.scala +++ b/tests/pos-staging/quote-assert/quoted_2.scala @@ -1,8 +1,8 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* -import Macros._ +import Macros.* object Test { diff --git a/tests/pos-with-compiler/A.scala b/tests/pos-with-compiler/A.scala index d5e8ad4e44e3..bab94e771eb6 100644 --- a/tests/pos-with-compiler/A.scala +++ b/tests/pos-with-compiler/A.scala @@ -1,5 +1,5 @@ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.NameOps._ +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.NameOps.* object Test { "JFunction".toTermName.specializedFor(Nil, ???, Nil, Nil)(using ???) diff --git a/tests/pos-with-compiler/Fileish.scala b/tests/pos-with-compiler/Fileish.scala index d226bb0bdeee..8ba62efb3298 100644 --- a/tests/pos-with-compiler/Fileish.scala +++ b/tests/pos-with-compiler/Fileish.scala @@ -3,7 +3,7 @@ package dotty.tools package io -import java.io.{ InputStream } +import java.io.InputStream import java.util.jar.JarEntry import language.postfixOps diff --git a/tests/pos-with-compiler/Labels.scala b/tests/pos-with-compiler/Labels.scala index f1a120920f05..a01141cd7d53 100644 --- a/tests/pos-with-compiler/Labels.scala +++ b/tests/pos-with-compiler/Labels.scala @@ -1,5 +1,5 @@ import dotty.tools.dotc.ast.Trees.Thicket -import dotty.tools.dotc.ast.tpd._ +import dotty.tools.dotc.ast.tpd.* object Labels { diff --git a/tests/pos-with-compiler/Patterns.scala b/tests/pos-with-compiler/Patterns.scala index ecbde54df0b0..6492ce6f8c72 100644 --- a/tests/pos-with-compiler/Patterns.scala +++ b/tests/pos-with-compiler/Patterns.scala @@ -1,5 +1,5 @@ -import dotty.tools.dotc.ast.Trees._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.ast.Trees.* +import dotty.tools.dotc.core.Types.* object Patterns { val d: Object = null diff --git a/tests/pos-with-compiler/i143.scala b/tests/pos-with-compiler/i143.scala index c7863d45b90f..bd49cd21a963 100644 --- a/tests/pos-with-compiler/i143.scala +++ b/tests/pos-with-compiler/i143.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.core.Denotations._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Denotations.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Contexts.* class TC5(val ctx: Context) extends AnyVal { def candidates(mbr: SingleDenotation): Boolean = { diff --git a/tests/pos-with-compiler/lazyValsSepComp.scala b/tests/pos-with-compiler/lazyValsSepComp.scala index 78edf31d4567..c7e97dc12142 100644 --- a/tests/pos-with-compiler/lazyValsSepComp.scala +++ b/tests/pos-with-compiler/lazyValsSepComp.scala @@ -1,11 +1,11 @@ package dotty.tools package io -import java.io.{ InputStream } +import java.io.InputStream import java.util.jar.JarEntry import dotty.tools.dotc.core.Definitions import language.postfixOps -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* /** A test to trigger issue with separate compilation and lazy vals */ diff --git a/tests/pos-with-compiler/tasty/test-definitions.scala b/tests/pos-with-compiler/tasty/test-definitions.scala index 5a45840dec84..3def4d22d62a 100644 --- a/tests/pos-with-compiler/tasty/test-definitions.scala +++ b/tests/pos-with-compiler/tasty/test-definitions.scala @@ -343,8 +343,8 @@ abstract class Tasty { // The concrete implementation - hidden from users. object ReflectionImpl extends Tasty { - import definitions._ - import dotty.tools.dotc._ + import definitions.* + import dotty.tools.dotc.* import ast.tpd import core.{Types, Symbols, Contexts} import util.Spans @@ -411,8 +411,8 @@ object ReflectionImpl extends Tasty { as fast as native access. object ReflectionImpl extends TastyAST { - import definitions._ - import dotty.tools.dotc._ + import definitions.* + import dotty.tools.dotc.* import ast.tpd import core.{Types, Symbols, Contexts} import util.{Positions} diff --git a/tests/pos/6709.scala b/tests/pos/6709.scala index 1833459efff5..038cbcab8957 100644 --- a/tests/pos/6709.scala +++ b/tests/pos/6709.scala @@ -51,7 +51,7 @@ object Main { case Even[N <: BinNat](n: N) } - import BinNat._ + import BinNat.* type Inc[N <: BinNat] <: BinNat = N match { diff --git a/tests/pos/Iter2.scala b/tests/pos/Iter2.scala index ff4ab32e0c21..c61b1e190012 100644 --- a/tests/pos/Iter2.scala +++ b/tests/pos/Iter2.scala @@ -163,7 +163,7 @@ object Iter2 { } case class ArrayIterator[+A](elems: Array[AnyRef], len: Int) extends Iterator[A] { - import ArrayIterator._ + import ArrayIterator.* private def elem(i: Int) = elems(i).asInstanceOf[A] diff --git a/tests/pos/Meter.scala b/tests/pos/Meter.scala index 321047b0215f..842454ffede9 100644 --- a/tests/pos/Meter.scala +++ b/tests/pos/Meter.scala @@ -46,8 +46,8 @@ package b { protected def proprint = Console.print("<<<") } } -import a._ -import _root_.b._ +import a.* +import _root_.b.* object Test extends App { { diff --git a/tests/pos/Monoid.scala b/tests/pos/Monoid.scala index f6004cdf319f..54b15677ca5f 100644 --- a/tests/pos/Monoid.scala +++ b/tests/pos/Monoid.scala @@ -49,7 +49,7 @@ object Test { } import Monoid.ops._ // works in dotty, fails in scalac - import Ring.ops._ + import Ring.ops.* "abc" |+| "def" "abc" |+| StringMonoid.id StringMonoid.id |+| "abc" diff --git a/tests/pos/StringContext.scala b/tests/pos/StringContext.scala index 1fcfd01522a2..e473225a79c3 100644 --- a/tests/pos/StringContext.scala +++ b/tests/pos/StringContext.scala @@ -12,7 +12,7 @@ package scala -import java.lang.{ StringBuilder => JLSBuilder } +import java.lang.StringBuilder as JLSBuilder import scala.annotation.tailrec /** This class provides the basic mechanism to do String Interpolation. @@ -56,7 +56,7 @@ import scala.annotation.tailrec */ case class StringContext(parts: String*) { - import StringContext.{checkLengths => scCheckLengths, glob, standardInterpolator => scStandardInterpolator} + import StringContext.{checkLengths as scCheckLengths, glob, standardInterpolator as scStandardInterpolator} @deprecated("use same-named method on StringContext companion object", "2.13.0") def checkLengths(args: scala.collection.Seq[Any]): Unit = scCheckLengths(args, parts) diff --git a/tests/pos/X.scala b/tests/pos/X.scala index da85d901ec59..ce5fcb547bbf 100644 --- a/tests/pos/X.scala +++ b/tests/pos/X.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* trait FunctorK[F[_[_]]] object FunctorK { diff --git a/tests/pos/assignments.scala b/tests/pos/assignments.scala index 9801bdca22e3..df7d286e6ba2 100644 --- a/tests/pos/assignments.scala +++ b/tests/pos/assignments.scala @@ -19,7 +19,7 @@ object assignments { c.x *= 2 val cc = c - import cc._ + import cc.* x = x + 1 x *= 2 } diff --git a/tests/pos/bigint.scala b/tests/pos/bigint.scala index e1aaaf96ecf8..4f5661a48e35 100644 --- a/tests/pos/bigint.scala +++ b/tests/pos/bigint.scala @@ -1,5 +1,5 @@ import scala.math.BigInt -//import BigInt._ +//import BigInt.* object test { 1 * BigInt(0) diff --git a/tests/pos/byname-implicits-13.scala b/tests/pos/byname-implicits-13.scala index abe4f47c0e05..92782fd03eaf 100644 --- a/tests/pos/byname-implicits-13.scala +++ b/tests/pos/byname-implicits-13.scala @@ -179,7 +179,7 @@ object equal { def ===(y: T): Boolean = eqT.eqv(x, y) } - import GenericInstances._ + import GenericInstances.* implicit val EqLongInstance: Eq[Long] = new Eq[Long] { def eqv(x: Long, y: Long): Boolean = x == y } implicit val EqDoubleInstance: Eq[Double] = new Eq[Double] { def eqv(x: Double, y: Double): Boolean = x == y } diff --git a/tests/pos/byname-implicits-14.scala b/tests/pos/byname-implicits-14.scala index cf1f2084df31..a428220ddf05 100644 --- a/tests/pos/byname-implicits-14.scala +++ b/tests/pos/byname-implicits-14.scala @@ -179,7 +179,7 @@ object equal { def ===(y: T): Boolean = eqT.eqv(x, y) } - import GenericInstances._ + import GenericInstances.* implicit val EqLongInstance: Eq[Long] = new Eq[Long] { def eqv(x: Long, y: Long): Boolean = x == y } implicit val EqDoubleInstance: Eq[Double] = new Eq[Double] { def eqv(x: Double, y: Double): Boolean = x == y } diff --git a/tests/pos/byname-implicits-9.scala b/tests/pos/byname-implicits-9.scala index 217852cd4085..2f810ca4805d 100644 --- a/tests/pos/byname-implicits-9.scala +++ b/tests/pos/byname-implicits-9.scala @@ -68,6 +68,6 @@ object Show { } object Test { - import ListInstances._ + import ListInstances.* implicitly[Show[List[Int]]] } diff --git a/tests/pos/collectGenericCC.scala b/tests/pos/collectGenericCC.scala index ba19d78d065d..66f30e93979f 100644 --- a/tests/pos/collectGenericCC.scala +++ b/tests/pos/collectGenericCC.scala @@ -1,4 +1,4 @@ -import scala.collection._ +import scala.collection.* object Test { def collect[A, Res](r: Iterable[A])(implicit bf: Factory[A, Res]) = { diff --git a/tests/pos/consume.scala b/tests/pos/consume.scala index d17638bb84a0..5b911d50528e 100644 --- a/tests/pos/consume.scala +++ b/tests/pos/consume.scala @@ -5,8 +5,8 @@ object Test1: object Test2 { import scala.math.Numeric - import scala.math.Numeric.Implicits._ - import scala.math.Ordering.Implicits._ + import scala.math.Numeric.Implicits.* + import scala.math.Ordering.Implicits.* def consume[T: Numeric](xs: List[T], limit: T): List[T] = val zero = implicitly[Numeric[T]].zero diff --git a/tests/pos/depmet_implicit_norm_ret.scala b/tests/pos/depmet_implicit_norm_ret.scala index 9582fe871495..13e253991111 100644 --- a/tests/pos/depmet_implicit_norm_ret.scala +++ b/tests/pos/depmet_implicit_norm_ret.scala @@ -17,7 +17,7 @@ object Test{ } } - import ZipWith._ + import ZipWith.* trait ZipWith[S] { type T diff --git a/tests/pos/elidable-tparams.scala b/tests/pos/elidable-tparams.scala index d65478bcb73e..8c0377e0813d 100644 --- a/tests/pos/elidable-tparams.scala +++ b/tests/pos/elidable-tparams.scala @@ -1,5 +1,5 @@ -import annotation._ -import elidable._ +import annotation.* +import elidable.* class ElidableCrashTest { trait My diff --git a/tests/pos/enum-List-control.scala b/tests/pos/enum-List-control.scala index dbe4b2a48f42..0810f9d09bf8 100644 --- a/tests/pos/enum-List-control.scala +++ b/tests/pos/enum-List-control.scala @@ -19,7 +19,7 @@ object List { } } object Test { - import List._ + import List.* val xs = Cons(1, Cons(2, Cons(3, Nil()))) def main(args: Array[String]) = println(xs) } diff --git a/tests/pos/enum-widen.scala b/tests/pos/enum-widen.scala index 32bbcf9a3242..47f3a915d502 100644 --- a/tests/pos/enum-widen.scala +++ b/tests/pos/enum-widen.scala @@ -4,7 +4,7 @@ object test: case Some[T](x: T) extends Option[T] case None - import Option._ + import Option.* var x = Some(1) val y: Some[Int] = Some(2) @@ -16,6 +16,6 @@ object test: enum Nat: case Z case S[N <: Z.type | S[_]](pred: N) - import Nat._ + import Nat.* val two = S(S(Z)) diff --git a/tests/pos/gadt-infer-ascription.scala b/tests/pos/gadt-infer-ascription.scala index 773b1ee17eca..6a3b01fc8325 100644 --- a/tests/pos/gadt-infer-ascription.scala +++ b/tests/pos/gadt-infer-ascription.scala @@ -5,7 +5,7 @@ object GadtAscription { case S[G, A, B](x: Var[G, A]) extends Var[(B, G), A] } - import Var._ + import Var.* def evalVar[G, A](x: Var[G, A])(rho: G): A = x match { case _: Z[g, a] => rho(0) diff --git a/tests/pos/gadt-inference.scala b/tests/pos/gadt-inference.scala index e625e4823dc0..bf471ca9184d 100644 --- a/tests/pos/gadt-inference.scala +++ b/tests/pos/gadt-inference.scala @@ -3,7 +3,7 @@ object `gadt-inference` { case StrLit(s: String) extends Expr[String] case IntLit(i: Int) extends Expr[Int] } - import Expr._ + import Expr.* def eval[T](e: Expr[T]) = e match { diff --git a/tests/pos/gen-traversable-methods.scala b/tests/pos/gen-traversable-methods.scala index b59cd33c769b..34c96b86db17 100644 --- a/tests/pos/gen-traversable-methods.scala +++ b/tests/pos/gen-traversable-methods.scala @@ -1,7 +1,7 @@ -import collection._ +import collection.* diff --git a/tests/pos/i0239.scala b/tests/pos/i0239.scala index 0dfba7ea07bd..258c3c987adc 100644 --- a/tests/pos/i0239.scala +++ b/tests/pos/i0239.scala @@ -18,7 +18,7 @@ object test1 { def compute[A](implicit m: M[A]): A = ??? - import p._ + import p.* val v = compute val v1: String = v } diff --git a/tests/pos/i10116.scala b/tests/pos/i10116.scala index f6764b8c6433..9c549b1c105c 100644 --- a/tests/pos/i10116.scala +++ b/tests/pos/i10116.scala @@ -8,7 +8,7 @@ object OverloadedWithLong { object Test { def main(args: Array[String]): Unit = - import OverloadedWithLong._ + import OverloadedWithLong.* val l: Any = 0 :: Nil val r = overloaded(l match { diff --git a/tests/pos/i10295.scala b/tests/pos/i10295.scala index 8fc237e2e853..902fc4626dd4 100644 --- a/tests/pos/i10295.scala +++ b/tests/pos/i10295.scala @@ -10,7 +10,7 @@ def doSomething(body: M ?=> Unit) = body(using new M{}) def Test1 = given M = new M{} - import m._ + import m.* val x: X = X.foo() println(x) @@ -30,7 +30,7 @@ def Test2 = doSomething { // not ideal val myM = m // or summon[M] - import myM._ + import myM.* val x: X = X.foo() println(x) } diff --git a/tests/pos/i10311.scala b/tests/pos/i10311.scala index bfa0c15f3493..561ec525899a 100644 --- a/tests/pos/i10311.scala +++ b/tests/pos/i10311.scala @@ -8,7 +8,7 @@ object Module { } } object test: - import Module._ + import Module.* val a = new MyInt(42, 43) val b = a.x diff --git a/tests/pos/i1045.scala b/tests/pos/i1045.scala index f0cf1df90f8a..ceeea15d7ab5 100644 --- a/tests/pos/i1045.scala +++ b/tests/pos/i1045.scala @@ -1,4 +1,4 @@ -import scala.collection._ +import scala.collection.* object EmptyHashMap extends mutable.HashMap[Nothing, Nothing] object T { diff --git a/tests/pos/i10511.scala b/tests/pos/i10511.scala index 386899d047a7..3bc69123e040 100644 --- a/tests/pos/i10511.scala +++ b/tests/pos/i10511.scala @@ -3,7 +3,7 @@ enum Bool { case False } -import Bool._ +import Bool.* type Not[B <: Bool] = B match { case True.type => False.type diff --git a/tests/pos/i10769.scala b/tests/pos/i10769.scala index 5c63d2c807d0..cc5299ee406a 100644 --- a/tests/pos/i10769.scala +++ b/tests/pos/i10769.scala @@ -1,7 +1,7 @@ package stm trait STMLike[F[_]] { - import Internals._ + import Internals.* sealed abstract class Txn[+A] {} diff --git a/tests/pos/i10769b.scala b/tests/pos/i10769b.scala index 2e097460b5bf..28b2a174c891 100644 --- a/tests/pos/i10769b.scala +++ b/tests/pos/i10769b.scala @@ -1,7 +1,7 @@ package stm trait STMLike[F[_]] { - import Internals._ + import Internals.* sealed abstract class Txn[+A] {} diff --git a/tests/pos/i10964a.scala b/tests/pos/i10964a.scala index 55ba1a47d266..98ea22f4f098 100644 --- a/tests/pos/i10964a.scala +++ b/tests/pos/i10964a.scala @@ -57,7 +57,7 @@ object Ref { class Resource[F[_], A] { - import ApplicativeSyntax._ + import ApplicativeSyntax.* implicit def asyncForResource[F[_]](implicit F0: Async[F]): Async[[X] =>> Resource[F, X]] = ??? diff --git a/tests/pos/i11128-wildcard.scala b/tests/pos/i11128-wildcard.scala index 97323e584e85..965e5b20ec8d 100644 --- a/tests/pos/i11128-wildcard.scala +++ b/tests/pos/i11128-wildcard.scala @@ -10,6 +10,6 @@ object Outer { } -import Outer._ +import Outer.* val wrapBar = new Wrap.Bar() diff --git a/tests/pos/i1137-2/B_2.scala b/tests/pos/i1137-2/B_2.scala index 9a3b013d38fb..dd099ac52092 100644 --- a/tests/pos/i1137-2/B_2.scala +++ b/tests/pos/i1137-2/B_2.scala @@ -1,4 +1,4 @@ object B { - import ATest._ + import ATest.* def foo: A = new A(1) } diff --git a/tests/pos/i1174.scala b/tests/pos/i1174.scala index 5875a38adf24..c9aa05521524 100644 --- a/tests/pos/i1174.scala +++ b/tests/pos/i1174.scala @@ -1,5 +1,5 @@ import scala.reflect.ClassTag -import scala.util._ +import scala.util.* object Main { class A diff --git a/tests/pos/i1202b.scala b/tests/pos/i1202b.scala index 09d06170feee..88b865e334af 100644 --- a/tests/pos/i1202b.scala +++ b/tests/pos/i1202b.scala @@ -1,7 +1,7 @@ package i1202 class Test() { - import Test._ + import Test.* val myStatus = Unknown } object Test { diff --git a/tests/pos/i1753.scala b/tests/pos/i1753.scala index e5ad743aaac8..4e8b961ca073 100644 --- a/tests/pos/i1753.scala +++ b/tests/pos/i1753.scala @@ -13,8 +13,8 @@ trait BCodeIdiomatic { } trait BCodeSkelBuilder extends BCodeIdiomatic { - import int._ - import bTypes._ + import int.* + import bTypes.* val b: BTypesFromSymbols[int.type] = bTypes val x: int.type = bTypes.int val y: bTypes.int.type = int diff --git a/tests/pos/i1777.scala b/tests/pos/i1777.scala index 381ff9139a1c..9602511b815f 100644 --- a/tests/pos/i1777.scala +++ b/tests/pos/i1777.scala @@ -1,5 +1,5 @@ object Main extends App { - import scala.collection.immutable._ + import scala.collection.immutable.* case class Foo(s: String) { implicit val orderingS: Ordering[String] = Ordering[String] // Crash diff --git a/tests/pos/i1857.scala b/tests/pos/i1857.scala index 635612104fc3..cdf22dac519c 100644 --- a/tests/pos/i1857.scala +++ b/tests/pos/i1857.scala @@ -26,7 +26,7 @@ trait FooDSL extends CommandeerDSL[Foo] { } object RunMe { - //import Foo._ + //import Foo.* def main(args: Array[String]): Unit = { println("Hi Mum") diff --git a/tests/pos/i2112.scala b/tests/pos/i2112.scala index cebce7018dac..e9f43df2100a 100644 --- a/tests/pos/i2112.scala +++ b/tests/pos/i2112.scala @@ -1,4 +1,4 @@ -import scala.collection.JavaConverters._ +import scala.collection.JavaConverters.* object Test { def test(x: Any): Unit = { diff --git a/tests/pos/i2300.scala b/tests/pos/i2300.scala index b58e4921bb8f..a36993a5866c 100644 --- a/tests/pos/i2300.scala +++ b/tests/pos/i2300.scala @@ -18,7 +18,7 @@ object hlists { } object Test { - import hlists._ + import hlists.* val merged: HCons[Int,HCons[String,HNil]] = { HCons(42, HNil) merge HCons("foo", HNil) diff --git a/tests/pos/i2324.scala b/tests/pos/i2324.scala index b150334e6958..00d93df2e709 100644 --- a/tests/pos/i2324.scala +++ b/tests/pos/i2324.scala @@ -5,8 +5,8 @@ object B { def foo: Int = 2 } class C { - import A._ - import B._ + import A.* + import B.* def bar: Int = 4 diff --git a/tests/pos/i2397.scala b/tests/pos/i2397.scala index 20ad37abd7c2..9e64f4370a01 100644 --- a/tests/pos/i2397.scala +++ b/tests/pos/i2397.scala @@ -6,7 +6,7 @@ object Test { foo((new Foo[Int]: Foo[_])) } -import java.nio.file._ +import java.nio.file.* import java.util.stream.Collectors object Foo { diff --git a/tests/pos/i2551/test_2.scala b/tests/pos/i2551/test_2.scala index 73d4931ab2e0..91ebc5c9e579 100644 --- a/tests/pos/i2551/test_2.scala +++ b/tests/pos/i2551/test_2.scala @@ -1,4 +1,4 @@ -import scala.meta._ +import scala.meta.* object Test { val v = Version() diff --git a/tests/pos/i2554.scala b/tests/pos/i2554.scala index f8a77019c3fd..488adba5906a 100644 --- a/tests/pos/i2554.scala +++ b/tests/pos/i2554.scala @@ -11,7 +11,7 @@ object foo { } } object Test { - import foo._ + import foo.* implicit val shape: Shape[_ <: FlatShapeLevel, Int, Int, _] = null def hint = Shape.tuple2Shape(shape, shape) val hint2: foo.Shape[foo.FlatShapeLevel, (Int, Int), (Int, Int), _] = hint diff --git a/tests/pos/i2663.scala b/tests/pos/i2663.scala index 5c69eb5f7b4a..9803827e5208 100644 --- a/tests/pos/i2663.scala +++ b/tests/pos/i2663.scala @@ -6,7 +6,7 @@ enum Foo[T](x: T) { case Baz[S, T](y: String) extends Foo(y) with Tr } object Test { - import Foo._ + import Foo.* val bar: Foo[Boolean] = Bar(true) val bas: Foo[Int] = Bas(1) val bam: Foo[String] & Tr = Bam("") @@ -20,7 +20,7 @@ enum Foo2[S <: T, T](x1: S, x2: T) { case Baz[S, T](y: String) extends Foo2(y, y) with Tr } object Test2 { - import Foo2._ + import Foo2.* val bar: Foo2[Boolean, Boolean] = Bar(true) val bas: Foo2[Int, Int] = Bas(1) val bam: Foo2[String, String] & Tr = Bam("") diff --git a/tests/pos/i3607.scala b/tests/pos/i3607.scala index 8428f208e7c1..ff15e74b79bd 100644 --- a/tests/pos/i3607.scala +++ b/tests/pos/i3607.scala @@ -1,6 +1,6 @@ object A { implicit val x: Int = 1 } object Test1 { - import A.{x => y} + import A.x as y implicitly[Int] } diff --git a/tests/pos/i3669.scala b/tests/pos/i3669.scala index c785c4f6800e..f7a5c1fbd68a 100644 --- a/tests/pos/i3669.scala +++ b/tests/pos/i3669.scala @@ -1,4 +1,4 @@ -import java.nio.file._ +import java.nio.file.* class Test { def test(xs: Array[String]) = { diff --git a/tests/pos/i3917.scala b/tests/pos/i3917.scala index 19fd1506d69b..ad31fa58200d 100644 --- a/tests/pos/i3917.scala +++ b/tests/pos/i3917.scala @@ -17,11 +17,11 @@ object C extends A { this.a = true C.this.a = true - import B._ + import B.* b = true val c0 = new C - import c0._ + import c0.* c = true } } diff --git a/tests/pos/i3976.scala b/tests/pos/i3976.scala index a17738903115..7520830d6441 100644 --- a/tests/pos/i3976.scala +++ b/tests/pos/i3976.scala @@ -3,7 +3,7 @@ object Test { case A extends Hoge[List] case B extends Hoge[[X] =>> String] } - import Hoge._ + import Hoge.* A == A A == (B: Hoge[_]) diff --git a/tests/pos/i4176-gadt.scala b/tests/pos/i4176-gadt.scala index 4d17b4e39c64..d61f3eb137c5 100644 --- a/tests/pos/i4176-gadt.scala +++ b/tests/pos/i4176-gadt.scala @@ -8,7 +8,7 @@ object i4176 { case class TSumZero[N]() extends TSum[TZero, N, N] case class TSumM[M <: TNat, N, R <: TNat](sum: TSum[M, N, R]) extends TSum[TSucc[M], N, TSucc[R]] } - import TNatSum._ + import TNatSum.* implicit def tSumZero[N]: TSum[TZero, N, N] = TSumZero() diff --git a/tests/pos/i4188/Test_2.scala b/tests/pos/i4188/Test_2.scala index 7ddd1be426ba..c32fb11cab11 100644 --- a/tests/pos/i4188/Test_2.scala +++ b/tests/pos/i4188/Test_2.scala @@ -1,6 +1,6 @@ package collections -import decorators._ +import decorators.* object Test { def test(map: Map[Int, String]) = { diff --git a/tests/pos/i4188/collections_1.scala b/tests/pos/i4188/collections_1.scala index b4ef92d5700a..f5e8d8e3b383 100644 --- a/tests/pos/i4188/collections_1.scala +++ b/tests/pos/i4188/collections_1.scala @@ -4,7 +4,7 @@ object collections { type AnyConstr[X] = Any } -import collections._ +import collections.* trait Iterable[+A] extends IterableOps[A, Iterable, Iterable[A]] diff --git a/tests/pos/i4449.scala b/tests/pos/i4449.scala index 29325a202cc2..43337e4204d7 100644 --- a/tests/pos/i4449.scala +++ b/tests/pos/i4449.scala @@ -1,7 +1,7 @@ class TreeAccumulator2 { def foo(reflect: Reflection2)(tree: Any): Unit = { - import reflect._ + import reflect.* tree match { case A() => case B() => diff --git a/tests/pos/i5498-postfixOps.scala b/tests/pos/i5498-postfixOps.scala index b2634649509d..f890f4d2c8f1 100644 --- a/tests/pos/i5498-postfixOps.scala +++ b/tests/pos/i5498-postfixOps.scala @@ -1,4 +1,4 @@ -import scala.concurrent.duration._ +import scala.concurrent.duration.* def test() = { // only OK since the defaultOptions in the TestConfiguration includes -language:postfixOps diff --git a/tests/pos/i5574.scala b/tests/pos/i5574.scala index 0ba236d8ec3e..1d98dd63ddf6 100644 --- a/tests/pos/i5574.scala +++ b/tests/pos/i5574.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object i5574 { class Box[F[_]] diff --git a/tests/pos/i5588a.scala b/tests/pos/i5588a.scala index 06aeb3c8d9e1..4e02285371a2 100644 --- a/tests/pos/i5588a.scala +++ b/tests/pos/i5588a.scala @@ -12,7 +12,7 @@ object TestMain { } def testExtensionProperty(): Unit = { - import fooExt._ + import fooExt.* val foo = Foo("initVal") assert(foo.fooExt == "initVal") foo.fooExt = "updatedVal" diff --git a/tests/pos/i5588b.scala b/tests/pos/i5588b.scala index 97940677f5d7..8b4d90a8a38e 100644 --- a/tests/pos/i5588b.scala +++ b/tests/pos/i5588b.scala @@ -12,7 +12,7 @@ object TestMain2 { } def testExtensionProperty(): Unit = { - //import fooExt._ + //import fooExt.* val foo = Foo("initVal") assert(foo.fooExt == "initVal") foo.fooExt = "updatedVal" diff --git a/tests/pos/i5793/B.scala b/tests/pos/i5793/B.scala index a2f0f96c6f7e..b48af30f7429 100644 --- a/tests/pos/i5793/B.scala +++ b/tests/pos/i5793/B.scala @@ -1,6 +1,6 @@ object Main{ def main(args: Array[String]): Unit = { - import exec._ + import exec.* Runner.run(Some(5)) } } diff --git a/tests/pos/i5978.scala b/tests/pos/i5978.scala index 57dda97267a9..630a0ec4ea6c 100644 --- a/tests/pos/i5978.scala +++ b/tests/pos/i5978.scala @@ -21,7 +21,7 @@ package p1 { object Testcase { def main(args: Array[String]): Unit = { - import TextParser.{given, _} + import TextParser.{given, *} val tp_v: TokenParser[Char, Position[CharSequence]] = TextParser.TP val tp_i = summon[TokenParser[Char, Position[CharSequence]]] @@ -45,7 +45,7 @@ package p2 { object Testcase { def main(args: Array[String]): Unit = { - import TextParser.{given, _} + import TextParser.{given, *} val tp_v: TokenParser[Char, Position[CharSequence]] = TextParser.TP val tp_i = summon[TokenParser[Char, Position[CharSequence]]] diff --git a/tests/pos/i6014-gadt.scala b/tests/pos/i6014-gadt.scala index 82d4ab499e04..b5262c0652b9 100644 --- a/tests/pos/i6014-gadt.scala +++ b/tests/pos/i6014-gadt.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test1 { type Foo[F[_]] diff --git a/tests/pos/i6015.scala b/tests/pos/i6015.scala index 337aaf8bfdea..79041785cfd3 100644 --- a/tests/pos/i6015.scala +++ b/tests/pos/i6015.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { implicit val i: Int = 23 diff --git a/tests/pos/i6151/Test.scala b/tests/pos/i6151/Test.scala index d04385bb6b93..314cf5a0ea8f 100644 --- a/tests/pos/i6151/Test.scala +++ b/tests/pos/i6151/Test.scala @@ -1,3 +1,3 @@ -import Expect._ +import Expect.* @Outcome(ExpectVal) class SimpleTest diff --git a/tests/pos/i6238.scala b/tests/pos/i6238.scala index 9cd6d56d95ed..f4a56bccd888 100644 --- a/tests/pos/i6238.scala +++ b/tests/pos/i6238.scala @@ -95,27 +95,27 @@ object K2 { object Test { { - import K1._ + import K1.* implicitly[Bar[A]] } { - import K1U._ + import K1U.* implicitly[Bar[A]] } { - import K1L._ + import K1L.* implicitly[Bar[A]] } { - import K11._ + import K11.* implicitly[Bar[A]] } { - import K2._ + import K2.* implicitly[Bar[A]] } } diff --git a/tests/pos/i6507b.scala b/tests/pos/i6507b.scala index 95ef9230d8e4..447423e5c261 100644 --- a/tests/pos/i6507b.scala +++ b/tests/pos/i6507b.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { transparent inline def summonValues[T]: Tuple = inline erasedValue[T] match { diff --git a/tests/pos/i6665/Bad_2.scala b/tests/pos/i6665/Bad_2.scala index d835d90af673..81e5c6945d0c 100644 --- a/tests/pos/i6665/Bad_2.scala +++ b/tests/pos/i6665/Bad_2.scala @@ -1,4 +1,4 @@ package foo -import foo._ +import foo.* object A extends Oops object B extends Oops diff --git a/tests/pos/i6693.scala b/tests/pos/i6693.scala index 7d57950f5ef8..c0cfc1aec598 100644 --- a/tests/pos/i6693.scala +++ b/tests/pos/i6693.scala @@ -1,6 +1,6 @@ package towers.computes -import quoted._ +import quoted.* sealed abstract class Computes[T] diff --git a/tests/pos/i6989/Container_1.scala b/tests/pos/i6989/Container_1.scala index 3495bfd50169..2ae33a07ceba 100644 --- a/tests/pos/i6989/Container_1.scala +++ b/tests/pos/i6989/Container_1.scala @@ -7,6 +7,6 @@ object Container { } trait Container { - import Container._ + import Container.* implicit def mkStringExtras(s: String): StringExtras = new StringExtras(s) } \ No newline at end of file diff --git a/tests/pos/i7041.scala b/tests/pos/i7041.scala index 32bafa304dfb..458814e3f622 100644 --- a/tests/pos/i7041.scala +++ b/tests/pos/i7041.scala @@ -1,4 +1,4 @@ -import scala.util.control.NonLocalReturns._ +import scala.util.control.NonLocalReturns.* extension [T, E <: Throwable](op: => T) inline def rescue (fallback: PartialFunction[E, T]) = diff --git a/tests/pos/i7159.scala b/tests/pos/i7159.scala index a06d9e0d0eb1..55b3cf56b053 100644 --- a/tests/pos/i7159.scala +++ b/tests/pos/i7159.scala @@ -9,7 +9,7 @@ class Reflect(val internal: CompilerInterface) { object App { val refl: Reflect = ??? - import refl._ + import refl.* show(??? : Tree22) } \ No newline at end of file diff --git a/tests/pos/i7467.scala b/tests/pos/i7467.scala index 6ddee908eaee..03dbeaaa0595 100644 --- a/tests/pos/i7467.scala +++ b/tests/pos/i7467.scala @@ -1,5 +1,5 @@ -import javax.swing._ -import java.awt._ +import javax.swing.* +import java.awt.* class DuplicateSymbolError_DirectSuperclass extends DefaultListCellRenderer() { override def getListCellRendererComponent(list: JList[_ <: Object], value: Object, index: Int, isSelected: Boolean, cellHasFocus: Boolean): Component = ??? diff --git a/tests/pos/i7477.scala b/tests/pos/i7477.scala index 67d802dfa277..af95b7d5c84d 100644 --- a/tests/pos/i7477.scala +++ b/tests/pos/i7477.scala @@ -7,10 +7,10 @@ class Test1 { } package X { - import scala.concurrent._ - import scala.concurrent.duration._ + import scala.concurrent.* + import scala.concurrent.duration.* - import scala.concurrent.ExecutionContext.Implicits._ + import scala.concurrent.ExecutionContext.Implicits.* class Test1 { diff --git a/tests/pos/i7711/crash2_1.scala b/tests/pos/i7711/crash2_1.scala index f7d02ecff033..f1abde733655 100644 --- a/tests/pos/i7711/crash2_1.scala +++ b/tests/pos/i7711/crash2_1.scala @@ -1,7 +1,7 @@ package listV //import reflect.Selectable.reflectiveSelectable -import scalaLibV._ +import scalaLibV.* object sci { val isEmpty = iftTrue diff --git a/tests/pos/i7711/crash2_2.scala b/tests/pos/i7711/crash2_2.scala index f41585fd7110..aeadaa82f153 100644 --- a/tests/pos/i7711/crash2_2.scala +++ b/tests/pos/i7711/crash2_2.scala @@ -1,7 +1,7 @@ package listV //import reflect.Selectable.reflectiveSelectable -import scalaLibV._ +import scalaLibV.* object sci { val isEmpty = iftTrue // 1nd try diff --git a/tests/pos/i7876.scala b/tests/pos/i7876.scala index 4179bba1ef9b..48a8704abebb 100644 --- a/tests/pos/i7876.scala +++ b/tests/pos/i7876.scala @@ -1,6 +1,6 @@ object foo object bar -import foo._, bar._ +import foo._, bar.* object eq diff --git a/tests/pos/i801.scala b/tests/pos/i801.scala index 4d8df7f03061..eb6198d9dde8 100644 --- a/tests/pos/i801.scala +++ b/tests/pos/i801.scala @@ -1,9 +1,9 @@ object T1 { - import java.util.ArrayList, java.util.stream.{Stream => JStream} + import java.util.ArrayList, java.util.stream.Stream as JStream new java.util.ArrayList[String]().stream.map(_.toInt).map(_.toString): JStream[String] } object T2 { - import java.util._, java.util.stream.{Stream => JStream} + import java.util._, java.util.stream.Stream as JStream def f: JStream[String] = new java.util.ArrayList[String](Arrays.asList("1", "2")).stream.map(_.toInt).map(_.toString) } diff --git a/tests/pos/i8344-1.scala b/tests/pos/i8344-1.scala index deb546dfa663..92b393da2497 100644 --- a/tests/pos/i8344-1.scala +++ b/tests/pos/i8344-1.scala @@ -1,4 +1,4 @@ -import scala.{Tuple => STuple} +import scala.Tuple as STuple enum Datatype[T] { case Tuple[T <: STuple](elems: STuple.Map[T, Datatype]) extends Datatype[T] diff --git a/tests/pos/i8449.scala b/tests/pos/i8449.scala index 772e3c2c47f1..e96801554e5c 100644 --- a/tests/pos/i8449.scala +++ b/tests/pos/i8449.scala @@ -1,5 +1,5 @@ -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* object Test { type Fib[N <: Int] <: Int = N match { diff --git a/tests/pos/i884.scala b/tests/pos/i884.scala index 29e53b9be152..2369e8a86dda 100644 --- a/tests/pos/i884.scala +++ b/tests/pos/i884.scala @@ -1,4 +1,4 @@ -import scala.reflect._ +import scala.reflect.* object `package` { } diff --git a/tests/pos/i9052/A.scala b/tests/pos/i9052/A.scala index 1ff6fa0df82e..8c6f6a68aae6 100644 --- a/tests/pos/i9052/A.scala +++ b/tests/pos/i9052/A.scala @@ -1,6 +1,6 @@ object impl: case object UNone -import impl._ +import impl.* opaque type UOption[+A] = (A | UNone.type) // error: Cyclic Reference involving UOption diff --git a/tests/pos/i9228.scala b/tests/pos/i9228.scala index a875e79c8b17..6e447dc3be47 100644 --- a/tests/pos/i9228.scala +++ b/tests/pos/i9228.scala @@ -7,7 +7,7 @@ object ABug { def gtoll(using g: Graph): List[List[g.Node]] = ??? object graph extends Graph - import graph._ + import graph.* given graph.type = graph val osq: List[List[Node]] = gtoll diff --git a/tests/pos/i9780.scala b/tests/pos/i9780.scala index f7670e05b845..0cdac95b00e1 100644 --- a/tests/pos/i9780.scala +++ b/tests/pos/i9780.scala @@ -1,5 +1,5 @@ import java.awt.event.WindowEvent -import java.awt.{Window => AWTWindow} +import java.awt.Window as AWTWindow abstract class Window { def peer: AWTWindow with InterfaceMixin diff --git a/tests/pos/i9992.scala b/tests/pos/i9992.scala index 1a7a9e519645..16b03ba13924 100644 --- a/tests/pos/i9992.scala +++ b/tests/pos/i9992.scala @@ -1,4 +1,4 @@ - import scala.concurrent._ + import scala.concurrent.* @main def test(): Unit = def test = () diff --git a/tests/pos/imp2-pos.scala b/tests/pos/imp2-pos.scala index 5460c600151d..214ff79a6e39 100644 --- a/tests/pos/imp2-pos.scala +++ b/tests/pos/imp2-pos.scala @@ -1,5 +1,5 @@ object Test { - import collection.mutable._ - import collection.mutable._ + import collection.mutable.* + import collection.mutable.* val x = new HashMap } diff --git a/tests/pos/implicit-infix-ops.scala b/tests/pos/implicit-infix-ops.scala index 9182893539be..2c53ae99dae9 100644 --- a/tests/pos/implicit-infix-ops.scala +++ b/tests/pos/implicit-infix-ops.scala @@ -1,22 +1,22 @@ object Test { - import Ordering.Implicits._ - import Numeric.Implicits._ + import Ordering.Implicits.* + import Numeric.Implicits.* def f1[T: Numeric](x: T, y: T, z: T) = x + y + z def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) } object Int { - import Ordering.Implicits._ - import math.Integral.Implicits._ + import Ordering.Implicits.* + import math.Integral.Implicits.* def f1[T: Integral](x: T, y: T, z: T) = (x + y + z) / z def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) } object Frac { - import Ordering.Implicits._ - import math.Fractional.Implicits._ + import Ordering.Implicits.* + import math.Fractional.Implicits.* def f1[T: Fractional](x: T, y: T, z: T) = (x + y + z) / z def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) diff --git a/tests/pos/implicit-match-and-inline-match.scala b/tests/pos/implicit-match-and-inline-match.scala index a985b788ccec..565082c71264 100644 --- a/tests/pos/implicit-match-and-inline-match.scala +++ b/tests/pos/implicit-match-and-inline-match.scala @@ -1,5 +1,5 @@ object `implicit-match-and-inline-match` { - import scala.compiletime._ + import scala.compiletime.* case class Box[T](value: T) implicit val ibox: Box[Int] = Box(0) diff --git a/tests/pos/import-rewrite/rewrite.scala b/tests/pos/import-rewrite/rewrite.scala index 0bda02c5e632..085853229720 100644 --- a/tests/pos/import-rewrite/rewrite.scala +++ b/tests/pos/import-rewrite/rewrite.scala @@ -1,5 +1,5 @@ package file -import java.io.{File => JFile, _}, StreamTokenizer.{TT_EOF => eof} +import java.io.{File as JFile, *}, StreamTokenizer.TT_EOF as eof object Main { Seq("").map(File.apply) diff --git a/tests/pos/inline-match-gadt-nested.scala b/tests/pos/inline-match-gadt-nested.scala index 1f8cc2b8233e..aac8017e763a 100644 --- a/tests/pos/inline-match-gadt-nested.scala +++ b/tests/pos/inline-match-gadt-nested.scala @@ -1,11 +1,11 @@ object `inline-match-gadt-nested` { - import scala.compiletime._ + import scala.compiletime.* enum Gadt[A, B] { case Nested(gadt: Gadt[A, Int]) extends Gadt[A, Int] case Simple extends Gadt[String, Int] } - import Gadt._ + import Gadt.* inline def foo[A, B](g: Gadt[A, B]): (A, B) = inline g match { diff --git a/tests/pos/inline-match-separate/inline-match-separate_2.scala b/tests/pos/inline-match-separate/inline-match-separate_2.scala index b2d43fceb3b1..1caf13578f31 100644 --- a/tests/pos/inline-match-separate/inline-match-separate_2.scala +++ b/tests/pos/inline-match-separate/inline-match-separate_2.scala @@ -1,4 +1,4 @@ -import Utils._ +import Utils.* object Test { val a = foo(new Box["a"]) diff --git a/tests/pos/inline-separate/Test_2.scala b/tests/pos/inline-separate/Test_2.scala index 2a7c012b3771..cf818be73c93 100644 --- a/tests/pos/inline-separate/Test_2.scala +++ b/tests/pos/inline-separate/Test_2.scala @@ -1,4 +1,4 @@ -import A._ +import A.* object Test extends App { class Foo(f: => Foo) inline implicit def foo(implicit f: => Foo): Foo = new Foo(summon[Foo]) diff --git a/tests/pos/inline-val-constValue-1.scala b/tests/pos/inline-val-constValue-1.scala index efd482cd5c09..1cb13c1e4f0f 100644 --- a/tests/pos/inline-val-constValue-1.scala +++ b/tests/pos/inline-val-constValue-1.scala @@ -1,4 +1,4 @@ -import compiletime._ +import compiletime.* class C: type X <: Tuple diff --git a/tests/pos/inline-val-constValue-2.scala b/tests/pos/inline-val-constValue-2.scala index 33ae23069fa2..d17e75717a9c 100644 --- a/tests/pos/inline-val-constValue-2.scala +++ b/tests/pos/inline-val-constValue-2.scala @@ -1,4 +1,4 @@ -import compiletime._ +import compiletime.* class C: type N <: Int diff --git a/tests/pos/javaConversions-2.10-ambiguity.scala b/tests/pos/javaConversions-2.10-ambiguity.scala index e92185bb4fb8..b5aea14e1578 100644 --- a/tests/pos/javaConversions-2.10-ambiguity.scala +++ b/tests/pos/javaConversions-2.10-ambiguity.scala @@ -1,6 +1,6 @@ import collection.{mutable, concurrent} -import collection.JavaConverters._ -import java.util.concurrent.{ConcurrentHashMap => CHM} +import collection.JavaConverters.* +import java.util.concurrent.ConcurrentHashMap as CHM object Bar { def assertType[T](t: T) = t diff --git a/tests/pos/mirror-implicit-scope.scala b/tests/pos/mirror-implicit-scope.scala index 392675688b77..a63b7cd1db83 100644 --- a/tests/pos/mirror-implicit-scope.scala +++ b/tests/pos/mirror-implicit-scope.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* object Test { object K0 { diff --git a/tests/pos/opaque-xm.scala b/tests/pos/opaque-xm.scala index fac02902d13d..9431bd59f8ed 100644 --- a/tests/pos/opaque-xm.scala +++ b/tests/pos/opaque-xm.scala @@ -1,4 +1,4 @@ -import Predef.{any2stringadd => _, _} +import Predef.{any2stringadd as _, *} object opaquetypes { opaque type Logarithm = Double @@ -22,7 +22,7 @@ object opaquetypes { } } object usesites { - import opaquetypes._ + import opaquetypes.* val l = Logarithm(1.0) val l2 = Logarithm(2.0) val l3 = l * l2 diff --git a/tests/pos/opaque.scala b/tests/pos/opaque.scala index 7eda1f527585..a691ad4b3d54 100644 --- a/tests/pos/opaque.scala +++ b/tests/pos/opaque.scala @@ -1,4 +1,4 @@ -import Predef.{any2stringadd => _, _} +import Predef.{any2stringadd as _, *} object opaquetypes { opaque type Logarithm = Double @@ -27,7 +27,7 @@ object opaquetypes { val LL: Logarithm = Logarithm(1) } object usesites { - import opaquetypes._ + import opaquetypes.* val l = Logarithm(1.0) val l2 = Logarithm(2.0) val l3 = l * l2 diff --git a/tests/pos/pat_iuli.scala b/tests/pos/pat_iuli.scala index 46356ff58812..49f0f456d9a2 100644 --- a/tests/pos/pat_iuli.scala +++ b/tests/pos/pat_iuli.scala @@ -7,7 +7,7 @@ trait Ops { self: MyCodes => } trait Blox { self: MyCodes => - import opcodes._ + import opcodes.* class Basick { var foo: Instru = null diff --git a/tests/pos/patmat.scala b/tests/pos/patmat.scala index f34c5d98336d..035464437671 100644 --- a/tests/pos/patmat.scala +++ b/tests/pos/patmat.scala @@ -38,7 +38,7 @@ object Test { case Some[T](value: T) extends Option[T] case None } - import Option._ + import Option.* val x: Option[String] = Some("abc") diff --git a/tests/pos/pos_valueclasses/paramlists.scala b/tests/pos/pos_valueclasses/paramlists.scala index b9252726fc55..8e4eb53aa6d7 100644 --- a/tests/pos/pos_valueclasses/paramlists.scala +++ b/tests/pos/pos_valueclasses/paramlists.scala @@ -23,7 +23,7 @@ object Test { m1.two2(11)(12) { - import m1._ + import m1.* zero zero2 diff --git a/tests/pos/range.scala b/tests/pos/range.scala index a33f7fcee19c..266dbf8602fe 100644 --- a/tests/pos/range.scala +++ b/tests/pos/range.scala @@ -1,4 +1,4 @@ -import scala.math._ +import scala.math.* import collection.immutable.NumericRange object Test { val r1: scala.collection.immutable.Range.Partial[_, _] = ??? diff --git a/tests/pos/reference/delegates.scala b/tests/pos/reference/delegates.scala index 88002d939330..2a1594192761 100644 --- a/tests/pos/reference/delegates.scala +++ b/tests/pos/reference/delegates.scala @@ -234,7 +234,7 @@ object Completions: given fromString : Conversion[String, CompletionArg] = Error(_) given fromFuture : Conversion[Future[HttpResponse], CompletionArg] = Response(_) given fromStatusCode: Conversion[Future[StatusCode], CompletionArg] = Status(_) - import CompletionArg._ + import CompletionArg.* def complete[T](arg: CompletionArg) = arg match case Error(s) => ??? diff --git a/tests/pos/reference/extension-methods.scala b/tests/pos/reference/extension-methods.scala index cf075b7f3cda..3dacf787a436 100644 --- a/tests/pos/reference/extension-methods.scala +++ b/tests/pos/reference/extension-methods.scala @@ -115,7 +115,7 @@ object ExtMethods: require(exponent > 0) if exponent == 0 then 1 else x * (x ** (exponent - 1)) - import DoubleOps.{**} + import DoubleOps.** assert(2.0 ** 3 == **(2.0)(3)) end ExtMethods \ No newline at end of file diff --git a/tests/pos/reference/inlines.scala b/tests/pos/reference/inlines.scala index 48fcf5b6e2b6..a1eb215b4d22 100644 --- a/tests/pos/reference/inlines.scala +++ b/tests/pos/reference/inlines.scala @@ -30,7 +30,7 @@ object Logger { } object Test{ - import Logger._ + import Logger.* var indentSetting = 2 diff --git a/tests/pos/reference/opaque.scala b/tests/pos/reference/opaque.scala index 47b3a273cb1f..4dd91dc06fe4 100644 --- a/tests/pos/reference/opaque.scala +++ b/tests/pos/reference/opaque.scala @@ -19,8 +19,8 @@ object Logarithms { } object LogTest { - import Logarithms._ - import Predef.{any2stringadd => _, _} + import Logarithms.* + import Predef.{any2stringadd as _, *} val l = Logarithm(1.0) val l2 = Logarithm(2.0) @@ -52,7 +52,7 @@ object Access { } object User { - import Access._ + import Access.* case class Item(rights: Permissions) diff --git a/tests/pos/reference/union-types.scala b/tests/pos/reference/union-types.scala index f9e7612e0570..4562a2462e4c 100644 --- a/tests/pos/reference/union-types.scala +++ b/tests/pos/reference/union-types.scala @@ -20,7 +20,7 @@ object t1 { } object t2 { - import t1._ + import t1.* trait Admin trait UserData diff --git a/tests/pos/renaming-imports.scala b/tests/pos/renaming-imports.scala new file mode 100644 index 000000000000..9419be1e9ff4 --- /dev/null +++ b/tests/pos/renaming-imports.scala @@ -0,0 +1,27 @@ +import java as j +import collection as c + +val x: j.io.IOException = ??? + +import c.mutable as mut +import mut.ArrayBuffer as Buf + +val y = Buf(1, 2, 3) + +object O: + type OString = String + def foo22(x: Int) = x + +class C: + import O.* + import foo22 as foo + import OString as OS + import scala.collection.Iterable + println(foo(22)) + val s: OS = "" + +def test = + import C as CC + println(C().s) + + diff --git a/tests/pos/sammy_poly.scala b/tests/pos/sammy_poly.scala index 3291493c52da..593f97638315 100644 --- a/tests/pos/sammy_poly.scala +++ b/tests/pos/sammy_poly.scala @@ -2,7 +2,7 @@ trait F1[T, U] { def apply(x: T): U } class T { - import T._ + import T.* // NOTE: the f(x) desugaring for now assumes the single abstract method is called 'apply' def app1[T, U](x: T)(f: F1[T, U]): U = f(x) def app2[T, U](x: T)(f: F2[T, U]): U = f(x) diff --git a/tests/pos/scala-days-2019-slides/metaprogramming-1-forset.scala b/tests/pos/scala-days-2019-slides/metaprogramming-1-forset.scala index 830e6bf3df9d..ab27285cc141 100644 --- a/tests/pos/scala-days-2019-slides/metaprogramming-1-forset.scala +++ b/tests/pos/scala-days-2019-slides/metaprogramming-1-forset.scala @@ -1,6 +1,6 @@ object ForSetExample { - import scala.collection.immutable._ + import scala.collection.immutable.* import scala.compiletime.summonFrom inline def setFor[T]: Set[T] = diff --git a/tests/pos/scala-days-2019-slides/metaprogramming-2-tuple.scala b/tests/pos/scala-days-2019-slides/metaprogramming-2-tuple.scala index cebfd1cf1d91..b20625cd12c9 100644 --- a/tests/pos/scala-days-2019-slides/metaprogramming-2-tuple.scala +++ b/tests/pos/scala-days-2019-slides/metaprogramming-2-tuple.scala @@ -1,5 +1,5 @@ object TupleExample { - import Tuple._ + import Tuple.* type A type B diff --git a/tests/pos/seq-ordering.scala b/tests/pos/seq-ordering.scala index 517d8ae8aafe..46cfcfb7311c 100644 --- a/tests/pos/seq-ordering.scala +++ b/tests/pos/seq-ordering.scala @@ -1,7 +1,7 @@ -import Ordering.Implicits._ +import Ordering.Implicits.* class A { - import Predef.{ implicitly => ? } + import Predef.implicitly as ? ?[Ordering[List[Int]]] ?[Ordering[IndexedSeq[(Int, String)]]] diff --git a/tests/pos/singleton-ops-composition.scala b/tests/pos/singleton-ops-composition.scala index 7cc2b93806fb..ed008726df21 100644 --- a/tests/pos/singleton-ops-composition.scala +++ b/tests/pos/singleton-ops-composition.scala @@ -1,5 +1,5 @@ -import scala.compiletime.ops.boolean._ -import scala.compiletime.ops.int.{^ => ^^,_} // must rename int.^ or get clash with boolean.^ +import scala.compiletime.ops.boolean.* +import scala.compiletime.ops.int.{^ as ^^,_} // must rename int.^ or get clash with boolean.^ object Test { val t0: 1 + 2 * 3 = 7 diff --git a/tests/pos/singleton-ops-dispatch.scala b/tests/pos/singleton-ops-dispatch.scala index 71278a375cc6..4a1c56515577 100644 --- a/tests/pos/singleton-ops-dispatch.scala +++ b/tests/pos/singleton-ops-dispatch.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops._ +import scala.compiletime.ops.* object Test { infix type +[X <: Int | String, Y <: Int | String] = (X, Y) match { diff --git a/tests/pos/singleton-ops-test-issue-8280.scala b/tests/pos/singleton-ops-test-issue-8280.scala index fd5a0ef54717..e57a07877cb5 100644 --- a/tests/pos/singleton-ops-test-issue-8280.scala +++ b/tests/pos/singleton-ops-test-issue-8280.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* import scala.compiletime.S class Foo[T <: Int] { diff --git a/tests/pos/singleton-ops-test-issue-8287.scala b/tests/pos/singleton-ops-test-issue-8287.scala index bc4595bf79a1..194ba860460d 100644 --- a/tests/pos/singleton-ops-test-issue-8287.scala +++ b/tests/pos/singleton-ops-test-issue-8287.scala @@ -1,4 +1,4 @@ -import scala.compiletime.ops.int._ +import scala.compiletime.ops.int.* object Test { class Vec[S <: Int] { diff --git a/tests/pos/spec-groups.scala b/tests/pos/spec-groups.scala index 9b6359a98256..02d240a539c0 100644 --- a/tests/pos/spec-groups.scala +++ b/tests/pos/spec-groups.scala @@ -1,4 +1,4 @@ -import Specializable._ +import Specializable.* class A[@specialized(Primitives) T](x: T) { def f1[@specialized(Primitives) U](x: T, y: U) = ((x, y)) diff --git a/tests/pos/spurious-overload.scala b/tests/pos/spurious-overload.scala index aae4c96329a2..ee3790b8c7dc 100644 --- a/tests/pos/spurious-overload.scala +++ b/tests/pos/spurious-overload.scala @@ -24,7 +24,7 @@ object Test extends App { } } - import lazyLib._ + import lazyLib.* val s: Susp[Int] = delay { println("evaluating..."); 3 } println("2 + s = " + (2 + s)) // implicit call to force() diff --git a/tests/pos/switch-small.scala b/tests/pos/switch-small.scala index 9de9ca028e46..f4705f9846b7 100644 --- a/tests/pos/switch-small.scala +++ b/tests/pos/switch-small.scala @@ -1,4 +1,4 @@ -import annotation._ +import annotation.* object Test { def f(x: Int) = (x: @switch) match { diff --git a/tests/pos/t0774/unrelated.scala b/tests/pos/t0774/unrelated.scala index 1efdb2505eac..7c1f5f79ff39 100644 --- a/tests/pos/t0774/unrelated.scala +++ b/tests/pos/t0774/unrelated.scala @@ -1,5 +1,5 @@ object Outer { - import Inner._ + import Inner.* deathname diff --git a/tests/pos/t11593/Test.scala b/tests/pos/t11593/Test.scala index 9ef8533b2942..6ad153bc1e14 100644 --- a/tests/pos/t11593/Test.scala +++ b/tests/pos/t11593/Test.scala @@ -1,5 +1,5 @@ package foo { - import java.util._ + import java.util.* object X { def bar(x: Properties): Unit = println(x.getClass.getName) bar(new Properties) diff --git a/tests/pos/t1500a.scala b/tests/pos/t1500a.scala index adf46329aaa2..de9db552938a 100644 --- a/tests/pos/t1500a.scala +++ b/tests/pos/t1500a.scala @@ -17,7 +17,7 @@ object Steps { } object StepsTest { - import Steps._ + import Steps.* implicitly[Step0] implicitly[Step1] diff --git a/tests/pos/t1987b/b.scala b/tests/pos/t1987b/b.scala index a469ca6ea87a..c2f1e1d97b4a 100644 --- a/tests/pos/t1987b/b.scala +++ b/tests/pos/t1987b/b.scala @@ -2,7 +2,7 @@ package bug.packageb // Note that the overloading works if instead of being in the package we import it: -// replace the above line with import bug.packageb._ +// replace the above line with import bug.packageb.* class Client { val x = func(1) // doesn't compile: type mismatch; found: Int(1) required: String diff --git a/tests/pos/t2133.scala b/tests/pos/t2133.scala index 02ef43c21907..529ac31f2699 100644 --- a/tests/pos/t2133.scala +++ b/tests/pos/t2133.scala @@ -11,8 +11,8 @@ trait Foo2 { } class Bob extends AnyRef with Foo with Foo2 { - import bip._ - import bar._ + import bip.* + import bar.* def go() = fn() } diff --git a/tests/pos/t2310.scala b/tests/pos/t2310.scala index 68912b496194..a1c3613735d0 100644 --- a/tests/pos/t2310.scala +++ b/tests/pos/t2310.scala @@ -1,4 +1,4 @@ -import scala.Stream._ +import scala.Stream.* object consistencyError { /* this gives an error: diff --git a/tests/pos/t2405.scala b/tests/pos/t2405.scala index cf06ed15dbe6..a993a852d9de 100644 --- a/tests/pos/t2405.scala +++ b/tests/pos/t2405.scala @@ -2,13 +2,13 @@ object A { implicit val x: Int = 1 } // Problem as stated in the ticket. object Test1 { - import A.{x => y} + import A.x as y implicitly[Int] } // Testing for the absence of shadowing #1. object Test2 { - import A.{x => y} + import A.x as y val x = 2 implicitly[Int] } @@ -16,7 +16,7 @@ object Test2 { // Testing for the absence of shadowing #2. object Test3 { { - import A.{x => y} + import A.x as y def x: Int = 0 implicitly[Int] } diff --git a/tests/pos/t2435.scala b/tests/pos/t2435.scala index f913b3bcae21..090294a5ac9b 100644 --- a/tests/pos/t2435.scala +++ b/tests/pos/t2435.scala @@ -17,7 +17,7 @@ object Bug { } object Test { - import Bug._ + import Bug.* println("Compiles:") val a1 = FNil.chain("a").chain("a") val a2 = a1.chain("a") diff --git a/tests/pos/t2500.scala b/tests/pos/t2500.scala index 4b02fe488c8d..e54a9e8bd3a7 100644 --- a/tests/pos/t2500.scala +++ b/tests/pos/t2500.scala @@ -1,5 +1,5 @@ object Test { - import scala.collection._ + import scala.collection.* ((Map(1 -> "a", 2 -> "b"): collection.Map[Int, String]) map identity[(Int, String)]) : scala.collection.Map[Int,String] ((SortedMap(1 -> "a", 2 -> "b"): collection.SortedMap[Int, String]) map identity[(Int, String)]): scala.collection.SortedMap[Int,String] ((SortedSet(1, 2): collection.SortedSet[Int]) map identity[Int]): scala.collection.SortedSet[Int] diff --git a/tests/pos/t2503.scala b/tests/pos/t2503.scala index 8dda45b2b760..fbe466368d88 100755 --- a/tests/pos/t2503.scala +++ b/tests/pos/t2503.scala @@ -1,4 +1,4 @@ -import scala.collection.mutable._ +import scala.collection.mutable.* trait SB[A] extends Buffer[A] { abstract override def insertAll(n: Int, iter: IterableOnce[A]): Unit = synchronized { diff --git a/tests/pos/t2698.scala b/tests/pos/t2698.scala index 497b4f21e68b..24b8bffc72d0 100644 --- a/tests/pos/t2698.scala +++ b/tests/pos/t2698.scala @@ -3,7 +3,7 @@ class WordExp { type _labelT <: Label } -import scala.collection._ +import scala.collection.* abstract class S2 { val lang: WordExp diff --git a/tests/pos/t2712-5.scala b/tests/pos/t2712-5.scala index ed96d4c06fcc..d80755d2a450 100644 --- a/tests/pos/t2712-5.scala +++ b/tests/pos/t2712-5.scala @@ -23,7 +23,7 @@ object Test { val f: Int => String = _.toString - import FunctorSyntax._ + import FunctorSyntax.* f.map((s: String) => s.reverse) } diff --git a/tests/pos/t2712-7.scala b/tests/pos/t2712-7.scala index d9c5243f132d..2d5edda438f5 100644 --- a/tests/pos/t2712-7.scala +++ b/tests/pos/t2712-7.scala @@ -8,7 +8,7 @@ object Xor { } object TestXor { - import Xor._ + import Xor.* def meh[F[_], A, B](fa: F[A])(f: A => B): F[B] = ??? meh(new Right(23): Xor[Boolean, Int])(_ < 13) meh(new Left(true): Xor[Boolean, Int])(_ < 13) diff --git a/tests/pos/t2741/2741_2.scala b/tests/pos/t2741/2741_2.scala index a9fd9d7d0ee1..a8097f8093b8 100644 --- a/tests/pos/t2741/2741_2.scala +++ b/tests/pos/t2741/2741_2.scala @@ -1,5 +1,5 @@ // object Test compiles jointly, but not separately. object Test { - import Scalaz._ + import Scalaz.* Scalaz.a } diff --git a/tests/pos/t2809.scala b/tests/pos/t2809.scala index 1e9ec60d2e86..a093c3a25f1f 100644 --- a/tests/pos/t2809.scala +++ b/tests/pos/t2809.scala @@ -4,7 +4,7 @@ package p1 { } } package p2 { // all being in the same package compiles fine - import p1._ + import p1.* abstract class T2 extends T1 { class A { bug() diff --git a/tests/pos/t3160.scala b/tests/pos/t3160.scala index cc007dc0148f..bd6c8651d942 100644 --- a/tests/pos/t3160.scala +++ b/tests/pos/t3160.scala @@ -1,4 +1,4 @@ -import scala.collection.mutable._ +import scala.collection.mutable.* class Node class A { diff --git a/tests/pos/t3177.scala b/tests/pos/t3177.scala index 12dfce6eea03..791329ba93b1 100644 --- a/tests/pos/t3177.scala +++ b/tests/pos/t3177.scala @@ -3,7 +3,7 @@ trait InvariantFunctor[F[_]] { } object InvariantFunctor { - import Endo._ + import Endo.* implicit val EndoInvariantFunctor: InvariantFunctor[Endo] = new InvariantFunctor[Endo] { def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b))) diff --git a/tests/pos/t3384.scala b/tests/pos/t3384.scala index 4d4a81d69d54..ec8dfb6eddcc 100644 --- a/tests/pos/t3384.scala +++ b/tests/pos/t3384.scala @@ -8,7 +8,7 @@ package object po { type A = p.A } -import po._ +import po.* class C { val a = new A() //p.A.init$default$1) } diff --git a/tests/pos/t3836.scala b/tests/pos/t3836.scala index 840f171164f9..d2d394e5ee70 100644 --- a/tests/pos/t3836.scala +++ b/tests/pos/t3836.scala @@ -5,8 +5,8 @@ package object bar { } package baz { - import java.io._ - import foo.bar._ + import java.io.* + import foo.bar.* object Test { def f = new IOException diff --git a/tests/pos/t4112.scala b/tests/pos/t4112.scala index ab0f36fdc4ab..5a8c8e19a7ca 100644 --- a/tests/pos/t4112.scala +++ b/tests/pos/t4112.scala @@ -1,6 +1,6 @@ -import collection.immutable._ +import collection.immutable.* diff --git a/tests/pos/t4524.scala b/tests/pos/t4524.scala index 4721a7d06773..ae5f05536eca 100644 --- a/tests/pos/t4524.scala +++ b/tests/pos/t4524.scala @@ -1,5 +1,5 @@ object test { - import A._ + import A.* class A(b: B = new A.B()) object A { class B diff --git a/tests/pos/t4760.scala b/tests/pos/t4760.scala index 039f08368070..374b8756eb36 100644 --- a/tests/pos/t4760.scala +++ b/tests/pos/t4760.scala @@ -9,10 +9,10 @@ class Test { // ^ // one error found def f2 = { - import scala._ + import scala.* } def f2b = { - import scala.collection.mutable.{ Map => MMap } + import scala.collection.mutable.Map as MMap } def f(): Unit = { locally { @@ -22,14 +22,14 @@ class Test { // parses def f3 = { - import scala._ + import scala.* 5 } locally { (x: Int) => - import scala.util._ + import scala.util.* } 1 match { - case 1 => import scala.concurrent._ + case 1 => import scala.concurrent.* } } diff --git a/tests/pos/t4911.scala b/tests/pos/t4911.scala index cfb3792ae49e..123d12285219 100644 --- a/tests/pos/t4911.scala +++ b/tests/pos/t4911.scala @@ -1,4 +1,4 @@ -import language._ +import language.* object Test { class Foo[T](val x: T) ; object Foo { def unapply[T](x: Foo[T]) = Some(x.x) } diff --git a/tests/pos/t4938.scala b/tests/pos/t4938.scala index 6e413128512a..e6f55bee411e 100644 --- a/tests/pos/t4938.scala +++ b/tests/pos/t4938.scala @@ -1,4 +1,4 @@ class A { - import scala.collection.mutable._ + import scala.collection.mutable.* val xs = List(Set(), Seq()) } diff --git a/tests/pos/t5070.scala b/tests/pos/t5070.scala index f55ee30f8b5c..b3dd44d177a6 100644 --- a/tests/pos/t5070.scala +++ b/tests/pos/t5070.scala @@ -7,7 +7,7 @@ object O { } class Test { - import O._ + import O.* implicit val a: A = new A {} implicitly[a.T] // works @@ -28,7 +28,7 @@ class ImplicitVsTypeAliasTezt { } def useMonad[m[_], a](m: m[a])(implicit i: Monad[m]) = { - import i._ + import i.* // value map is not a member of type parameter m[a] for { diff --git a/tests/pos/t522.scala b/tests/pos/t522.scala index 5798b7ee398b..e60627f8096f 100644 --- a/tests/pos/t522.scala +++ b/tests/pos/t522.scala @@ -6,7 +6,7 @@ object Util { def foo(s: String) = new foo(s) {} } -import imptwice.Util._ +import imptwice.Util.* object User { diff --git a/tests/pos/t5313.scala b/tests/pos/t5313.scala index 605e868793b5..94cee256a8dd 100644 --- a/tests/pos/t5313.scala +++ b/tests/pos/t5313.scala @@ -16,12 +16,12 @@ object DepBug { } def useDep(d : Dep): Unit = { - import d._ + import d.* a.m(b) // OK } { - import dep._ + import dep.* a.m(b) // OK with 2.9.1.final, error on trunk } diff --git a/tests/pos/t5577.scala b/tests/pos/t5577.scala index d2b2a7dcc32d..110822ea4969 100644 --- a/tests/pos/t5577.scala +++ b/tests/pos/t5577.scala @@ -1,7 +1,7 @@ -import collection._ +import collection.* diff --git a/tests/pos/t5639/Bar.scala b/tests/pos/t5639/Bar.scala index f577500acd04..7aba598f95f3 100644 --- a/tests/pos/t5639/Bar.scala +++ b/tests/pos/t5639/Bar.scala @@ -1,6 +1,6 @@ package pack.age -import pack.age.Implicits._ +import pack.age.Implicits.* object Quux { def baz : Baz = 1 diff --git a/tests/pos/t5829.scala b/tests/pos/t5829.scala index 84b450ab31f7..959868730fc6 100644 --- a/tests/pos/t5829.scala +++ b/tests/pos/t5829.scala @@ -11,7 +11,7 @@ trait Universe { object Test extends App { val universe: Universe = null - import universe._ + import universe.* def select: Select = ??? def ident: Ident = ??? List(select, ident) diff --git a/tests/pos/t5862.scala b/tests/pos/t5862.scala index e3006ddc3f7a..3d3090cba11c 100644 --- a/tests/pos/t5862.scala +++ b/tests/pos/t5862.scala @@ -23,7 +23,7 @@ trait WireFormat[A] class MapReduceJob { trait DataSource - import scala.collection.mutable.{ Set => MSet, Map => MMap } + import scala.collection.mutable.{ Set as MSet, Map as MMap } private val mappers: MMap[DataSource, MSet[TaggedMapper[_, _, _]]] = MMap.empty def addTaggedMapper[A, K, V](input: DataSource, m: TaggedMapper[A, K, V]): Unit = { diff --git a/tests/pos/t6117.scala b/tests/pos/t6117.scala index 6aca84f72c42..5193d5178c70 100644 --- a/tests/pos/t6117.scala +++ b/tests/pos/t6117.scala @@ -6,13 +6,13 @@ trait ImportMe { } class Test(val importMe: ImportMe) { - import importMe._ - import importMe._ + import importMe.* + import importMe.* // A.scala:12: error: reference to foo is ambiguous; // it is imported twice in the same scope by - // import importMe._ - // and import importMe._ + // import importMe.* + // and import importMe.* // println(foo(1)) // ^ println(foo(1)) diff --git a/tests/pos/t6146.scala b/tests/pos/t6146.scala index b5bde826b1c1..e2d1070110ec 100644 --- a/tests/pos/t6146.scala +++ b/tests/pos/t6146.scala @@ -15,7 +15,7 @@ trait AxisCompanion { } object Axis extends AxisCompanion class Axis { - import Axis._ + import Axis.* def test( f: Format ) = f match { case Format.Integer => "Int" // case Format.Time( hours, millis ) => "Time" @@ -47,7 +47,7 @@ object O1 extends T1[Any] { case object Shorty extends O1.O2.Format class Test1 { - import O1.O2._ + import O1.O2.* val FI: Format.Integer.type = Format.Integer def test( f: Format ) = { val ff: f.type = f diff --git a/tests/pos/t6225.scala b/tests/pos/t6225.scala index d3d30d9e16ef..ddf7f0214efa 100644 --- a/tests/pos/t6225.scala +++ b/tests/pos/t6225.scala @@ -15,6 +15,6 @@ object ko { } object ko2 { - import library.y._ + import library.y.* implicitly[Foo] } diff --git a/tests/pos/t6335.scala b/tests/pos/t6335.scala index 1c0b846be372..e636e0ab4a59 100644 --- a/tests/pos/t6335.scala +++ b/tests/pos/t6335.scala @@ -16,7 +16,7 @@ trait Z { } object Test { - import E._ + import E.* 0.xx "".yy diff --git a/tests/pos/t6780.scala b/tests/pos/t6780.scala index 4a358046c607..49c4301bc345 100644 --- a/tests/pos/t6780.scala +++ b/tests/pos/t6780.scala @@ -2,7 +2,7 @@ object O { implicit def i: Int = 0 } -import O._ +import O.* trait Foo { implicit val v1: Any diff --git a/tests/pos/t6963c.scala b/tests/pos/t6963c.scala index 80e8f11d9de5..baf356ab26b7 100644 --- a/tests/pos/t6963c.scala +++ b/tests/pos/t6963c.scala @@ -22,7 +22,7 @@ object Test { } def f5: Unit = { - import scala.collection.mutable._ + import scala.collection.mutable.* List(1,2,3,4,5).scanRight(0)(_+_) } } diff --git a/tests/pos/t7232/Test.scala b/tests/pos/t7232/Test.scala index 49c3c12aed02..697f1313f8ed 100644 --- a/tests/pos/t7232/Test.scala +++ b/tests/pos/t7232/Test.scala @@ -1,5 +1,5 @@ object Test { - import pack._ + import pack.* Foo.okay().size() Foo.wrong().size() } diff --git a/tests/pos/t7232c/Test.scala b/tests/pos/t7232c/Test.scala index aa7c71094839..3fedd2475670 100644 --- a/tests/pos/t7232c/Test.scala +++ b/tests/pos/t7232c/Test.scala @@ -1,4 +1,4 @@ object Test { - import pack._ + import pack.* Foo.innerList().isInnerList() } diff --git a/tests/pos/t7232d/Test.scala b/tests/pos/t7232d/Test.scala index 89a8063b3c17..f0c8d9d8895f 100644 --- a/tests/pos/t7232d/Test.scala +++ b/tests/pos/t7232d/Test.scala @@ -1,4 +1,4 @@ object Test { - import pack._ + import pack.* Foo.mapEntry().getKey() } diff --git a/tests/pos/t7233.scala b/tests/pos/t7233.scala index ae15c08c3569..5e785c02c95c 100644 --- a/tests/pos/t7233.scala +++ b/tests/pos/t7233.scala @@ -5,7 +5,7 @@ object Foo { def ol(i: String) = i } object Test { - import Foo.{ bar => quux, toString => bar, ol => olRenamed} + import Foo.{ bar as quux, toString as bar, ol as olRenamed} val f1 = quux _ val f1Typed: (Int => Int) = f1 diff --git a/tests/pos/t7233b.scala b/tests/pos/t7233b.scala index 927c7fcfd12f..62fb14959482 100644 --- a/tests/pos/t7233b.scala +++ b/tests/pos/t7233b.scala @@ -1,8 +1,8 @@ object Test { // crash - def foo(a: Any) = { import a.{toString => toS}; toS } + def foo(a: Any) = { import a.toString as toS; toS } // okay - def ok1(a: String) = { import a.{isInstanceOf => iio}; iio[String] } - def ok2(a: Int) = { import a.{toInt => ti}; ti } + def ok1(a: String) = { import a.isInstanceOf as iio; iio[String] } + def ok2(a: Int) = { import a.toInt as ti; ti } } diff --git a/tests/pos/t7285a.scala b/tests/pos/t7285a.scala index 23b52f5950bb..aa6f731ab294 100644 --- a/tests/pos/t7285a.scala +++ b/tests/pos/t7285a.scala @@ -80,7 +80,7 @@ object Test4 { } } - import Test4.Base._ + import Test4.Base.* locally { (d1: Base, d2: Base) => (d1, d2) match { diff --git a/tests/pos/t7532b/B_2.scala b/tests/pos/t7532b/B_2.scala index c4f15daf5c61..ee77dcb4935a 100644 --- a/tests/pos/t7532b/B_2.scala +++ b/tests/pos/t7532b/B_2.scala @@ -1,4 +1,4 @@ -import pack._ +import pack.* object Test { val r = new R diff --git a/tests/pos/t7690.scala b/tests/pos/t7690.scala index 4d88c334844a..fcefcd202c89 100644 --- a/tests/pos/t7690.scala +++ b/tests/pos/t7690.scala @@ -11,7 +11,7 @@ object C { def amethod(in: Int): Boolean = in.x { i => - import A._ + import A.* "asdf" == i.toString } } diff --git a/tests/pos/t7785.scala b/tests/pos/t7785.scala index 1de693d137fe..c3fcebfb46f5 100644 --- a/tests/pos/t7785.scala +++ b/tests/pos/t7785.scala @@ -1,4 +1,4 @@ -import scala.language._ +import scala.language.* trait R[+Repr] diff --git a/tests/pos/t812.scala b/tests/pos/t812.scala index 709b59c194e6..16474bc0d2f8 100644 --- a/tests/pos/t812.scala +++ b/tests/pos/t812.scala @@ -1,7 +1,7 @@ package test; -import scala.{App => Main}; +import scala.App as Main; class Test extends Main { - import test.{Test => Hello} + import test.Test as Hello super[App].main(Array("test")); private[Test] def xxx = 10; } diff --git a/tests/pos/t8170.scala b/tests/pos/t8170.scala index fe9f262ba22d..f8718937d107 100644 --- a/tests/pos/t8170.scala +++ b/tests/pos/t8170.scala @@ -9,7 +9,7 @@ object O { } object Test { - import O._ + import O.* val a: B = ??? val b: a.T[X] = ??? b.ensuring(x => true) // trigger an implicit search diff --git a/tests/pos/t8207.scala b/tests/pos/t8207.scala index 680b40f3790f..c03f5824e352 100644 --- a/tests/pos/t8207.scala +++ b/tests/pos/t8207.scala @@ -1,5 +1,5 @@ class C { me => - import me.{toString => ts} + import me.toString as ts locally(this: me.type) trait T type X = me.T diff --git a/tests/pos/t8300-conversions-a.scala b/tests/pos/t8300-conversions-a.scala index 1a24da7502af..1728c43ca53c 100644 --- a/tests/pos/t8300-conversions-a.scala +++ b/tests/pos/t8300-conversions-a.scala @@ -16,7 +16,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* val sym: Symbol = ??? sym.asFreeType diff --git a/tests/pos/t8300-conversions-b.scala b/tests/pos/t8300-conversions-b.scala index a571dbea9040..052fb388c6bb 100644 --- a/tests/pos/t8300-conversions-b.scala +++ b/tests/pos/t8300-conversions-b.scala @@ -16,7 +16,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* val sym: Symbol = ??? sym.asFreeType diff --git a/tests/pos/t8300-overloading.scala b/tests/pos/t8300-overloading.scala index 2eeba0a66ca7..61d8df3c5151 100644 --- a/tests/pos/t8300-overloading.scala +++ b/tests/pos/t8300-overloading.scala @@ -9,7 +9,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* def foo(name: Name) = ??? def foo(name: TermName) = ??? diff --git a/tests/pos/t8300-patmat-a.scala b/tests/pos/t8300-patmat-a.scala index ab3a3c960526..8d2960294678 100644 --- a/tests/pos/t8300-patmat-a.scala +++ b/tests/pos/t8300-patmat-a.scala @@ -9,7 +9,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* locally { val ScalaName: TermName = ??? diff --git a/tests/pos/t8300-patmat-b.scala b/tests/pos/t8300-patmat-b.scala index 0acad4406956..4b33061d321a 100644 --- a/tests/pos/t8300-patmat-b.scala +++ b/tests/pos/t8300-patmat-b.scala @@ -9,7 +9,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* locally { val ScalaName: TermName = ??? diff --git a/tests/pos/t8301.scala b/tests/pos/t8301.scala index 2d10864c57e7..fe9bff52e78b 100644 --- a/tests/pos/t8301.scala +++ b/tests/pos/t8301.scala @@ -12,7 +12,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* val sym: Symbol = ??? sym.asFreeType diff --git a/tests/pos/t8301b.scala b/tests/pos/t8301b.scala index 4dd39139d276..403b5faf168f 100644 --- a/tests/pos/t8301b.scala +++ b/tests/pos/t8301b.scala @@ -9,7 +9,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* val ScalaName: TermName = ??? locally { @@ -17,12 +17,12 @@ object Test extends App { ??? match { case Test.ScalaName => ??? } - import Test.ScalaName._ + import Test.ScalaName.* ??? match { case ScalaName => ??? } - import ScalaName._ + import ScalaName.* // both the pattern and import led to // stable identifier required, but SN found. Note that value SN @@ -31,6 +31,6 @@ object Test extends App { ??? match { case SN => ??? } - import SN._ + import SN.* } } diff --git a/tests/pos/tangledCompanion.scala b/tests/pos/tangledCompanion.scala index 5853f8675ec3..5e0f3c2aca8b 100644 --- a/tests/pos/tangledCompanion.scala +++ b/tests/pos/tangledCompanion.scala @@ -1,6 +1,6 @@ object Test { - import Coll._ + import Coll.* import LazyList.#:: val xs = LazyList.Empty diff --git a/tests/pos/tasty-reflect-opaque-api-proto.scala b/tests/pos/tasty-reflect-opaque-api-proto.scala index fe077fd5b15e..744c14a55a89 100644 --- a/tests/pos/tasty-reflect-opaque-api-proto.scala +++ b/tests/pos/tasty-reflect-opaque-api-proto.scala @@ -19,7 +19,7 @@ class Reflect(val internal: CompilerInterface) { object App { val refl: Reflect = ??? - import refl._ + import refl.* val tree: Tree = ??? tree.show diff --git a/tests/pos/tcpoly_infer_ticket716.scala b/tests/pos/tcpoly_infer_ticket716.scala index 8268cdad9513..a517ac28884f 100644 --- a/tests/pos/tcpoly_infer_ticket716.scala +++ b/tests/pos/tcpoly_infer_ticket716.scala @@ -19,7 +19,7 @@ object Functor{ } object GeneralLiftingDemo extends App { - import Functor._ + import Functor.* val l = List(1,2,3) val res = l fmap( 1+_) // TODO: should not need explicit call to lifttoOO println("OO : " + res ) diff --git a/tests/pos/test-desugar.scala b/tests/pos/test-desugar.scala index a1e7c7e2c9af..abe358ce8874 100644 --- a/tests/pos/test-desugar.scala +++ b/tests/pos/test-desugar.scala @@ -31,7 +31,7 @@ object desugar { object patDefs { - import caseClasses._ + import caseClasses.* val xs: List[Int] = Cons(1, Cons(2, Nil)) diff --git a/tests/pos/test-erasure.scala b/tests/pos/test-erasure.scala index d794e9186d7a..1fd61ece6c57 100644 --- a/tests/pos/test-erasure.scala +++ b/tests/pos/test-erasure.scala @@ -5,7 +5,7 @@ object erasure { def this() = this(0) } - import java.lang._ + import java.lang.* def const[T](x: T, y: T) = x diff --git a/tests/pos/test-typers.scala b/tests/pos/test-typers.scala index 93e255f1a152..a0b0d14e58a2 100644 --- a/tests/pos/test-typers.scala +++ b/tests/pos/test-typers.scala @@ -1,7 +1,7 @@ package test import annotation.{tailrec, switch} -import collection.mutable._ +import collection.mutable.* object typers { diff --git a/tests/pos/type-projection.scala b/tests/pos/type-projection.scala index 943baa27587c..55712069223d 100644 --- a/tests/pos/type-projection.scala +++ b/tests/pos/type-projection.scala @@ -1,6 +1,6 @@ package p package q -import java.lang._ +import java.lang.* import language.`3.0-migration` trait Txn[S <: Sys[S]] { diff --git a/tests/pos/typeclass-encoding.scala b/tests/pos/typeclass-encoding.scala index 52ad8126dd8e..03731f409a43 100644 --- a/tests/pos/typeclass-encoding.scala +++ b/tests/pos/typeclass-encoding.scala @@ -48,7 +48,7 @@ object runtime { } object semiGroups { - import runtime._ + import runtime.* trait SemiGroup extends TypeClass { def add(that: This): This diff --git a/tests/pos/typeclass-encoding2.scala b/tests/pos/typeclass-encoding2.scala index 143c1bc2ae0c..13db93f91204 100644 --- a/tests/pos/typeclass-encoding2.scala +++ b/tests/pos/typeclass-encoding2.scala @@ -61,13 +61,13 @@ object runtime { (implicit ev: TypeClassCommon { type This = From }): ev.Instance { type This = From } = ev.inject(x) } -import runtime._ +import runtime.* object semiGroups { trait SemiGroup extends TypeClass { val commons: SemiGroupCommon - import commons._ + import commons.* def add(that: This): This } trait SemiGroupCommon extends TypeClassCommon { @@ -79,7 +79,7 @@ object semiGroups { trait Monoid extends SemiGroup { val commons: MonoidCommon - import commons._ + import commons.* } trait MonoidCommon extends SemiGroupCommon { type Instance <: Monoid @@ -179,7 +179,7 @@ object ord { trait Ord extends TypeClass { val commons: OrdCommon - import commons._ + import commons.* def compareTo(that: This): Int def < (that: This) = compareTo(that) < 0 def > (that: This) = compareTo(that) > 0 @@ -198,7 +198,7 @@ object ord { val minimum: Int = Int.MinValue def inject($this: Int) = new Ord { val commons: IntOrd.this.type = IntOrd.this - import commons._ + import commons.* def compareTo(that: this.This): Int = if (this < that) -1 else if (this > that) +1 else 0 } @@ -210,7 +210,7 @@ object ord { def minimum: List[T] = Nil def inject($this: List[T]) = new Ord { val commons: self.type = self - import commons._ + import commons.* def compareTo(that: List[T]): Int = ($this, that) match { case (Nil, Nil) => 0 case (Nil, _) => -1 @@ -294,13 +294,13 @@ object runtime1 { }): ev.Instance[A] { type This = [X] =>> From[X] } = ev.inject(x) } -import runtime1._ +import runtime1.* object functors { trait Functor[A] extends TypeClass1 { val commons: FunctorCommon - import commons._ + import commons.* def map[B](f: A => B): This[B] } trait FunctorCommon extends TypeClassCommon1 { @@ -313,7 +313,7 @@ object functors { trait Monad[A] extends Functor[A] { val commons: MonadCommon - import commons._ + import commons.* def flatMap[B](f: A => This[B]): This[B] def map[B](f: A => B) = this.flatMap(f.andThen(commons.pure)) } @@ -334,7 +334,7 @@ object functors { def pure[A](x: A) = x :: Nil def inject[A]($this: List[A]) = new Monad[A] { val commons: ListMonad.this.type = ListMonad - import commons._ + import commons.* def flatMap[B](f: A => List[B]): List[B] = $this.flatMap(f) } } diff --git a/tests/pos/typeclass-encoding3.scala b/tests/pos/typeclass-encoding3.scala index 363826d2d6bd..ee42c7ba9e28 100644 --- a/tests/pos/typeclass-encoding3.scala +++ b/tests/pos/typeclass-encoding3.scala @@ -62,7 +62,7 @@ object Test { trait SemiGroup { val common: SemiGroup.Common - import common._ + import common.* def combine(that: This): This } @@ -76,7 +76,7 @@ object Test { trait Monoid extends SemiGroup { val common: Monoid.Common - import common._ + import common.* } object Monoid { trait Common extends SemiGroup.Common { self => @@ -157,7 +157,7 @@ object Test { trait Ord { val common: Ord.Common - import common._ + import common.* def compareTo(that: This): Int def < (that: This) = compareTo(that) < 0 @@ -242,7 +242,7 @@ object Test { trait Functor[A] { val common: Functor.Common - import common._ + import common.* def map[B](f: A => B): This[B] } @@ -257,7 +257,7 @@ object Test { trait Monad[A] extends Functor[A] { self => val common: Monad.Common - import common._ + import common.* def flatMap[B](f: A => This[B]): This[B] def map[B](f: A => B): This[B] = flatMap(f `andThen` pure) diff --git a/tests/pos/virtpatmat_exist1.scala b/tests/pos/virtpatmat_exist1.scala index f3ac809a7268..93c37d76c422 100644 --- a/tests/pos/virtpatmat_exist1.scala +++ b/tests/pos/virtpatmat_exist1.scala @@ -1,4 +1,4 @@ -import annotation.unchecked.{uncheckedVariance => uV} +import annotation.unchecked.uncheckedVariance as uV import scala.collection.{IterableFactory, StrictOptimizedIterableOps, mutable} import scala.collection.immutable.{ListMap, ListSet} import scala.collection.mutable.{AbstractSet, HashMap, HashSet, Set, SetOps} @@ -29,7 +29,7 @@ object Test { } // without type ascription for the one in the body of the last flatmap of each alternative, type inference borks on the existentials - // def splitArray[T >: Nothing <: Any](ad: Array[Iterable[T]]): Any = { import OptionMatching._ + // def splitArray[T >: Nothing <: Any](ad: Array[Iterable[T]]): Any = { import OptionMatching.* // runOrElse(ad.apply(0))(((x1: Iterable[T]) => ( // or(((x4: Iterable[T]) => one(null)), // guard(x1.isInstanceOf[Iterable[T] with Test.HashMapCollision1[_,_]], x1.asInstanceOf[Iterable[T] with Test.HashMapCollision1[_,_]]).flatMap(((x2: Iterable[T] with Test.HashMapCollision1[_,_]) => one(x2))), diff --git a/tests/pos/virtpatmat_exist2.scala b/tests/pos/virtpatmat_exist2.scala index f6ebb3ee2f84..c16c2721cc83 100644 --- a/tests/pos/virtpatmat_exist2.scala +++ b/tests/pos/virtpatmat_exist2.scala @@ -8,7 +8,7 @@ object Test { // what's the _$1 doing there? // def grow[T >: Nothing <: Any]: ParseResult[T] = { - // import OptionMatching._ + // import OptionMatching.* // runOrElse[MemoEntry[T], ParseResult[T]]((null: MemoEntry[T]))(((x1: MemoEntry[T]) => // (MemoEntry.unapply[T](x1).flatMap[ParseResult[T]](((x4: Either[Nothing,ParseResult[_]]) => // guard[Right[Nothing,ParseResult[_]]](x4.isInstanceOf[Right[Nothing,ParseResult[_]]], x4.asInstanceOf[Right[Nothing,ParseResult[_]]]).flatMap[ParseResult[T]](((cp3: Right[Nothing,ParseResult[_]]) => diff --git a/tests/pos/virtpatmat_exist4.scala b/tests/pos/virtpatmat_exist4.scala index 728006276350..b81134b0457a 100644 --- a/tests/pos/virtpatmat_exist4.scala +++ b/tests/pos/virtpatmat_exist4.scala @@ -10,7 +10,7 @@ trait IMain { self: MemberHandlers => trait MemberHandlers { val intp: IMain - import intp.global._ + import intp.global.* sealed abstract class MemberHandler(val member: Tree) { def importedSymbols: List[Symbol] } diff --git a/tests/rewrites/rewrites3x.scala b/tests/rewrites/rewrites3x.scala index d8f9f680d614..48e2d35b0fdd 100644 --- a/tests/rewrites/rewrites3x.scala +++ b/tests/rewrites/rewrites3x.scala @@ -1,6 +1,9 @@ +import scala.{collection => coll, runtime=>_, _} +import coll._ + def f(xs: Int*) = xs.sum def test = - f(List(1, 2, 3) *) + f(List(1, 2, 3): _*) def g = { implicit x: Int => x + 1 diff --git a/tests/run-custom-args/Yretain-trees/tasty-definitions-2/Macro_1.scala b/tests/run-custom-args/Yretain-trees/tasty-definitions-2/Macro_1.scala index e30bf8af85ae..4f3bca594b0a 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-definitions-2/Macro_1.scala +++ b/tests/run-custom-args/Yretain-trees/tasty-definitions-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { @@ -6,7 +6,7 @@ object Foo { ${ inspectBodyImpl('i) } def inspectBodyImpl(x: Expr[Int])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* x.asTerm match { case Inlined(None, Nil, arg) => Expr(arg.symbol.tree.show(using Printer.TreeStructure)) case arg => Expr(arg.symbol.tree.show(using Printer.TreeStructure)) // TODO should all by name parameters be in an inline node? diff --git a/tests/run-custom-args/Yretain-trees/tasty-definitions-3/Macro_1.scala b/tests/run-custom-args/Yretain-trees/tasty-definitions-3/Macro_1.scala index 6bdd99bfe7fa..179fe8f48654 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-definitions-3/Macro_1.scala +++ b/tests/run-custom-args/Yretain-trees/tasty-definitions-3/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { @@ -6,7 +6,7 @@ object Foo { ${ inspectBodyImpl('i) } def inspectBodyImpl(x: Expr[Int])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* x.asTerm match { case Inlined(None, Nil, arg) => Expr(arg.symbol.tree.show(using Printer.TreeStructure)) case arg => Expr(arg.symbol.tree.show(using Printer.TreeStructure)) // TODO should all by name parameters be in an inline node? diff --git a/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_1.scala b/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_1.scala index 11be6e926a5f..e29ac7a11944 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_1.scala +++ b/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -6,7 +6,7 @@ object Macros { ${ impl('x) } def impl[T](x: Expr[T])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val buff = new StringBuilder @@ -19,7 +19,7 @@ object Macros { def myTraverser(using Quotes)(buff: StringBuilder): quotes.reflect.TreeTraverser = new { - import quotes.reflect._ + import quotes.reflect.* override def traverseTree(tree: Tree)(owner: Symbol): Unit = { tree match { case tree @ DefDef(name, _, _, _) => diff --git a/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_2.scala b/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_2.scala index cc13d81ae03b..5b793c829269 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_2.scala +++ b/tests/run-custom-args/Yretain-trees/tasty-extractors-owners/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-custom-args/Yretain-trees/tasty-load-tree-1/quoted_1.scala b/tests/run-custom-args/Yretain-trees/tasty-load-tree-1/quoted_1.scala index 53cecc556fee..8bcba476dff2 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-load-tree-1/quoted_1.scala +++ b/tests/run-custom-args/Yretain-trees/tasty-load-tree-1/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { @@ -7,7 +7,7 @@ object Foo { ${ inspectBodyImpl('i) } def inspectBodyImpl(x: Expr[Int])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* def definitionString(sym: Symbol): Expr[String] = if sym.isClassDef || sym.isDefDef || sym.isValDef then Expr(sym.tree.show(using Printer.TreeStructure)) diff --git a/tests/run-custom-args/Yretain-trees/tasty-load-tree-2/quoted_1.scala b/tests/run-custom-args/Yretain-trees/tasty-load-tree-2/quoted_1.scala index 81550be6ca02..d6983c1034c8 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-load-tree-2/quoted_1.scala +++ b/tests/run-custom-args/Yretain-trees/tasty-load-tree-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { @@ -6,7 +6,7 @@ object Foo { ${ inspectBodyImpl('i) } def inspectBodyImpl(x: Expr[Int])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* def definitionString(sym: Symbol): Expr[String] = if sym.isClassDef || sym.isDefDef || sym.isValDef then Expr(sym.tree.show(using Printer.TreeStructure)) diff --git a/tests/run-custom-args/erased/erased-frameless.scala b/tests/run-custom-args/erased/erased-frameless.scala index 989faf22ddb7..bc52bd4ac8fb 100644 --- a/tests/run-custom-args/erased/erased-frameless.scala +++ b/tests/run-custom-args/erased/erased-frameless.scala @@ -101,7 +101,7 @@ object X4 { } object Test { - import Exists._ + import Exists.* def main(args: Array[String]): Unit = { val source: Vector[X4[Int, String, Double, Boolean]] = diff --git a/tests/run-custom-args/run-macros-erased/macro-erased/1.scala b/tests/run-custom-args/run-macros-erased/macro-erased/1.scala index bd3b8222d0bb..567ef57b1c06 100644 --- a/tests/run-custom-args/run-macros-erased/macro-erased/1.scala +++ b/tests/run-custom-args/run-macros-erased/macro-erased/1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def foo1(i: Int) = $ { case1('{ i }) } diff --git a/tests/run-custom-args/run-macros-erased/reflect-isFunctionType/macro_1.scala b/tests/run-custom-args/run-macros-erased/reflect-isFunctionType/macro_1.scala index 3bc306b73b10..bd07a51684f6 100644 --- a/tests/run-custom-args/run-macros-erased/reflect-isFunctionType/macro_1.scala +++ b/tests/run-custom-args/run-macros-erased/reflect-isFunctionType/macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* inline def isFunctionType[T]: Boolean = ${ isFunctionTypeImpl[T] } def isFunctionTypeImpl[T: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[T].isFunctionType) } @@ -12,7 +12,7 @@ def isFunctionTypeImpl[T: Type](using Quotes) : Expr[Boolean] = { inline def isContextFunctionType[T]: Boolean = ${ isContextFunctionTypeImpl[T] } def isContextFunctionTypeImpl[T: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[T].isContextFunctionType) } @@ -20,14 +20,14 @@ def isContextFunctionTypeImpl[T: Type](using Quotes) : Expr[Boolean] = { inline def isErasedFunctionType[T]: Boolean = ${ isErasedFunctionTypeImpl[T] } def isErasedFunctionTypeImpl[T: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[T].isErasedFunctionType) } inline def isDependentFunctionType[T]: Boolean = ${ isDependentFunctionTypeImpl[T] } def isDependentFunctionTypeImpl[T: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[T].isDependentFunctionType) } diff --git a/tests/run-custom-args/tasty-inspector/i10359.scala b/tests/run-custom-args/tasty-inspector/i10359.scala index f8f8f8c971f1..e2913c8ba25b 100644 --- a/tests/run-custom-args/tasty-inspector/i10359.scala +++ b/tests/run-custom-args/tasty-inspector/i10359.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* object Bar { class Givens { @@ -36,7 +36,7 @@ object Test { class TestInspector() extends Inspector: def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = - import quotes.reflect._ + import quotes.reflect.* for tasty <- tastys do val code = tasty.ast.show diff --git a/tests/run-custom-args/tasty-inspector/i8163.scala b/tests/run-custom-args/tasty-inspector/i8163.scala index 4c06c317d41f..1f124b5d4182 100644 --- a/tests/run-custom-args/tasty-inspector/i8163.scala +++ b/tests/run-custom-args/tasty-inspector/i8163.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* opaque type PhoneNumber = String @@ -27,7 +27,7 @@ class TestInspector() extends Inspector: inspectClass(tasty.ast) private def inspectClass(using Quotes)(tree: quotes.reflect.Tree): Unit = - import quotes.reflect._ + import quotes.reflect.* tree match { case t: PackageClause => t.stats.map( m => inspectClass(m) ) diff --git a/tests/run-custom-args/tasty-inspector/i8364.scala b/tests/run-custom-args/tasty-inspector/i8364.scala index bd808ac38a20..30b8a6b0bc7c 100644 --- a/tests/run-custom-args/tasty-inspector/i8364.scala +++ b/tests/run-custom-args/tasty-inspector/i8364.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* @main def Test = { val inspector = new Inspector { diff --git a/tests/run-custom-args/tasty-inspector/i8389.scala b/tests/run-custom-args/tasty-inspector/i8389.scala index aef85a24d22c..3ceb0f150a44 100644 --- a/tests/run-custom-args/tasty-inspector/i8389.scala +++ b/tests/run-custom-args/tasty-inspector/i8389.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* @main def Test = { // Artefact of the current test infrastructure diff --git a/tests/run-custom-args/tasty-inspector/i8460.scala b/tests/run-custom-args/tasty-inspector/i8460.scala index 2ed9b59168bc..76409764e577 100644 --- a/tests/run-custom-args/tasty-inspector/i8460.scala +++ b/tests/run-custom-args/tasty-inspector/i8460.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* // Ambiguous member names sealed trait Vehicle @@ -43,7 +43,7 @@ class TestInspector_Children() extends Inspector: } private def inspectClass(using Quotes)(tree: quotes.reflect.Tree): Unit = - import quotes.reflect._ + import quotes.reflect.* tree match { case t: PackageClause => t.stats.map( m => inspectClass(m) ) diff --git a/tests/run-custom-args/tasty-inspector/i9970.scala b/tests/run-custom-args/tasty-inspector/i9970.scala index afc1cd25352e..9d1ad31f97e2 100644 --- a/tests/run-custom-args/tasty-inspector/i9970.scala +++ b/tests/run-custom-args/tasty-inspector/i9970.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* /* Test that the constructor of a trait has the StableRealizable trait if and * only if the trait has NoInits. This is used by the TASTy reader in Scala 2 @@ -53,7 +53,7 @@ class TestInspector() extends Inspector: var foundSimple: Boolean = false def inspectClass(using Quotes)(tree: quotes.reflect.Tree): Unit = - import quotes.reflect._ + import quotes.reflect.* tree match case t: PackageClause => t.stats.foreach(inspectClass(_)) diff --git a/tests/run-custom-args/tasty-inspector/tasty-documentation-inspector/Test.scala b/tests/run-custom-args/tasty-inspector/tasty-documentation-inspector/Test.scala index 0e03bab7107b..4389c9f7fff6 100644 --- a/tests/run-custom-args/tasty-inspector/tasty-documentation-inspector/Test.scala +++ b/tests/run-custom-args/tasty-inspector/tasty-documentation-inspector/Test.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* object Test { def main(args: Array[String]): Unit = { @@ -17,7 +17,7 @@ class DocumentationInspector extends Inspector { def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = { - import quotes.reflect._ + import quotes.reflect.* object Traverser extends TreeTraverser { override def traverseTree(tree: Tree)(owner: Symbol): Unit = tree match { diff --git a/tests/run-custom-args/tasty-inspector/tasty-inspector/Test.scala b/tests/run-custom-args/tasty-inspector/tasty-inspector/Test.scala index d6ddec2c9a29..d2d026a751b0 100644 --- a/tests/run-custom-args/tasty-inspector/tasty-inspector/Test.scala +++ b/tests/run-custom-args/tasty-inspector/tasty-inspector/Test.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* object Test { def main(args: Array[String]): Unit = { @@ -16,7 +16,7 @@ object Test { class DBInspector extends Inspector { def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = { - import quotes.reflect._ + import quotes.reflect.* object Traverser extends TreeTraverser { override def traverseTree(tree: Tree)(owner: Symbol): Unit = tree match { diff --git a/tests/run-custom-args/tasty-inspector/tastyPaths.scala b/tests/run-custom-args/tasty-inspector/tastyPaths.scala index f13b0ee24f89..2b3f523cbfe4 100644 --- a/tests/run-custom-args/tasty-inspector/tastyPaths.scala +++ b/tests/run-custom-args/tasty-inspector/tastyPaths.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* import java.io.File.separatorChar diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala b/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala index a5ed8048de3a..34697e0d0117 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala @@ -1,12 +1,12 @@ package scala.tasty.interpreter -import scala.quoted._ -import scala.tasty.inspector._ +import scala.quoted.* +import scala.tasty.inspector.* class TastyInterpreter extends Inspector { def inspect(using Quotes)(tastys: List[Tasty[quotes.type]]): Unit = { - import quotes.reflect._ + import quotes.reflect.* object Traverser extends TreeTraverser { override def traverseTree(tree: Tree)(owner: Symbol): Unit = tree match { diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala b/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala index 73badb893599..a76379e22313 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala @@ -1,10 +1,10 @@ package scala.tasty.interpreter -import scala.quoted._ +import scala.quoted.* import scala.tasty.interpreter.jvm.JVMReflection abstract class TreeInterpreter[Q <: Quotes & Singleton](using val q: Q) { - import quotes.reflect._ + import quotes.reflect.* final val LOG = false diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala index fa5508b78c51..efb0ea248906 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala @@ -1,11 +1,11 @@ package scala.tasty.interpreter package jvm -import scala.quoted._ +import scala.quoted.* import scala.tasty.interpreter.jvm.JVMReflection class Interpreter[Q <: Quotes & Singleton](using q0: Q) extends TreeInterpreter[Q] { - import q.reflect._ + import q.reflect.* // All references are represented by themselves and values are boxed type AbstractAny = Any @@ -20,7 +20,7 @@ class Interpreter[Q <: Quotes & Singleton](using q0: Q) extends TreeInterpreter[ sym.tree match case tree: ClassDef => val parentSymbols = tree.parents.tail.map(_.asInstanceOf[TypeTree].symbol).head - import java.lang.reflect._ + import java.lang.reflect.* val handler: InvocationHandler = new InvocationHandler() { def invoke(proxy: Object, method: Method, args: scala.Array[Object]): Object = { if (LOG) { diff --git a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala index d3fc7feb2e21..7d696c0e4e11 100644 --- a/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala +++ b/tests/run-custom-args/tasty-interpreter/interpreter/jvm/JVMReflection.scala @@ -1,9 +1,9 @@ package scala.tasty.interpreter.jvm -import scala.quoted._ +import scala.quoted.* class JVMReflection[Q <: Quotes & Singleton](using val q: Q) { - import q.reflect._ + import q.reflect.* import java.lang.reflect.{InvocationTargetException, Method} private val classLoader: ClassLoader = getClass.getClassLoader diff --git a/tests/run-custom-args/typeclass-derivation2.scala b/tests/run-custom-args/typeclass-derivation2.scala index aec56c59219b..228547bcccc1 100644 --- a/tests/run-custom-args/typeclass-derivation2.scala +++ b/tests/run-custom-args/typeclass-derivation2.scala @@ -7,7 +7,7 @@ object TypeLevel { /** @param caseLabels The case and element labels of the described ADT as encoded strings. */ class ReflectedClass(labelsStr: String) { - import ReflectedClass._ + import ReflectedClass.* /** A mirror of case with ordinal number `ordinal` and elements as given by `Product` */ def mirror(ordinal: Int, product: Product): Mirror = @@ -130,7 +130,7 @@ enum Lst[+T] { // derives Eq, Pickler, Show object Lst { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* type Shape[T] = Shape.Cases[( Shape.Case[Cons[T], (T, Lst[T])], @@ -165,7 +165,7 @@ case class Pair[T](x: T, y: T) // derives Eq, Pickler, Show object Pair { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* type Shape[T] = Shape.Case[Pair[T], (T, T)] @@ -191,7 +191,7 @@ case class Left[L](x: L) extends Either[L, Nothing] case class Right[R](x: R) extends Either[Nothing, R] object Either { - import TypeLevel._ + import TypeLevel.* type Shape[L, R] = Shape.Cases[( Shape.Case[Left[L], L *: EmptyTuple], @@ -225,7 +225,7 @@ trait Eq[T] { object Eq { import scala.compiletime.{erasedValue, error, summonFrom} - import TypeLevel._ + import TypeLevel.* inline def tryEql[T](x: T, y: T) = summonInline[Eq[T]].eql(x, y) @@ -282,7 +282,7 @@ trait Pickler[T] { object Pickler { import scala.compiletime.{erasedValue, constValue, error, summonInline} - import TypeLevel._ + import TypeLevel.* def nextInt(buf: mutable.ListBuffer[Int]): Int = try buf.head finally buf.trimStart(1) @@ -374,7 +374,7 @@ trait Show[T] { } object Show { import scala.compiletime.{erasedValue, error, summonFrom} - import TypeLevel._ + import TypeLevel.* inline def tryShow[T](x: T): String = summonInline[Show[T]].show(x) @@ -427,7 +427,7 @@ object Show { // Tests object Test extends App { - import TypeLevel._ + import TypeLevel.* val eq = implicitly[Eq[Lst[Int]]] val xs = Lst.Cons(11, Lst.Cons(22, Lst.Cons(33, Lst.Nil))) val ys = Lst.Cons(11, Lst.Cons(22, Lst.Nil)) diff --git a/tests/run-custom-args/typeclass-derivation2c.scala b/tests/run-custom-args/typeclass-derivation2c.scala index 1a4b8873679d..ddf4d62e0498 100644 --- a/tests/run-custom-args/typeclass-derivation2c.scala +++ b/tests/run-custom-args/typeclass-derivation2c.scala @@ -72,7 +72,7 @@ object Deriving { def productElement[T](x: Any, idx: Int) = x.asInstanceOf[Product].productElement(idx).asInstanceOf[T] } -import Deriving._ +import Deriving.* // -- Example Datatypes --------------------------------------------------------- diff --git a/tests/run-deep-subtype/colltest4/CollectionStrawMan4_1.scala b/tests/run-deep-subtype/colltest4/CollectionStrawMan4_1.scala index c3f7d39bc3de..7f723ba86806 100644 --- a/tests/run-deep-subtype/colltest4/CollectionStrawMan4_1.scala +++ b/tests/run-deep-subtype/colltest4/CollectionStrawMan4_1.scala @@ -1,7 +1,7 @@ package colltest4 package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec diff --git a/tests/run-deep-subtype/colltest4/CollectionTests_2.scala b/tests/run-deep-subtype/colltest4/CollectionTests_2.scala index 45da9d8a5e20..9237c6c30e1d 100644 --- a/tests/run-deep-subtype/colltest4/CollectionTests_2.scala +++ b/tests/run-deep-subtype/colltest4/CollectionTests_2.scala @@ -1,9 +1,9 @@ -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag object Test { - import colltest4.strawman.collections._ - import CollectionStrawMan4._ + import colltest4.strawman.collections.* + import CollectionStrawMan4.* def seqOps(xs: Seq[Int]) = { val x1 = xs.foldLeft("")(_ + _) diff --git a/tests/run-macros/BigFloat/BigFloatFromDigitsImpl_1.scala b/tests/run-macros/BigFloat/BigFloatFromDigitsImpl_1.scala index d77cf6334f2f..0731abf11174 100644 --- a/tests/run-macros/BigFloat/BigFloatFromDigitsImpl_1.scala +++ b/tests/run-macros/BigFloat/BigFloatFromDigitsImpl_1.scala @@ -1,7 +1,7 @@ package test import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ +import scala.quoted.* object BigFloatFromDigitsImpl: def apply(digits: Expr[String])(using Quotes): Expr[BigFloat] = diff --git a/tests/run-macros/BigFloat/BigFloat_1.scala b/tests/run-macros/BigFloat/BigFloat_1.scala index 4d256f4394d8..5bb5b49587bd 100644 --- a/tests/run-macros/BigFloat/BigFloat_1.scala +++ b/tests/run-macros/BigFloat/BigFloat_1.scala @@ -1,7 +1,7 @@ package test import language.experimental.genericNumberLiterals import scala.util.FromDigits -import scala.quoted._ +import scala.quoted.* case class BigFloat(mantissa: BigInt, exponent: Int) { diff --git a/tests/run-macros/beta-reduce-inline-result/Macro_1.scala b/tests/run-macros/beta-reduce-inline-result/Macro_1.scala index a38340a74595..528b8434b5c0 100644 --- a/tests/run-macros/beta-reduce-inline-result/Macro_1.scala +++ b/tests/run-macros/beta-reduce-inline-result/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def betaReduce[Arg,Result](inline fn : Arg=>Result)(inline arg: Arg): Result = diff --git a/tests/run-macros/beta-reduce-inline-result/Test_2.scala b/tests/run-macros/beta-reduce-inline-result/Test_2.scala index 247dffe61c79..3df46a7c9be4 100644 --- a/tests/run-macros/beta-reduce-inline-result/Test_2.scala +++ b/tests/run-macros/beta-reduce-inline-result/Test_2.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/run-macros/enum-nat-macro/Macros_2.scala b/tests/run-macros/enum-nat-macro/Macros_2.scala index 19339ef403e8..c533888718ba 100644 --- a/tests/run-macros/enum-nat-macro/Macros_2.scala +++ b/tests/run-macros/enum-nat-macro/Macros_2.scala @@ -1,11 +1,11 @@ -import Nat._ +import Nat.* inline def toIntMacro(inline nat: Nat): Int = ${ Macros.toIntImpl('nat) } inline def ZeroMacro: Zero.type = ${ Macros.natZero } transparent inline def toNatMacro(inline int: Int): Nat = ${ Macros.toNatImpl('int) } object Macros: - import quoted._ + import quoted.* def toIntImpl(nat: Expr[Nat])(using Quotes): Expr[Int] = diff --git a/tests/run-macros/enum-nat-macro/Test_3.scala b/tests/run-macros/enum-nat-macro/Test_3.scala index da686d4cb3f4..946fcdba6db3 100644 --- a/tests/run-macros/enum-nat-macro/Test_3.scala +++ b/tests/run-macros/enum-nat-macro/Test_3.scala @@ -1,4 +1,4 @@ -import Nat._ +import Nat.* @main def Test: Unit = assert(toIntMacro(Succ(Succ(Succ(Zero)))) == 3) diff --git a/tests/run-macros/exports/Macro_2.scala b/tests/run-macros/exports/Macro_2.scala index 8ab557efe02a..252487470d05 100644 --- a/tests/run-macros/exports/Macro_2.scala +++ b/tests/run-macros/exports/Macro_2.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def visitExportsTreeAccumulator[T](inline x: T)(inline f: String => Any): Any = ${ traverseExportsImpl('x, 'f) } inline def visitExportsTreeMap[T](inline x: T)(inline f: T => Any): Any = ${ visitExportsTreeMapImpl('x, 'f) } @@ -12,16 +12,16 @@ private def visitExportsExprMapImpl[T: Type](e: Expr[T], f: Expr[T => Any])(usin '{$f(${IdempotentExprMap.transform(e)})} private def visitExportsTreeMapImpl[T: Type](e: Expr[T], f: Expr[T => Any])(using Quotes): Expr[Any] = - import quotes.reflect._ + import quotes.reflect.* object m extends TreeMap '{$f(${m.transformTerm(e.asTerm)(Symbol.spliceOwner).asExprOf})} private def visitExportsShowImpl[T: Type](e: Expr[T])(using Quotes): Expr[Any] = - import quotes.reflect._ + import quotes.reflect.* '{println(${Expr(e.asTerm.show)})} private def visitExportsShowExtractImpl[T: Type](e: Expr[T])(using Quotes): Expr[Any] = - import quotes.reflect._ + import quotes.reflect.* '{println(${Expr(e.asTerm.show(using Printer.TreeStructure))})} private object IdempotentExprMap extends ExprMap { @@ -32,7 +32,7 @@ private object IdempotentExprMap extends ExprMap { } private def traverseExportsImpl(e: Expr[Any], f: Expr[String => Any])(using Quotes): Expr[Any] = { - import quotes.reflect._ + import quotes.reflect.* import collection.mutable object ExportAccumulator extends TreeAccumulator[mutable.Buffer[String]] { diff --git a/tests/run-macros/expr-map-1/Macro_1.scala b/tests/run-macros/expr-map-1/Macro_1.scala index 0a0859266040..643c57f0bb2b 100644 --- a/tests/run-macros/expr-map-1/Macro_1.scala +++ b/tests/run-macros/expr-map-1/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def rewrite[T](inline x: Any): Any = ${ stringRewriter('x) } diff --git a/tests/run-macros/expr-map-2/Macro_1.scala b/tests/run-macros/expr-map-2/Macro_1.scala index 66c904551331..f6bc48ffc13f 100644 --- a/tests/run-macros/expr-map-2/Macro_1.scala +++ b/tests/run-macros/expr-map-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def rewrite[T](inline x: Any): Any = ${ stringRewriter('x) } diff --git a/tests/run-macros/expr-map-3/Macro_1.scala b/tests/run-macros/expr-map-3/Macro_1.scala index 4ca27b8ace5e..0462c90b1305 100644 --- a/tests/run-macros/expr-map-3/Macro_1.scala +++ b/tests/run-macros/expr-map-3/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def rewrite[T](inline x: Any): Any = ${ stringRewriter('x) } diff --git a/tests/run-macros/f-interpolation-1/FQuote_1.scala b/tests/run-macros/f-interpolation-1/FQuote_1.scala index 7d9127025adb..4ca632c18280 100644 --- a/tests/run-macros/f-interpolation-1/FQuote_1.scala +++ b/tests/run-macros/f-interpolation-1/FQuote_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions @@ -9,7 +9,7 @@ object FQuote { } /*private*/ def impl(receiver: Expr[SCOps], args: Expr[Seq[Any]])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* def liftListOfAny(lst: List[Term]): Expr[List[Any]] = lst match { case x :: xs => diff --git a/tests/run-macros/f-interpolation-1/Test_2.scala b/tests/run-macros/f-interpolation-1/Test_2.scala index a343ce600a18..6b2b939b1996 100644 --- a/tests/run-macros/f-interpolation-1/Test_2.scala +++ b/tests/run-macros/f-interpolation-1/Test_2.scala @@ -1,4 +1,4 @@ -import FQuote._ +import FQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/flops-rewrite-2/Macro_1.scala b/tests/run-macros/flops-rewrite-2/Macro_1.scala index a5da85da98a5..b408854669b9 100644 --- a/tests/run-macros/flops-rewrite-2/Macro_1.scala +++ b/tests/run-macros/flops-rewrite-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def rewrite[T](inline x: T): T = ${ rewriteMacro('x) } diff --git a/tests/run-macros/flops-rewrite-3/Macro_1.scala b/tests/run-macros/flops-rewrite-3/Macro_1.scala index ccb53b38a4ce..81f6c4035523 100644 --- a/tests/run-macros/flops-rewrite-3/Macro_1.scala +++ b/tests/run-macros/flops-rewrite-3/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def rewrite[T](inline x: T): T = ${ rewriteMacro('x) } diff --git a/tests/run-macros/flops-rewrite/Macro_1.scala b/tests/run-macros/flops-rewrite/Macro_1.scala index cfabc79acc1f..49f071062dae 100644 --- a/tests/run-macros/flops-rewrite/Macro_1.scala +++ b/tests/run-macros/flops-rewrite/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def rewrite[T](inline x: T): T = ${ rewriteMacro('x) } diff --git a/tests/run-macros/gestalt-optional-staging/Macro_1.scala b/tests/run-macros/gestalt-optional-staging/Macro_1.scala index 59da2d765dbf..6d0714a95337 100644 --- a/tests/run-macros/gestalt-optional-staging/Macro_1.scala +++ b/tests/run-macros/gestalt-optional-staging/Macro_1.scala @@ -1,7 +1,7 @@ // Port of https://github.com/liufengyun/gestalt/blob/master/macros/src/main/scala/gestalt/macros/Optional.scala // using staging macros (only quotes and splices) -import scala.quoted._ +import scala.quoted.* final class Optional[+A >: Null](val value: A) extends AnyVal { def get: A = value diff --git a/tests/run-macros/gestalt-type-toolbox-reflect/Macro_1.scala b/tests/run-macros/gestalt-type-toolbox-reflect/Macro_1.scala index bf5acf16b17f..1d085d3a2c15 100644 --- a/tests/run-macros/gestalt-type-toolbox-reflect/Macro_1.scala +++ b/tests/run-macros/gestalt-type-toolbox-reflect/Macro_1.scala @@ -1,34 +1,34 @@ // Port of https://github.com/liufengyun/gestalt/blob/master/macros/src/main/scala/gestalt/macros/TypeToolbox.scala // using staging reflection -import scala.quoted._ +import scala.quoted.* object TypeToolbox { /** are the two types equal? */ inline def =:=[A, B]: Boolean = ${tpEqImpl[A, B]} private def tpEqImpl[A: Type, B: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[A] =:= TypeRepr.of[B]) } /** is `tp1` a subtype of `tp2` */ inline def <:<[A, B]: Boolean = ${tpLEqImpl[A, B]} private def tpLEqImpl[A: Type, B: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[A] <:< TypeRepr.of[B]) } /** type associated with the tree */ inline def typeOf[T, Expected](a: T): Boolean = ${typeOfImpl[T, Expected]('a)} private def typeOfImpl[A: Type, E: Type](a: Expr[A])(using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[A] =:= TypeRepr.of[E]) } /** does the type refer to a case class? */ inline def isCaseClass[A]: Boolean = ${isCaseClassImpl[A]} private def isCaseClassImpl[T: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* val sym = TypeTree.of[T].symbol Expr(sym.isClassDef && sym.flags.is(Flags.Case)) } @@ -36,66 +36,66 @@ object TypeToolbox { /** val fields of a case class Type -- only the ones declared in primary constructor */ inline def caseFields[T]: List[String] = ${caseFieldsImpl[T]} private def caseFieldsImpl[T: Type](using Quotes) : Expr[List[String]] = { - import quotes.reflect._ + import quotes.reflect.* val fields = TypeTree.of[T].symbol.caseFields.map(_.name) Expr(fields) } inline def fieldIn[T](inline mem: String): String = ${fieldInImpl[T]('mem)} private def fieldInImpl[T: Type](mem: Expr[String])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val field = TypeTree.of[T].symbol.declaredField(mem.valueOrError) Expr(if field.isNoSymbol then "" else field.name) } inline def fieldsIn[T]: Seq[String] = ${fieldsInImpl[T]} private def fieldsInImpl[T: Type](using Quotes) : Expr[Seq[String]] = { - import quotes.reflect._ + import quotes.reflect.* val fields = TypeTree.of[T].symbol.declaredFields Expr(fields.map(_.name).toList) } inline def methodIn[T](inline mem: String): Seq[String] = ${methodInImpl[T]('mem)} private def methodInImpl[T: Type](mem: Expr[String])(using Quotes) : Expr[Seq[String]] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeTree.of[T].symbol.declaredMethod(mem.valueOrError).map(_.name)) } inline def methodsIn[T]: Seq[String] = ${methodsInImpl[T]} private def methodsInImpl[T: Type](using Quotes) : Expr[Seq[String]] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeTree.of[T].symbol.declaredMethods.map(_.name)) } inline def method[T](inline mem: String): Seq[String] = ${methodImpl[T]('mem)} private def methodImpl[T: Type](mem: Expr[String])(using Quotes) : Expr[Seq[String]] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeTree.of[T].symbol.memberMethod(mem.valueOrError).map(_.name)) } inline def methods[T]: Seq[String] = ${methodsImpl[T]} private def methodsImpl[T: Type](using Quotes) : Expr[Seq[String]] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeTree.of[T].symbol.memberMethods.map(_.name)) } inline def typeTag[T](x: T): String = ${typeTagImpl[T]} private def typeTagImpl[T: Type](using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val res = TypeRepr.of[T].show Expr(res) } inline def companion[T1, T2]: Boolean = ${companionImpl[T1, T2]} private def companionImpl[T1: Type, T2: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* val res = TypeTree.of[T1].symbol.companionModule == TypeTree.of[T2].symbol Expr(res) } inline def companionName[T1]: String = ${companionNameImpl[T1]} private def companionNameImpl[T: Type](using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val sym = TypeTree.of[T].symbol val companionClass = if sym.isClassDef then sym.companionModule.companionClass diff --git a/tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala b/tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala index e74574c2feb6..ace267b55dda 100644 --- a/tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala +++ b/tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala @@ -1,6 +1,6 @@ object Test { - import TypeToolbox._ + import TypeToolbox.* type Age = Int diff --git a/tests/run-macros/i10011/Macro_1.scala b/tests/run-macros/i10011/Macro_1.scala index b195d27b3986..95e1878ac0cd 100644 --- a/tests/run-macros/i10011/Macro_1.scala +++ b/tests/run-macros/i10011/Macro_1.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* inline def printPos[T](inline expr: T): (Int, Int) = ${ printPos('expr) } private def printPos[T](expr: Expr[T])(using Quotes): Expr[(Int, Int)] = - import quotes.reflect._ + import quotes.reflect.* val pos = expr.asTerm.pos Expr((pos.start, pos.end)) diff --git a/tests/run-macros/i10464/Macro_1.scala b/tests/run-macros/i10464/Macro_1.scala index 063a3928e3c7..f4f3077f2f8d 100644 --- a/tests/run-macros/i10464/Macro_1.scala +++ b/tests/run-macros/i10464/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object MatchMac { inline def apply(inline any: Any): Unit = ${ printMacImpl('any) } def printMacImpl(any: Expr[Any])(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val res = any match { case '{ ($f: Person).name } => "matched!" case _ => "not matched" diff --git a/tests/run-macros/i10863/Macro_1.scala b/tests/run-macros/i10863/Macro_1.scala index 4d2ff4be8901..5786e0dc3262 100644 --- a/tests/run-macros/i10863/Macro_1.scala +++ b/tests/run-macros/i10863/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def showList: String = ${ showListExpr } diff --git a/tests/run-macros/i10880/MyQuoteMacro_1.scala b/tests/run-macros/i10880/MyQuoteMacro_1.scala index 31576cc6fe63..18fe92717363 100644 --- a/tests/run-macros/i10880/MyQuoteMacro_1.scala +++ b/tests/run-macros/i10880/MyQuoteMacro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* case class MyQuoted(val ast: String, sub: String) object MyQuoteMacro { inline def myquote(inline content: MyContent): MyQuoted = ${ MyQuoteMacro.apply('content) } def apply(content: Expr[MyContent])(using Quotes): Expr[MyQuoted] = { - import quotes.reflect._ + import quotes.reflect.* '{ MyQuoted($content.key, null) } } } diff --git a/tests/run-macros/i10880/PullAst_1.scala b/tests/run-macros/i10880/PullAst_1.scala index 7440ddf7a90d..3ae61301b9f8 100644 --- a/tests/run-macros/i10880/PullAst_1.scala +++ b/tests/run-macros/i10880/PullAst_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PullAst { def applyImpl(quoted: Expr[MyQuoted])(using qctx: Quotes): Expr[String] = diff --git a/tests/run-macros/i10880/Test_2.scala b/tests/run-macros/i10880/Test_2.scala index 67833b7639e7..2933e3c72f41 100644 --- a/tests/run-macros/i10880/Test_2.scala +++ b/tests/run-macros/i10880/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Dsl._ + import Dsl.* inline def q2 = MyQuoteMacro.myquote(ent.content(MyInsert("Foo"))) diff --git a/tests/run-macros/i10914a/Macro_1.scala b/tests/run-macros/i10914a/Macro_1.scala index c86304c42a86..0a1b8088d04c 100644 --- a/tests/run-macros/i10914a/Macro_1.scala +++ b/tests/run-macros/i10914a/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Entity(value: String) case class Input(ent: Entity) @@ -7,7 +7,7 @@ case class Container(ents: List[Entity]) object Dsl { inline def container(inline c: Input):Container = ${ containerImpl('c) } def containerImpl(c: Expr[Input])(using Quotes): Expr[Container] = - import quotes.reflect._ + import quotes.reflect.* val entExpr = c match case '{ Input($ent) } => ent case _ => report.throwError("Cannot Extract Entity from Input") @@ -21,7 +21,7 @@ object Dsl { inline def pull(inline c: Container): Entity = ${ pullImpl('c) } def pullImpl(c: Expr[Container])(using Quotes): Expr[Entity] = - import quotes.reflect._ + import quotes.reflect.* val inputs = c match case '{ Container($list) } => list.valueOrError diff --git a/tests/run-macros/i10914a/Test_2.scala b/tests/run-macros/i10914a/Test_2.scala index a93784fb2b07..6eae7f21b45d 100644 --- a/tests/run-macros/i10914a/Test_2.scala +++ b/tests/run-macros/i10914a/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Dsl._ + import Dsl.* inline def makeEnt = Entity("foo") diff --git a/tests/run-macros/i10914b/Macro_1.scala b/tests/run-macros/i10914b/Macro_1.scala index 0515a4eb8cf3..680f189a3566 100644 --- a/tests/run-macros/i10914b/Macro_1.scala +++ b/tests/run-macros/i10914b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Entity(value: String) case class Input(ent: Entity) @@ -9,7 +9,7 @@ object Dsl { inline def container(inline c: Input):Container = ${ containerImpl('c) } def containerImpl(c: Expr[Input])(using Quotes): Expr[Container] = - import quotes.reflect._ + import quotes.reflect.* //println("Getting Input: " + Printer.TreeStructure.show(c.asTerm)) val entExpr = c match case '{ Input($ent) } => ent @@ -25,7 +25,7 @@ object Dsl { inline def pull(inline c: Container): Entity = ${ pullImpl('c) } def pullImpl(c: Expr[Container])(using Quotes): Expr[Entity] = - import quotes.reflect._ + import quotes.reflect.* val inputs = c match case '{ Container($list) } => list.valueOrError diff --git a/tests/run-macros/i10914b/Test_2.scala b/tests/run-macros/i10914b/Test_2.scala index 790b6ef1c99e..2593a1a8c58a 100644 --- a/tests/run-macros/i10914b/Test_2.scala +++ b/tests/run-macros/i10914b/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Dsl._ + import Dsl.* // inline def entity = makeEnt // This case breaks to //inline def input = Input(entity) diff --git a/tests/run-macros/i4431-b/quoted_1.scala b/tests/run-macros/i4431-b/quoted_1.scala index e62e45ddb2c2..7f617201ec27 100644 --- a/tests/run-macros/i4431-b/quoted_1.scala +++ b/tests/run-macros/i4431-b/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def h(f: => Int => String): String = f(42) diff --git a/tests/run-macros/i4431-b/quoted_2.scala b/tests/run-macros/i4431-b/quoted_2.scala index 00cdb38258d1..429d771f3e53 100644 --- a/tests/run-macros/i4431-b/quoted_2.scala +++ b/tests/run-macros/i4431-b/quoted_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/i4455/Macro_1.scala b/tests/run-macros/i4455/Macro_1.scala index 6ec8460328b1..3b440b370243 100644 --- a/tests/run-macros/i4455/Macro_1.scala +++ b/tests/run-macros/i4455/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def foo(inline i: Int): Int = ${ bar('i) } diff --git a/tests/run-macros/i4455/Test_2.scala b/tests/run-macros/i4455/Test_2.scala index 18fc75a361c6..2a7bdc048b1f 100644 --- a/tests/run-macros/i4455/Test_2.scala +++ b/tests/run-macros/i4455/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { println(foo(1)) diff --git a/tests/run-macros/i4515/Macro_1.scala b/tests/run-macros/i4515/Macro_1.scala index 69b5dabec7f0..3c9d22b81350 100644 --- a/tests/run-macros/i4515/Macro_1.scala +++ b/tests/run-macros/i4515/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def foo[X](x: X): Unit = ${fooImpl('x)} def fooImpl[X: Type](x: Expr[X])(using Quotes): Expr[Unit] = '{} diff --git a/tests/run-macros/i4515b/Macro_1.scala b/tests/run-macros/i4515b/Macro_1.scala index a1bd34fb77e9..6cafe7fbf9cd 100644 --- a/tests/run-macros/i4515b/Macro_1.scala +++ b/tests/run-macros/i4515b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def foo: Unit = ${ fooImpl } diff --git a/tests/run-macros/i4734/Macro_1.scala b/tests/run-macros/i4734/Macro_1.scala index e9cca32ca0ce..30b12d2fce36 100644 --- a/tests/run-macros/i4734/Macro_1.scala +++ b/tests/run-macros/i4734/Macro_1.scala @@ -1,5 +1,5 @@ import scala.annotation.tailrec -import scala.quoted._ +import scala.quoted.* object Macros { inline def unrolledForeach(seq: IndexedSeq[Int], inline f: Int => Unit, inline unrollSize: Int): Unit = // or f: Int => Unit diff --git a/tests/run-macros/i4734/Test_2.scala b/tests/run-macros/i4734/Test_2.scala index 72aa3f715ee8..eb75b2d2b492 100644 --- a/tests/run-macros/i4734/Test_2.scala +++ b/tests/run-macros/i4734/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/i4735/App_2.scala b/tests/run-macros/i4735/App_2.scala index 8a01cf3d06e6..4910a1dab287 100644 --- a/tests/run-macros/i4735/App_2.scala +++ b/tests/run-macros/i4735/App_2.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/i4735/Macro_1.scala b/tests/run-macros/i4735/Macro_1.scala index 482652a37192..54cdcb574c91 100644 --- a/tests/run-macros/i4735/Macro_1.scala +++ b/tests/run-macros/i4735/Macro_1.scala @@ -1,6 +1,6 @@ import scala.annotation.tailrec -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/i4803/Macro_1.scala b/tests/run-macros/i4803/Macro_1.scala index 3e4c6e58cf8e..9ff32194c708 100644 --- a/tests/run-macros/i4803/Macro_1.scala +++ b/tests/run-macros/i4803/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { def powerCode(x: Expr[Double], n: Expr[Long]) (using Quotes): Expr[Double] = diff --git a/tests/run-macros/i4803b/Macro_1.scala b/tests/run-macros/i4803b/Macro_1.scala index b205c6d3047c..ab82cb100dc3 100644 --- a/tests/run-macros/i4803b/Macro_1.scala +++ b/tests/run-macros/i4803b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { def powerCode(x: Expr[Double], n: Expr[Long]) (using Quotes): Expr[Double] = diff --git a/tests/run-macros/i4803c/Macro_1.scala b/tests/run-macros/i4803c/Macro_1.scala index 26fe7f71bf7b..2058a0bc4b3b 100644 --- a/tests/run-macros/i4803c/Macro_1.scala +++ b/tests/run-macros/i4803c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object PowerMacro { def powerCode(x: Expr[Double], n: Expr[Long]) (using Quotes): Expr[Double] = diff --git a/tests/run-macros/i4947e/Macro_1.scala b/tests/run-macros/i4947e/Macro_1.scala index 13aab8abeab6..0dc9c41f56a9 100644 --- a/tests/run-macros/i4947e/Macro_1.scala +++ b/tests/run-macros/i4947e/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def printStack(tag: String): Unit = { diff --git a/tests/run-macros/i4947f/Macro_1.scala b/tests/run-macros/i4947f/Macro_1.scala index ea760e2fa67f..6edcab55dafc 100644 --- a/tests/run-macros/i4947f/Macro_1.scala +++ b/tests/run-macros/i4947f/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def printStack(tag: String): Unit = { diff --git a/tests/run-macros/i4947f/Test_2.scala b/tests/run-macros/i4947f/Test_2.scala index 6a96b58b4d34..86c839416300 100644 --- a/tests/run-macros/i4947f/Test_2.scala +++ b/tests/run-macros/i4947f/Test_2.scala @@ -1,6 +1,6 @@ object Test { - import Macros._ + import Macros.* def main(args: Array[String]): Unit = { val x = 1 diff --git a/tests/run-macros/i5110/quoted_1.scala b/tests/run-macros/i5110/quoted_1.scala index 3648a9f38a38..df4250f089f1 100644 --- a/tests/run-macros/i5110/quoted_1.scala +++ b/tests/run-macros/i5110/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/i5110/quoted_2.scala b/tests/run-macros/i5110/quoted_2.scala index ce0adb2639b8..f3a8d3b66eec 100644 --- a/tests/run-macros/i5110/quoted_2.scala +++ b/tests/run-macros/i5110/quoted_2.scala @@ -1,7 +1,7 @@ import scala.util.Try object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { def bomb = new Bomb diff --git a/tests/run-macros/i5119/Macro_1.scala b/tests/run-macros/i5119/Macro_1.scala index fd2b6c80b6f5..b6e0e1be6bd6 100644 --- a/tests/run-macros/i5119/Macro_1.scala +++ b/tests/run-macros/i5119/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { class StringContextOps(sc: => StringContext) { @@ -6,7 +6,7 @@ object Macro { } implicit inline def XmlQuote(inline sc: StringContext): StringContextOps = new StringContextOps(sc) def impl(sc: Expr[StringContext], args: Expr[Seq[Any]])(using q: Quotes) : Expr[String] = { - import q.reflect._ + import q.reflect.* given Printer[Tree] = Printer.TreeStructure Expr(sc.asTerm.underlyingArgument.show + "\n" + args.asTerm.underlyingArgument.show) } diff --git a/tests/run-macros/i5119/Main_2.scala b/tests/run-macros/i5119/Main_2.scala index 9242dcabc5b1..29ab61481a94 100644 --- a/tests/run-macros/i5119/Main_2.scala +++ b/tests/run-macros/i5119/Main_2.scala @@ -1,6 +1,6 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { println(ff"Hello World ${1}!") diff --git a/tests/run-macros/i5119b/Macro_1.scala b/tests/run-macros/i5119b/Macro_1.scala index fb22b0a04e0f..34b18505225a 100644 --- a/tests/run-macros/i5119b/Macro_1.scala +++ b/tests/run-macros/i5119b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { @@ -6,7 +6,7 @@ object Macro { inline def ff(arg1: Any, arg2: Any): String = ${ Macro.impl('{arg1}, '{arg2}) } def impl(arg1: Expr[Any], arg2: Expr[Any])(using q: Quotes) : Expr[String] = - import q.reflect._ + import q.reflect.* given Printer[Tree] = Printer.TreeStructure Expr(arg1.asTerm.underlyingArgument.show + "\n" + arg2.asTerm.underlyingArgument.show) diff --git a/tests/run-macros/i5119b/Main_2.scala b/tests/run-macros/i5119b/Main_2.scala index e6a797d97dca..0003d025cc70 100644 --- a/tests/run-macros/i5119b/Main_2.scala +++ b/tests/run-macros/i5119b/Main_2.scala @@ -1,6 +1,6 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { println(ff(arg1 = foo(1), arg2 = foo(2))) diff --git a/tests/run-macros/i5188a/Macro_1.scala b/tests/run-macros/i5188a/Macro_1.scala index 58a51d476312..252f5245c9ea 100644 --- a/tests/run-macros/i5188a/Macro_1.scala +++ b/tests/run-macros/i5188a/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Lib { inline def sum(inline args: Int*): Int = ${ impl('args) } diff --git a/tests/run-macros/i5533/Macro_1.scala b/tests/run-macros/i5533/Macro_1.scala index 701982a9c7a1..7f5ba35e3fe7 100644 --- a/tests/run-macros/i5533/Macro_1.scala +++ b/tests/run-macros/i5533/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { @@ -8,7 +8,7 @@ object scalatest { inline def assert(condition: => Boolean): Unit = ${assertImpl('condition)} def assertImpl(condition: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = condition.asTerm diff --git a/tests/run-macros/i5533/Test_2.scala b/tests/run-macros/i5533/Test_2.scala index e982bb0fa7e9..708bbb1e04db 100644 --- a/tests/run-macros/i5533/Test_2.scala +++ b/tests/run-macros/i5533/Test_2.scala @@ -1,7 +1,7 @@ object Test { def main(args: Array[String]): Unit = { - import scalatest._ + import scalatest.* val x = "String" assert(f("abc")) } diff --git a/tests/run-macros/i5533b/Macro_1.scala b/tests/run-macros/i5533b/Macro_1.scala index bd172b4edbf3..74b136bf4fb2 100644 --- a/tests/run-macros/i5533b/Macro_1.scala +++ b/tests/run-macros/i5533b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { def f(x: Int): Int = x @@ -7,7 +7,7 @@ object scalatest { inline def assert(condition: => Boolean): Unit = ${assertImpl('condition)} def assertImpl(condition: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = condition.asTerm def exprStr: String = condition.show diff --git a/tests/run-macros/i5533b/Test_2.scala b/tests/run-macros/i5533b/Test_2.scala index 3d07d155ad23..feb1ed10ca53 100644 --- a/tests/run-macros/i5533b/Test_2.scala +++ b/tests/run-macros/i5533b/Test_2.scala @@ -1,7 +1,7 @@ object Test { def main(args: Array[String]): Unit = { - import scalatest._ + import scalatest.* val x = "String" println(assert(f(x) == "String")) } diff --git a/tests/run-macros/i5536/Macro_1.scala b/tests/run-macros/i5536/Macro_1.scala index bd0cc2402077..6e99c118e9bf 100644 --- a/tests/run-macros/i5536/Macro_1.scala +++ b/tests/run-macros/i5536/Macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${assertImpl('condition)} def assertImpl(condition: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = condition.asTerm def exprStr: String = condition.show diff --git a/tests/run-macros/i5536/Test_2.scala b/tests/run-macros/i5536/Test_2.scala index 671ff6044f28..02910e9af71c 100644 --- a/tests/run-macros/i5536/Test_2.scala +++ b/tests/run-macros/i5536/Test_2.scala @@ -9,8 +9,8 @@ object Equality { object Test { - import scalatest._ - import Equality._ + import scalatest.* + import Equality.* def main(args: Array[String]): Unit = { val x = "String" diff --git a/tests/run-macros/i5629/Macro_1.scala b/tests/run-macros/i5629/Macro_1.scala index 641f276b7da0..16a80623396b 100644 --- a/tests/run-macros/i5629/Macro_1.scala +++ b/tests/run-macros/i5629/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def assert(condition: => Boolean): Unit = ${ assertImpl('{condition}, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val b = cond.asTerm.underlyingArgument.asExprOf[Boolean] '{ scala.Predef.assert($b) } } @@ -13,7 +13,7 @@ object Macros { inline def thisLineNumber = ${ thisLineNumberImpl } def thisLineNumberImpl(using Quotes) : Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* Expr(Position.ofMacroExpansion.startLine) } } diff --git a/tests/run-macros/i5629/Test_2.scala b/tests/run-macros/i5629/Test_2.scala index 329f3be6aee7..f098f61790a2 100644 --- a/tests/run-macros/i5629/Test_2.scala +++ b/tests/run-macros/i5629/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macros._ + import Macros.* def main(args: Array[String]): Unit = { val startLine = thisLineNumber diff --git a/tests/run-macros/i5715/Macro_1.scala b/tests/run-macros/i5715/Macro_1.scala index e0d476d5eb16..5f4e1ecca452 100644 --- a/tests/run-macros/i5715/Macro_1.scala +++ b/tests/run-macros/i5715/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* cond.asTerm.underlyingArgument match { case app @ Apply(select @ Select(lhs, op), rhs :: Nil) => diff --git a/tests/run-macros/i5715/Test_2.scala b/tests/run-macros/i5715/Test_2.scala index 19a116cf3f85..1754cb626999 100644 --- a/tests/run-macros/i5715/Test_2.scala +++ b/tests/run-macros/i5715/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* def main(args: Array[String]): Unit = { val l = List(3, 4) diff --git a/tests/run-macros/i5941/macro_1.scala b/tests/run-macros/i5941/macro_1.scala index 13b8e62c1116..154399d63c45 100644 --- a/tests/run-macros/i5941/macro_1.scala +++ b/tests/run-macros/i5941/macro_1.scala @@ -3,7 +3,7 @@ trait Lens[S, T] { def set(t: T, s: S) :S } -import scala.quoted._ +import scala.quoted.* object Lens { def apply[S, T](_get: S => T)(_set: T => S => S): Lens[S, T] = new Lens { @@ -12,8 +12,8 @@ object Lens { } def impl[S: Type, T: Type](getter: Expr[S => T])(using Quotes) : Expr[Lens[S, T]] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* // obj.copy(a = obj.a.copy(b = a.b.copy(c = v))) def setterBody(obj: Term, value: Term, parts: List[String]): Term = { @@ -85,8 +85,8 @@ object Iso { } def impl[S: Type, A: Type](using Quotes) : Expr[Iso[S, A]] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* val tpS = TypeRepr.of[S] val tpA = TypeRepr.of[A] @@ -124,8 +124,8 @@ object Iso { } def implUnit[S: Type](using Quotes) : Expr[Iso[S, 1]] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* val tpS = TypeRepr.of[S] @@ -196,8 +196,8 @@ object Prism { } def impl[S: Type, A <: S : Type](using Quotes) : Expr[Prism[S, A]] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* '{ val get = (p: S) => if (p.isInstanceOf[A]) Some(p.asInstanceOf[A]) else None diff --git a/tests/run-macros/i6171/Macro_1.scala b/tests/run-macros/i6171/Macro_1.scala index f34e1df8aca0..9fa8251fd71a 100644 --- a/tests/run-macros/i6171/Macro_1.scala +++ b/tests/run-macros/i6171/Macro_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp match case tp: MethodType => tp.isImplicit diff --git a/tests/run-macros/i6171/Test_2.scala b/tests/run-macros/i6171/Test_2.scala index 2e776cd4e1c7..7353506c637c 100644 --- a/tests/run-macros/i6171/Test_2.scala +++ b/tests/run-macros/i6171/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* def main(args: Array[String]): Unit = { assert(new Some(5).get == 5L) diff --git a/tests/run-macros/i6201/macro_1.scala b/tests/run-macros/i6201/macro_1.scala index 9dd1bc6a9fe9..2b87f431f3d9 100644 --- a/tests/run-macros/i6201/macro_1.scala +++ b/tests/run-macros/i6201/macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* extension (inline x: String) inline def strip: String = ${ stripImpl('x) } diff --git a/tests/run-macros/i6253-b/quoted_1.scala b/tests/run-macros/i6253-b/quoted_1.scala index 8e01b3f719db..ddfc75aeb7e5 100644 --- a/tests/run-macros/i6253-b/quoted_1.scala +++ b/tests/run-macros/i6253-b/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/i6253-b/quoted_2.scala b/tests/run-macros/i6253-b/quoted_2.scala index 2a85eca35e41..72719a78c466 100644 --- a/tests/run-macros/i6253-b/quoted_2.scala +++ b/tests/run-macros/i6253-b/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/i6253-c/quoted_1.scala b/tests/run-macros/i6253-c/quoted_1.scala index 39281b9cd79c..1708aff5d68b 100644 --- a/tests/run-macros/i6253-c/quoted_1.scala +++ b/tests/run-macros/i6253-c/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/i6253-c/quoted_2.scala b/tests/run-macros/i6253-c/quoted_2.scala index 2a85eca35e41..72719a78c466 100644 --- a/tests/run-macros/i6253-c/quoted_2.scala +++ b/tests/run-macros/i6253-c/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/i6253/quoted_1.scala b/tests/run-macros/i6253/quoted_1.scala index 2e05cc17f625..fd8a9bdeb2f0 100644 --- a/tests/run-macros/i6253/quoted_1.scala +++ b/tests/run-macros/i6253/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/i6253/quoted_2.scala b/tests/run-macros/i6253/quoted_2.scala index 2a85eca35e41..72719a78c466 100644 --- a/tests/run-macros/i6253/quoted_2.scala +++ b/tests/run-macros/i6253/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/i6270/Macro_1.scala b/tests/run-macros/i6270/Macro_1.scala index d50beaaebc65..e073ee073e01 100644 --- a/tests/run-macros/i6270/Macro_1.scala +++ b/tests/run-macros/i6270/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object api { extension (inline x: String) inline def reflect : String = ${ reflImpl('x) } private def reflImpl(x: Expr[String])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* Expr(x.show) } @@ -13,7 +13,7 @@ object api { ${ reflImplColor('x) } private def reflImplColor(x: Expr[String])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* Expr(x.asTerm.show(using Printer.TreeAnsiCode)) } } diff --git a/tests/run-macros/i6270/Test_2.scala b/tests/run-macros/i6270/Test_2.scala index a1b398712cd2..c57d96b4ef33 100644 --- a/tests/run-macros/i6270/Test_2.scala +++ b/tests/run-macros/i6270/Test_2.scala @@ -1,4 +1,4 @@ -import api._ +import api.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/i6518/Macro_1.scala b/tests/run-macros/i6518/Macro_1.scala index 0185b311d332..471cfb9d1986 100644 --- a/tests/run-macros/i6518/Macro_1.scala +++ b/tests/run-macros/i6518/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def test(): String = ${ testImpl } private def testImpl(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val classSym = TypeRepr.of[Function1].classSymbol.get classSym.declaredMethod("apply") classSym.declaredMethods diff --git a/tests/run-macros/i6622.scala b/tests/run-macros/i6622.scala index e883a212bf2f..eb11d150662c 100644 --- a/tests/run-macros/i6622.scala +++ b/tests/run-macros/i6622.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* object Test { diff --git a/tests/run-macros/i6679/Macro_1.scala b/tests/run-macros/i6679/Macro_1.scala index 663b23f7e7cd..50788d7bb7eb 100644 --- a/tests/run-macros/i6679/Macro_1.scala +++ b/tests/run-macros/i6679/Macro_1.scala @@ -1,7 +1,7 @@ -import scala.quoted._ +import scala.quoted.* def makeMatch[A: Type](head : Expr[A])(using qctx : Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val sacrifice = '{ $head match { case _ => ??? } } sacrifice.asTerm diff --git a/tests/run-macros/i6679/Test_2.scala b/tests/run-macros/i6679/Test_2.scala index 89e8042dbbbf..e2eab5d1a716 100644 --- a/tests/run-macros/i6679/Test_2.scala +++ b/tests/run-macros/i6679/Test_2.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Test { diff --git a/tests/run-macros/i6765-b/Macro_1.scala b/tests/run-macros/i6765-b/Macro_1.scala index 1beb85e13495..5e96fefca74b 100644 --- a/tests/run-macros/i6765-b/Macro_1.scala +++ b/tests/run-macros/i6765-b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def foo = ${fooImpl} diff --git a/tests/run-macros/i6765-c/Macro_1.scala b/tests/run-macros/i6765-c/Macro_1.scala index d8f3d3baf7bb..c3401a7f53da 100644 --- a/tests/run-macros/i6765-c/Macro_1.scala +++ b/tests/run-macros/i6765-c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def foo(inline n: Int) = ${fooImpl('n)} diff --git a/tests/run-macros/i6765/Macro_1.scala b/tests/run-macros/i6765/Macro_1.scala index 15a8a1714772..13220473af90 100644 --- a/tests/run-macros/i6765/Macro_1.scala +++ b/tests/run-macros/i6765/Macro_1.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* inline def foo = ${fooImpl} def fooImpl(using Quotes) = { - import quotes.reflect._ + import quotes.reflect.* val res = Expr.ofList(List('{"One"})) Expr(res.show) } diff --git a/tests/run-macros/i6772/Macro_1.scala b/tests/run-macros/i6772/Macro_1.scala index e1bb395dbd77..1bf33e653292 100644 --- a/tests/run-macros/i6772/Macro_1.scala +++ b/tests/run-macros/i6772/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/i6772/Test_2.scala b/tests/run-macros/i6772/Test_2.scala index 23805df36462..82587e1a9a02 100644 --- a/tests/run-macros/i6772/Test_2.scala +++ b/tests/run-macros/i6772/Test_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/i6803/Macro_1.scala b/tests/run-macros/i6803/Macro_1.scala index 795dd2fc4538..c09a2846f32b 100644 --- a/tests/run-macros/i6803/Macro_1.scala +++ b/tests/run-macros/i6803/Macro_1.scala @@ -1,7 +1,7 @@ package blah import scala.language.implicitConversions -import scala.quoted._ +import scala.quoted.* object AsObject { final class LineNo(val lineNo: Int) @@ -9,7 +9,7 @@ object AsObject { def unsafe(i: Int): LineNo = new LineNo(i) inline given LineNo = ${impl} private def impl(using Quotes): Expr[LineNo] = { - import quotes.reflect._ + import quotes.reflect.* '{unsafe(${Expr(Position.ofMacroExpansion.startLine)})} } } @@ -21,7 +21,7 @@ package AsPackage { def unsafe(i: Int): LineNo = new LineNo(i) inline given LineNo = ${impl} private def impl(using Quotes): Expr[LineNo] = { - import quotes.reflect._ + import quotes.reflect.* '{unsafe(${Expr(Position.ofMacroExpansion.startLine)})} } } diff --git a/tests/run-macros/i6803/Test_2.scala b/tests/run-macros/i6803/Test_2.scala index 63bc7923cea8..d55acc65364a 100644 --- a/tests/run-macros/i6803/Test_2.scala +++ b/tests/run-macros/i6803/Test_2.scala @@ -1,4 +1,4 @@ -import blah._ +import blah.* def testO(): Unit = { import AsObject.LineNo diff --git a/tests/run-macros/i6988/FirstArg_1.scala b/tests/run-macros/i6988/FirstArg_1.scala index d3f9176456df..85a89b7d0dac 100644 --- a/tests/run-macros/i6988/FirstArg_1.scala +++ b/tests/run-macros/i6988/FirstArg_1.scala @@ -6,10 +6,10 @@ object FirstArg { } object Macros { - import scala.quoted._ + import scala.quoted.* def argsImpl(using Quotes) : Expr[FirstArg] = { - import quotes.reflect._ + import quotes.reflect.* def enclosingClass(cur: Symbol = Symbol.spliceOwner): Symbol = if (cur.isClassDef) cur diff --git a/tests/run-macros/i7008/macro_1.scala b/tests/run-macros/i7008/macro_1.scala index 3fc9235507bc..b6781179c23c 100644 --- a/tests/run-macros/i7008/macro_1.scala +++ b/tests/run-macros/i7008/macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Box[T](v: T) @@ -11,7 +11,7 @@ def mcrProxy(expr: Expr[Boolean])(using Quotes): Expr[Unit] = { } def mcrImpl[T](func: Expr[Seq[Box[T]] => Unit], expr: Expr[T])(using Quotes, Type[T]): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val arg = Varargs(Seq('{(Box($expr))})) Expr.betaReduce('{$func($arg)}) } diff --git a/tests/run-macros/i7025/Macros_1.scala b/tests/run-macros/i7025/Macros_1.scala index 456902b1a617..8ee30d65d2c8 100644 --- a/tests/run-macros/i7025/Macros_1.scala +++ b/tests/run-macros/i7025/Macros_1.scala @@ -1,10 +1,10 @@ object Macros { - import scala.quoted._ + import scala.quoted.* inline def debug: Unit = ${Macros.debugImpl} def debugImpl(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* def nearestEnclosingDef(owner: Symbol): Symbol = if owner.isClassDef then owner diff --git a/tests/run-macros/i7048/Lib_1.scala b/tests/run-macros/i7048/Lib_1.scala index 07c78587073b..3b9fdec5afde 100644 --- a/tests/run-macros/i7048/Lib_1.scala +++ b/tests/run-macros/i7048/Lib_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait IsExpr[T] { type Underlying diff --git a/tests/run-macros/i7519c/Macro_1.scala b/tests/run-macros/i7519c/Macro_1.scala index da7f7a2288f6..2d9632f5a44f 100644 --- a/tests/run-macros/i7519c/Macro_1.scala +++ b/tests/run-macros/i7519c/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.annotation.StaticAnnotation class Annot(in: Int) extends StaticAnnotation diff --git a/tests/run-macros/i7715/Macros_1.scala b/tests/run-macros/i7715/Macros_1.scala index b44c6487687a..2aa7e2e947c7 100644 --- a/tests/run-macros/i7715/Macros_1.scala +++ b/tests/run-macros/i7715/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def mcr(e: => Any): Any = ${mcrImpl('e)} def mcrImpl(e: Expr[Any])(using ctx: Quotes): Expr[Any] = diff --git a/tests/run-macros/i7716/Macro_1.scala b/tests/run-macros/i7716/Macro_1.scala index 01f4e5184a12..9bb5e7035584 100644 --- a/tests/run-macros/i7716/Macro_1.scala +++ b/tests/run-macros/i7716/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait Foo: def mcrImpl1(e: Expr[Any])(using ctx: Quotes): Expr[Any] = @@ -9,7 +9,7 @@ object Foo extends Foo: '{println(s"Hello ${$e}")} object Bar: - import Foo._ + import Foo.* inline def mcr1(e: => Any) = ${mcrImpl1('e)} inline def mcr2(e: => Any) = ${Foo.mcrImpl1('e)} diff --git a/tests/run-macros/i7887/Macro_1.scala b/tests/run-macros/i7887/Macro_1.scala index dc867bc512cd..9ba02c41ab23 100644 --- a/tests/run-macros/i7887/Macro_1.scala +++ b/tests/run-macros/i7887/Macro_1.scala @@ -1,5 +1,5 @@ def myMacroImpl(a: quoted.Expr[_])(using qctx: quoted.Quotes) = { - import scala.quoted.quotes.reflect._ + import scala.quoted.quotes.reflect.* def typed[A] = { implicit val t: quoted.Type[A] = a.asTerm.tpe.widen.asType.asInstanceOf[quoted.Type[A]] '{ diff --git a/tests/run-macros/i7898/Macro_1.scala b/tests/run-macros/i7898/Macro_1.scala index 8ac47bb1e1bd..9a87787b895e 100644 --- a/tests/run-macros/i7898/Macro_1.scala +++ b/tests/run-macros/i7898/Macro_1.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* object Main { def myMacroImpl(body: Expr[_])(using Quotes) : Expr[_] = { - import quotes.reflect._ + import quotes.reflect.* val bodyTerm = underlyingArgument(body).asTerm val showed = bodyTerm.show '{ @@ -17,6 +17,6 @@ object Main { } def underlyingArgument[T](expr: Expr[T])(using Quotes): Expr[T] = - import quotes.reflect._ + import quotes.reflect.* expr.asTerm.underlyingArgument.asExpr.asInstanceOf[Expr[T]] } diff --git a/tests/run-macros/i7964/Macro_1.scala b/tests/run-macros/i7964/Macro_1.scala index c2054c4372b6..d7923d197762 100644 --- a/tests/run-macros/i7964/Macro_1.scala +++ b/tests/run-macros/i7964/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* enum Num { // TODO derive a quoted.FromExpr case One diff --git a/tests/run-macros/i7987/Macros_1.scala b/tests/run-macros/i7987/Macros_1.scala index ecb136b23d49..e11dd698208e 100644 --- a/tests/run-macros/i7987/Macros_1.scala +++ b/tests/run-macros/i7987/Macros_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.deriving._ +import scala.quoted.* +import scala.deriving.* object Macros { diff --git a/tests/run-macros/i8007/Macro_1.scala b/tests/run-macros/i8007/Macro_1.scala index 56f72417ed86..2949aa68584a 100644 --- a/tests/run-macros/i8007/Macro_1.scala +++ b/tests/run-macros/i8007/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.deriving._ -import scala.quoted._ +import scala.deriving.* +import scala.quoted.* object Macro1 { @@ -17,7 +17,7 @@ object Macro1 { ${ test1Impl('value) } def test1Impl[T: Type](value: Expr[T])(using Quotes): Expr[List[String]] = { - import quotes.reflect._ + import quotes.reflect.* val mirrorTpe = Type.of[Mirror.Of[T]] diff --git a/tests/run-macros/i8007/Macro_2.scala b/tests/run-macros/i8007/Macro_2.scala index 4e38c86fd4b0..eb8e2ad6bebd 100644 --- a/tests/run-macros/i8007/Macro_2.scala +++ b/tests/run-macros/i8007/Macro_2.scala @@ -1,5 +1,5 @@ -import scala.deriving._ -import scala.quoted._ +import scala.deriving.* +import scala.quoted.* object Macro2 { @@ -21,7 +21,7 @@ object Macro2 { } def derived[T: Type](ev: Expr[Mirror.Of[T]])(using Quotes): Expr[JsonEncoder[T]] = { - import quotes.reflect._ + import quotes.reflect.* val fields = ev match { case '{ $m: Mirror.ProductOf[T] { type MirroredElemLabels = labels } } => @@ -43,7 +43,7 @@ object Macro2 { inline def test2[T](value: =>T): Unit = ${ test2Impl('value) } def test2Impl[T: Type](value: Expr[T])(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val mirrorTpe = Type.of[Mirror.Of[T]] val mirrorExpr = Expr.summon(using mirrorTpe).get diff --git a/tests/run-macros/i8007/Macro_3.scala b/tests/run-macros/i8007/Macro_3.scala index 6848627da138..8a11dccb9a20 100644 --- a/tests/run-macros/i8007/Macro_3.scala +++ b/tests/run-macros/i8007/Macro_3.scala @@ -1,5 +1,5 @@ -import scala.deriving._ -import scala.quoted._ +import scala.deriving.* +import scala.quoted.* trait Eq[T] { @@ -33,7 +33,7 @@ object Eq { } given derived[T: Type](using q: Quotes): Expr[Eq[T]] = { - import quotes.reflect._ + import quotes.reflect.* val ev: Expr[Mirror.Of[T]] = Expr.summon(using Type.of[Mirror.Of[T]]).get diff --git a/tests/run-macros/i8007/Test_4.scala b/tests/run-macros/i8007/Test_4.scala index 742a1c6e3dea..de314d15df15 100644 --- a/tests/run-macros/i8007/Test_4.scala +++ b/tests/run-macros/i8007/Test_4.scala @@ -1,6 +1,6 @@ -import Macro1._ -import Macro2._ -import Macro3._ +import Macro1.* +import Macro2.* +import Macro3.* import Macro3.eqGen case class Person(name: String, age: Int) @@ -16,8 +16,8 @@ enum OptInv[+T] { } @main def Test() = { - import Opt._ - import Eq.{given, _} + import Opt.* + import Eq.{given, *} val t1 = test1(Person("Test", 23)) println(t1) diff --git a/tests/run-macros/i8115/Macro_2.scala b/tests/run-macros/i8115/Macro_2.scala index a8c4e0edb4b0..fe7aef1dde0f 100644 --- a/tests/run-macros/i8115/Macro_2.scala +++ b/tests/run-macros/i8115/Macro_2.scala @@ -1,6 +1,6 @@ package example -import scala.quoted._ +import scala.quoted.* object MyClassMaker { inline def make: MyClass = ${ makeImpl } diff --git a/tests/run-macros/i8115b/Macro_2.scala b/tests/run-macros/i8115b/Macro_2.scala index 23c546e7f47f..2d8a9901671f 100644 --- a/tests/run-macros/i8115b/Macro_2.scala +++ b/tests/run-macros/i8115b/Macro_2.scala @@ -1,6 +1,6 @@ package example -import scala.quoted._ +import scala.quoted.* object MyClassMaker { inline def make: MyClass = ${ makeImpl } diff --git a/tests/run-macros/i8306.scala b/tests/run-macros/i8306.scala index dbb9d6870f08..77431e13ee7f 100644 --- a/tests/run-macros/i8306.scala +++ b/tests/run-macros/i8306.scala @@ -1,4 +1,4 @@ -import scala.compiletime._ +import scala.compiletime.* case class A(i: Int) case class B(a: A) diff --git a/tests/run-macros/i8514/Macro_1.scala b/tests/run-macros/i8514/Macro_1.scala index b70c107026f3..cf2476ca659b 100644 --- a/tests/run-macros/i8514/Macro_1.scala +++ b/tests/run-macros/i8514/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class A class B extends A @@ -7,7 +7,7 @@ class C extends B inline def test(): Unit = ${ testExpr } def testExpr(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* '{ println(${Expr(TypeRepr.of[Object].baseClasses.toString)}) diff --git a/tests/run-macros/i8514b/Macro_1.scala b/tests/run-macros/i8514b/Macro_1.scala index ffa2a67f3ec9..c7a43b5fb891 100644 --- a/tests/run-macros/i8514b/Macro_1.scala +++ b/tests/run-macros/i8514b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class A[+X[_], -Y] class P[T] @@ -7,7 +7,7 @@ class B extends A[P, String] inline def test(): Unit = ${ testExpr } def testExpr(using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val t = TypeRepr.of[B] val baseTypes = t.baseClasses.map(b => t.baseType(b)) diff --git a/tests/run-macros/i8520/Macro_1.scala b/tests/run-macros/i8520/Macro_1.scala index 67bf962e69f9..e582bc95cc52 100644 --- a/tests/run-macros/i8520/Macro_1.scala +++ b/tests/run-macros/i8520/Macro_1.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* inline def test[T[_]]: Unit = ${ testExpr[T] } def testExpr[T[_]: Type](using Quotes): Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* def variance(f: Flags) = if f.is(Flags.Covariant) then "+" else if f.is(Flags.Contravariant) then "-" diff --git a/tests/run-macros/i8530/Macro_1.scala b/tests/run-macros/i8530/Macro_1.scala index dc431c14ef14..0c15284141cb 100644 --- a/tests/run-macros/i8530/Macro_1.scala +++ b/tests/run-macros/i8530/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Succ: diff --git a/tests/run-macros/i8671/Macro_1.scala b/tests/run-macros/i8671/Macro_1.scala index 21adda3e15e8..c00d901a66e3 100644 --- a/tests/run-macros/i8671/Macro_1.scala +++ b/tests/run-macros/i8671/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class FileName private(name: String) diff --git a/tests/run-macros/i8671/Test_2.scala b/tests/run-macros/i8671/Test_2.scala index e2fc4f0416b2..7d0b62715288 100644 --- a/tests/run-macros/i8671/Test_2.scala +++ b/tests/run-macros/i8671/Test_2.scala @@ -1,4 +1,4 @@ -import FileName._ +import FileName.* @main def Test = { val fileName1: FileName = ToFileName("fileName1") diff --git a/tests/run-macros/i8745/Macro_1.scala b/tests/run-macros/i8745/Macro_1.scala index 23a44412789b..47325d7fb633 100644 --- a/tests/run-macros/i8745/Macro_1.scala +++ b/tests/run-macros/i8745/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Companion extends Trait trait Trait { diff --git a/tests/run-macros/i8745/Test_2.scala b/tests/run-macros/i8745/Test_2.scala index 6d6770c14338..b3a09ddfb3ff 100644 --- a/tests/run-macros/i8745/Test_2.scala +++ b/tests/run-macros/i8745/Test_2.scala @@ -1,6 +1,6 @@ -import Macro._ +import Macro.* @main def Test() = { //hello - import Companion._ + import Companion.* mac(fun("blah")) } diff --git a/tests/run-macros/i8745b/Macro_1.scala b/tests/run-macros/i8745b/Macro_1.scala index bebb6cf6c382..d51623aa565a 100644 --- a/tests/run-macros/i8745b/Macro_1.scala +++ b/tests/run-macros/i8745b/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Companion { def fun(first: String): String = "anything" diff --git a/tests/run-macros/i8745b/Test_2.scala b/tests/run-macros/i8745b/Test_2.scala index 6d6770c14338..b3a09ddfb3ff 100644 --- a/tests/run-macros/i8745b/Test_2.scala +++ b/tests/run-macros/i8745b/Test_2.scala @@ -1,6 +1,6 @@ -import Macro._ +import Macro.* @main def Test() = { //hello - import Companion._ + import Companion.* mac(fun("blah")) } diff --git a/tests/run-macros/i8746/Macro_1.scala b/tests/run-macros/i8746/Macro_1.scala index e8f8143b1f23..8ba4beda0d68 100644 --- a/tests/run-macros/i8746/Macro_1.scala +++ b/tests/run-macros/i8746/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def mac(): String = ${ macImpl() } diff --git a/tests/run-macros/i8746/Test_2.scala b/tests/run-macros/i8746/Test_2.scala index 9a3dce5970d0..a9c647cfc95c 100644 --- a/tests/run-macros/i8746/Test_2.scala +++ b/tests/run-macros/i8746/Test_2.scala @@ -1,4 +1,4 @@ -import Macro._ +import Macro.* @main def Test() = { // hello mac() diff --git a/tests/run-macros/i8746b/Macro_1.scala b/tests/run-macros/i8746b/Macro_1.scala index 8110716fa795..face5605e544 100644 --- a/tests/run-macros/i8746b/Macro_1.scala +++ b/tests/run-macros/i8746b/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def mac(inline tree: Any): String = ${ macImpl('tree) } diff --git a/tests/run-macros/i8746b/Test_2.scala b/tests/run-macros/i8746b/Test_2.scala index 251549d10349..15616dbd0527 100644 --- a/tests/run-macros/i8746b/Test_2.scala +++ b/tests/run-macros/i8746b/Test_2.scala @@ -1,6 +1,6 @@ -import Macro._ +import Macro.* -import Macro._ +import Macro.* @main def Test() = { //hello mac((x: String) => "anything") diff --git a/tests/run-macros/i9206/Macros_1.scala b/tests/run-macros/i9206/Macros_1.scala index 83692c4960b8..14ed1539eb5d 100644 --- a/tests/run-macros/i9206/Macros_1.scala +++ b/tests/run-macros/i9206/Macros_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Inspect { inline def inspect[T <: AnyKind]: String = ${ inspectTpe[T] } diff --git a/tests/run-macros/i9206/Test_2.scala b/tests/run-macros/i9206/Test_2.scala index 425fa232e9ee..c9e0c2794022 100644 --- a/tests/run-macros/i9206/Test_2.scala +++ b/tests/run-macros/i9206/Test_2.scala @@ -1,4 +1,4 @@ -import Inspect._ +import Inspect.* object Test extends App { inspect[scala.collection.immutable.List[Int]] diff --git a/tests/run-macros/i9475/Macro_1.scala b/tests/run-macros/i9475/Macro_1.scala index a9092e6c6ee9..59379097ff49 100644 --- a/tests/run-macros/i9475/Macro_1.scala +++ b/tests/run-macros/i9475/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Exp { diff --git a/tests/run-macros/i9570/Macro_1.scala b/tests/run-macros/i9570/Macro_1.scala index c8a9aa196713..b02ce6fb645b 100644 --- a/tests/run-macros/i9570/Macro_1.scala +++ b/tests/run-macros/i9570/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -8,7 +8,7 @@ object Macros { case object HNil extends HList private def sizeImpl(e: Expr[HList], n:Int)(using qctx:Quotes): Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* e match { case '{HCons($_,$t)} => //case '{HCons($a,$t)} => diff --git a/tests/run-macros/i9570/Test_2.scala b/tests/run-macros/i9570/Test_2.scala index e8ddad50d187..5f53d619e2c5 100644 --- a/tests/run-macros/i9570/Test_2.scala +++ b/tests/run-macros/i9570/Test_2.scala @@ -1,7 +1,7 @@ object Test { def main(args: Array[String]): Unit = { - import Macros.HList._ + import Macros.HList.* val hl0n = size( HCons(("1",1), HCons(("2",2), HCons(("3",3),HNil))) ) println(s"size(?) = $hl0n") diff --git a/tests/run-macros/i9812b/Macro_1.scala b/tests/run-macros/i9812b/Macro_1.scala index ed1873195323..75cd0b5c19a8 100644 --- a/tests/run-macros/i9812b/Macro_1.scala +++ b/tests/run-macros/i9812b/Macro_1.scala @@ -1,5 +1,5 @@ -import quoted._ -import SomeEnum._ +import quoted.* +import SomeEnum.* trait Liftable[T] { /** Lift a value into an expression containing the construction of that value */ @@ -28,7 +28,7 @@ case object NIL extends Lst[Nothing] given IntLiftable[T <: Int]: Liftable[T] with def toExpr(x: T): Quotes ?=> Expr[T] = qctx ?=> { - import quotes.reflect._ + import quotes.reflect.* Literal(IntConstant(x)).asExpr.asInstanceOf[Expr[T]] } diff --git a/tests/run-macros/inferred-repeated-result/test_1.scala b/tests/run-macros/inferred-repeated-result/test_1.scala index c3e7d0a2ac5b..4e9291453c9a 100644 --- a/tests/run-macros/inferred-repeated-result/test_1.scala +++ b/tests/run-macros/inferred-repeated-result/test_1.scala @@ -1,9 +1,9 @@ object Macros { - import scala.quoted._ + import scala.quoted.* inline def go[T](inline t: T) = ${ impl('t) } def impl[T](expr: Expr[T])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = expr.asTerm diff --git a/tests/run-macros/inline-case-objects/Macro_1.scala b/tests/run-macros/inline-case-objects/Macro_1.scala index 3839dfdd870a..d48a6cf9b2e0 100644 --- a/tests/run-macros/inline-case-objects/Macro_1.scala +++ b/tests/run-macros/inline-case-objects/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def impl(expr: Expr[Any]) (using Quotes): Expr[String] = diff --git a/tests/run-macros/inline-macro-inner-object/Macro_1.scala b/tests/run-macros/inline-macro-inner-object/Macro_1.scala index 132667b298ca..ef9c9fb537f0 100644 --- a/tests/run-macros/inline-macro-inner-object/Macro_1.scala +++ b/tests/run-macros/inline-macro-inner-object/Macro_1.scala @@ -1,6 +1,6 @@ package blah -import scala.quoted._ +import scala.quoted.* object A { inline def f: Unit = ${impl} diff --git a/tests/run-macros/inline-macro-inner-object/Test_2.scala b/tests/run-macros/inline-macro-inner-object/Test_2.scala index 6f078264f0f0..8209c8f045cc 100644 --- a/tests/run-macros/inline-macro-inner-object/Test_2.scala +++ b/tests/run-macros/inline-macro-inner-object/Test_2.scala @@ -1,4 +1,4 @@ -import blah._ +import blah.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/inline-macro-staged-interpreter/Macro_1.scala b/tests/run-macros/inline-macro-staged-interpreter/Macro_1.scala index 48f71e9f45f1..d8cf1c788851 100644 --- a/tests/run-macros/inline-macro-staged-interpreter/Macro_1.scala +++ b/tests/run-macros/inline-macro-staged-interpreter/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object E { diff --git a/tests/run-macros/inline-option/Macro_1.scala b/tests/run-macros/inline-option/Macro_1.scala index 4656859286ac..4021658bc17a 100644 --- a/tests/run-macros/inline-option/Macro_1.scala +++ b/tests/run-macros/inline-option/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/inline-tuples-1/Macro_1.scala b/tests/run-macros/inline-tuples-1/Macro_1.scala index 76ba8fcb0dc0..031fb01cabe4 100644 --- a/tests/run-macros/inline-tuples-1/Macro_1.scala +++ b/tests/run-macros/inline-tuples-1/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def tup1(tup: Expr[Tuple1[Int]]) (using Quotes): Expr[Int] = Expr(tup.valueOrError.productIterator.map(_.asInstanceOf[Int]).sum) diff --git a/tests/run-macros/inline-tuples-2/Macro_1.scala b/tests/run-macros/inline-tuples-2/Macro_1.scala index 6cbd8d929df4..7027a1f2680a 100644 --- a/tests/run-macros/inline-tuples-2/Macro_1.scala +++ b/tests/run-macros/inline-tuples-2/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/inline-varargs-1/Macro_1.scala b/tests/run-macros/inline-varargs-1/Macro_1.scala index 3dcd8b211931..ed58d1479059 100644 --- a/tests/run-macros/inline-varargs-1/Macro_1.scala +++ b/tests/run-macros/inline-varargs-1/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def sum(nums: Expr[Int]*) (using Quotes): Expr[Int] = Expr(nums.map(_.valueOrError).sum) diff --git a/tests/run-macros/lib-StringContext/StringContext.scala b/tests/run-macros/lib-StringContext/StringContext.scala index d695242e7148..f59f00c7db08 100644 --- a/tests/run-macros/lib-StringContext/StringContext.scala +++ b/tests/run-macros/lib-StringContext/StringContext.scala @@ -12,7 +12,7 @@ package scala - import java.lang.{ StringBuilder => JLSBuilder } + import java.lang.StringBuilder as JLSBuilder import scala.annotation.tailrec /** This class provides the basic mechanism to do String Interpolation. @@ -56,7 +56,7 @@ */ case class StringContext(parts: String*) { - import StringContext.{checkLengths => scCheckLengths, glob, standardInterpolator => scStandardInterpolator} + import StringContext.{checkLengths as scCheckLengths, glob, standardInterpolator as scStandardInterpolator} @deprecated("use same-named method on StringContext companion object", "2.13.0") def checkLengths(args: scala.collection.Seq[Any]): Unit = scCheckLengths(args, parts) diff --git a/tests/run-macros/macros-in-same-project1/Foo.scala b/tests/run-macros/macros-in-same-project1/Foo.scala index 000fb979a3d9..a001dbbcdf90 100644 --- a/tests/run-macros/macros-in-same-project1/Foo.scala +++ b/tests/run-macros/macros-in-same-project1/Foo.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/run-macros/no-symbol/1.scala b/tests/run-macros/no-symbol/1.scala index ed33810c145b..e2187f6d8ff4 100644 --- a/tests/run-macros/no-symbol/1.scala +++ b/tests/run-macros/no-symbol/1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.deriving._ +import scala.quoted.* +import scala.deriving.* case class Foo(i: Int) case class Box[A](x: A) @@ -9,7 +9,7 @@ object Macro { ${ fooImpl[T] } def fooImpl[T](implicit t: Type[T], qctx: Quotes): Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val sym = TypeTree.of[T].symbol if sym.isClassDef then '{ "symbol" } else if sym.isNoSymbol then '{ "no symbol" } diff --git a/tests/run-macros/paramSymss/Macro_1.scala b/tests/run-macros/paramSymss/Macro_1.scala index 4c886b3476cf..65c31df30626 100644 --- a/tests/run-macros/paramSymss/Macro_1.scala +++ b/tests/run-macros/paramSymss/Macro_1.scala @@ -1,10 +1,10 @@ -import scala.quoted._ +import scala.quoted.* inline def showParamSyms(inline x: Any): String = ${ showParamSymsExpr('x) } def showParamSymsExpr(using Quotes)(x: Expr[Any]): Expr[String] = - import quotes.reflect._ + import quotes.reflect.* val '{ $y: Any } = x // Drop Inlined not to access the symbol val sym = y.asTerm.symbol Expr( diff --git a/tests/run-macros/power-macro/Macro_1.scala b/tests/run-macros/power-macro/Macro_1.scala index 98b288fe6838..57d468fd7dc1 100644 --- a/tests/run-macros/power-macro/Macro_1.scala +++ b/tests/run-macros/power-macro/Macro_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* inline def power(x: Double, inline n: Int) = ${ powerCode1('x, 'n) } diff --git a/tests/run-macros/quote-and-splice/Macros_1.scala b/tests/run-macros/quote-and-splice/Macros_1.scala index ea94b51d5365..e799318eac12 100644 --- a/tests/run-macros/quote-and-splice/Macros_1.scala +++ b/tests/run-macros/quote-and-splice/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/quote-and-splice/Test_2.scala b/tests/run-macros/quote-and-splice/Test_2.scala index 962441add308..ea6af331aa14 100644 --- a/tests/run-macros/quote-and-splice/Test_2.scala +++ b/tests/run-macros/quote-and-splice/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macros._ + import Macros.* def main(args: Array[String]): Unit = { println(macro1) diff --git a/tests/run-macros/quote-change-owner/Macro_1.scala b/tests/run-macros/quote-change-owner/Macro_1.scala index 34001992a2a7..6859c704edff 100644 --- a/tests/run-macros/quote-change-owner/Macro_1.scala +++ b/tests/run-macros/quote-change-owner/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def assert2(expr: => Boolean): Unit = ${ assertImpl('expr) } def assertImpl(expr: Expr[Boolean])(using Quotes) = '{ diff --git a/tests/run-macros/quote-change-owner/Test_2.scala b/tests/run-macros/quote-change-owner/Test_2.scala index 17730efe0dda..5b7a93df917b 100644 --- a/tests/run-macros/quote-change-owner/Test_2.scala +++ b/tests/run-macros/quote-change-owner/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { assert2 { diff --git a/tests/run-macros/quote-elide-prefix/quoted_1.scala b/tests/run-macros/quote-elide-prefix/quoted_1.scala index d44ad7ee6930..c8688717df43 100644 --- a/tests/run-macros/quote-elide-prefix/quoted_1.scala +++ b/tests/run-macros/quote-elide-prefix/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-elide-prefix/quoted_2.scala b/tests/run-macros/quote-elide-prefix/quoted_2.scala index f200e1ee815e..7795c5262139 100644 --- a/tests/run-macros/quote-elide-prefix/quoted_2.scala +++ b/tests/run-macros/quote-elide-prefix/quoted_2.scala @@ -1,6 +1,6 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { def test = ff"Hello ${"World"}" diff --git a/tests/run-macros/quote-force/quoted_1.scala b/tests/run-macros/quote-force/quoted_1.scala index 4c3f0844dbbb..5bd36e032fde 100644 --- a/tests/run-macros/quote-force/quoted_1.scala +++ b/tests/run-macros/quote-force/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Location(owners: List[String]) diff --git a/tests/run-macros/quote-force/quoted_2.scala b/tests/run-macros/quote-force/quoted_2.scala index 341cab5b2ce1..e385cee2c5b2 100644 --- a/tests/run-macros/quote-force/quoted_2.scala +++ b/tests/run-macros/quote-force/quoted_2.scala @@ -1,4 +1,4 @@ -import Location._ +import Location.* object Test { val loc1 = location diff --git a/tests/run-macros/quote-implicitMatch/Macro_1.scala b/tests/run-macros/quote-implicitMatch/Macro_1.scala index 1c8c2e445d25..2664b975cbbc 100644 --- a/tests/run-macros/quote-implicitMatch/Macro_1.scala +++ b/tests/run-macros/quote-implicitMatch/Macro_1.scala @@ -1,6 +1,6 @@ import collection.immutable.TreeSet import collection.immutable.HashSet -import scala.quoted._ +import scala.quoted.* inline def f1[T]() = ${ f1Impl[T] } diff --git a/tests/run-macros/quote-impure-by-name/quoted_1.scala b/tests/run-macros/quote-impure-by-name/quoted_1.scala index df3252efc958..28f4bf0c01a5 100644 --- a/tests/run-macros/quote-impure-by-name/quoted_1.scala +++ b/tests/run-macros/quote-impure-by-name/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Index[K, Keys](val index: String) extends AnyVal { diff --git a/tests/run-macros/quote-indexed-map-by-name/quoted_1.scala b/tests/run-macros/quote-indexed-map-by-name/quoted_1.scala index 6cff47d619bd..f05c189e1499 100644 --- a/tests/run-macros/quote-indexed-map-by-name/quoted_1.scala +++ b/tests/run-macros/quote-indexed-map-by-name/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class Index[K, Keys](val index: Int) extends AnyVal object Index { diff --git a/tests/run-macros/quote-inline-function/quoted_1.scala b/tests/run-macros/quote-inline-function/quoted_1.scala index 45317b7ded9f..46acf8a3cfc3 100644 --- a/tests/run-macros/quote-inline-function/quoted_1.scala +++ b/tests/run-macros/quote-inline-function/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -7,7 +7,7 @@ object Macros { inline def foreach3(start: Int, end: Int, inline f: Int => Unit): String = ${impl('start, 'end, 'f)} def impl(start: Expr[Int], end: Expr[Int], f: Expr[Int => Unit])(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val res = '{ var i = $start val j = $end diff --git a/tests/run-macros/quote-inline-function/quoted_2.scala b/tests/run-macros/quote-inline-function/quoted_2.scala index b42249f4ee48..e38d607ca364 100644 --- a/tests/run-macros/quote-inline-function/quoted_2.scala +++ b/tests/run-macros/quote-inline-function/quoted_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/quote-matcher-inference/Macro_1.scala b/tests/run-macros/quote-matcher-inference/Macro_1.scala index bd704315dadf..03476dfe3434 100644 --- a/tests/run-macros/quote-matcher-inference/Macro_1.scala +++ b/tests/run-macros/quote-matcher-inference/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/quote-matcher-inference/Test_2.scala b/tests/run-macros/quote-matcher-inference/Test_2.scala index 327112a64868..c046b95e8baf 100644 --- a/tests/run-macros/quote-matcher-inference/Test_2.scala +++ b/tests/run-macros/quote-matcher-inference/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-power/Macro_1.scala b/tests/run-macros/quote-matcher-power/Macro_1.scala index 32780c456e37..da21736282df 100644 --- a/tests/run-macros/quote-matcher-power/Macro_1.scala +++ b/tests/run-macros/quote-matcher-power/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/quote-matcher-power/Test_2.scala b/tests/run-macros/quote-matcher-power/Test_2.scala index 89c4283e2b1b..69c1ba037f31 100644 --- a/tests/run-macros/quote-matcher-power/Test_2.scala +++ b/tests/run-macros/quote-matcher-power/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-runtime/quoted_1.scala b/tests/run-macros/quote-matcher-runtime/quoted_1.scala index e172073b997e..1f7646320747 100644 --- a/tests/run-macros/quote-matcher-runtime/quoted_1.scala +++ b/tests/run-macros/quote-matcher-runtime/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def matches[A, B](inline a: A, inline b: B): Unit = ${impl('a, 'b)} private def impl[A, B](a: Expr[A], b: Expr[B])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val res = quotes.asInstanceOf[scala.quoted.runtime.QuoteMatching].ExprMatch.unapply[Tuple, Tuple](a)(using b).map { tup => tup.toArray.toList.map { diff --git a/tests/run-macros/quote-matcher-runtime/quoted_2.scala b/tests/run-macros/quote-matcher-runtime/quoted_2.scala index a2a1e37b183b..47e812c52bdb 100644 --- a/tests/run-macros/quote-matcher-runtime/quoted_2.scala +++ b/tests/run-macros/quote-matcher-runtime/quoted_2.scala @@ -1,7 +1,7 @@ -import Macros._ +import Macros.* -import scala.quoted.runtime.Patterns._ +import scala.quoted.runtime.Patterns.* object Test { diff --git a/tests/run-macros/quote-matcher-string-interpolator-2/quoted_1.scala b/tests/run-macros/quote-matcher-string-interpolator-2/quoted_1.scala index 2aff8705ce06..f425cd25ae6d 100644 --- a/tests/run-macros/quote-matcher-string-interpolator-2/quoted_1.scala +++ b/tests/run-macros/quote-matcher-string-interpolator-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* diff --git a/tests/run-macros/quote-matcher-string-interpolator-2/quoted_2.scala b/tests/run-macros/quote-matcher-string-interpolator-2/quoted_2.scala index 2a85eca35e41..72719a78c466 100644 --- a/tests/run-macros/quote-matcher-string-interpolator-2/quoted_2.scala +++ b/tests/run-macros/quote-matcher-string-interpolator-2/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-string-interpolator-3/quoted_1.scala b/tests/run-macros/quote-matcher-string-interpolator-3/quoted_1.scala index c1dfd083e41a..4265383e8989 100644 --- a/tests/run-macros/quote-matcher-string-interpolator-3/quoted_1.scala +++ b/tests/run-macros/quote-matcher-string-interpolator-3/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* diff --git a/tests/run-macros/quote-matcher-string-interpolator-3/quoted_2.scala b/tests/run-macros/quote-matcher-string-interpolator-3/quoted_2.scala index 7ed4d71a1607..0f4dbdab1369 100644 --- a/tests/run-macros/quote-matcher-string-interpolator-3/quoted_2.scala +++ b/tests/run-macros/quote-matcher-string-interpolator-3/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-string-interpolator/quoted_1.scala b/tests/run-macros/quote-matcher-string-interpolator/quoted_1.scala index 187ee69565d3..afb00ebdb38a 100644 --- a/tests/run-macros/quote-matcher-string-interpolator/quoted_1.scala +++ b/tests/run-macros/quote-matcher-string-interpolator/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* diff --git a/tests/run-macros/quote-matcher-string-interpolator/quoted_2.scala b/tests/run-macros/quote-matcher-string-interpolator/quoted_2.scala index 2a85eca35e41..72719a78c466 100644 --- a/tests/run-macros/quote-matcher-string-interpolator/quoted_2.scala +++ b/tests/run-macros/quote-matcher-string-interpolator/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-symantics-1/quoted_1.scala b/tests/run-macros/quote-matcher-symantics-1/quoted_1.scala index aa05d84c1ecb..820f3d53db3d 100644 --- a/tests/run-macros/quote-matcher-symantics-1/quoted_1.scala +++ b/tests/run-macros/quote-matcher-symantics-1/quoted_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -20,7 +20,7 @@ object Macros { '{ $sym.times(${lift(x)}, ${lift(y)}) } case _ => - import quotes.reflect._ + import quotes.reflect.* report.error("Expected explicit DSL", e.asTerm.pos) '{ ??? } diff --git a/tests/run-macros/quote-matcher-symantics-1/quoted_2.scala b/tests/run-macros/quote-matcher-symantics-1/quoted_2.scala index 3a09c1c25b94..c31d440732c0 100644 --- a/tests/run-macros/quote-matcher-symantics-1/quoted_2.scala +++ b/tests/run-macros/quote-matcher-symantics-1/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-symantics-2/quoted_1.scala b/tests/run-macros/quote-matcher-symantics-2/quoted_1.scala index 7d6f234bf35d..3485f40cca37 100644 --- a/tests/run-macros/quote-matcher-symantics-2/quoted_1.scala +++ b/tests/run-macros/quote-matcher-symantics-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -38,7 +38,7 @@ object Macros { case '{ envVar(${Expr(i)}) } => env(i) case _ => - import quotes.reflect._ + import quotes.reflect.* report.error("Expected explicit DSL " + e.show, e.asTerm.pos) ??? } @@ -52,7 +52,7 @@ object Macros { } ) case _ => - import quotes.reflect._ + import quotes.reflect.* report.error("Expected explicit DSL => DSL " + e.show, e.asTerm.pos) ??? } @@ -64,18 +64,18 @@ object Macros { object UnsafeExpr { def open[T1, R, X](f: Expr[T1 => R])(content: (Expr[R], [t] => Expr[t] => Expr[T1] => Expr[t]) => X)(using Quotes): X = { - import quotes.reflect._ + import quotes.reflect.* val (params, bodyExpr) = paramsAndBody[R](f) content(bodyExpr, [t] => (e: Expr[t]) => (v: Expr[T1]) => bodyFn[t](e.asTerm, params, List(v.asTerm)).asExpr.asInstanceOf[Expr[t]]) } private def paramsAndBody[R](using Quotes)(f: Expr[Any]): (List[quotes.reflect.ValDef], Expr[R]) = { - import quotes.reflect._ + import quotes.reflect.* val Block(List(DefDef("$anonfun", List(TermParamClause(params)), _, Some(body))), Closure(Ident("$anonfun"), None)) = f.asTerm.etaExpand(Symbol.spliceOwner) (params, body.asExpr.asInstanceOf[Expr[R]]) } private def bodyFn[t](using Quotes)(e: quotes.reflect.Term, params: List[quotes.reflect.ValDef], args: List[quotes.reflect.Term]): quotes.reflect.Term = { - import quotes.reflect._ + import quotes.reflect.* val map = params.map(_.symbol).zip(args).toMap new TreeMap { override def transformTerm(tree: Term)(owner: Symbol): Term = diff --git a/tests/run-macros/quote-matcher-symantics-2/quoted_2.scala b/tests/run-macros/quote-matcher-symantics-2/quoted_2.scala index 1b26bd657837..e4c9b3e2ceff 100644 --- a/tests/run-macros/quote-matcher-symantics-2/quoted_2.scala +++ b/tests/run-macros/quote-matcher-symantics-2/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-symantics-3/quoted_1.scala b/tests/run-macros/quote-matcher-symantics-3/quoted_1.scala index e8570c48cc3f..1855fb10f856 100644 --- a/tests/run-macros/quote-matcher-symantics-3/quoted_1.scala +++ b/tests/run-macros/quote-matcher-symantics-3/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -77,18 +77,18 @@ object Macros { object UnsafeExpr { def open[T1, R, X](f: Expr[T1 => R])(content: (Expr[R], [t] => Expr[t] => Expr[T1] => Expr[t]) => X)(using Quotes): X = { - import quotes.reflect._ + import quotes.reflect.* val (params, bodyExpr) = paramsAndBody[R](f) content(bodyExpr, [t] => (e: Expr[t]) => (v: Expr[T1]) => bodyFn[t](e.asTerm, params, List(v.asTerm)).asExpr.asInstanceOf[Expr[t]]) } private def paramsAndBody[R](using Quotes)(f: Expr[Any]): (List[quotes.reflect.ValDef], Expr[R]) = { - import quotes.reflect._ + import quotes.reflect.* val Block(List(DefDef("$anonfun", List(TermParamClause(params)), _, Some(body))), Closure(Ident("$anonfun"), None)) = f.asTerm.etaExpand(Symbol.spliceOwner) (params, body.asExpr.asInstanceOf[Expr[R]]) } private def bodyFn[t](using Quotes)(e: quotes.reflect.Term, params: List[quotes.reflect.ValDef], args: List[quotes.reflect.Term]): quotes.reflect.Term = { - import quotes.reflect._ + import quotes.reflect.* val map = params.map(_.symbol).zip(args).toMap new TreeMap { override def transformTerm(tree: Term)(owner: Symbol): Term = @@ -125,7 +125,7 @@ object Symantics { object Const { def unapply[T](expr: Expr[T])(using Quotes): Option[T] = { - import quotes.reflect._ + import quotes.reflect.* def rec(tree: Term): Option[T] = tree match { case Literal(c) => c match diff --git a/tests/run-macros/quote-matcher-symantics-3/quoted_2.scala b/tests/run-macros/quote-matcher-symantics-3/quoted_2.scala index 388789ad3373..f82bd6e43229 100644 --- a/tests/run-macros/quote-matcher-symantics-3/quoted_2.scala +++ b/tests/run-macros/quote-matcher-symantics-3/quoted_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matcher-type-bind/Macro_1.scala b/tests/run-macros/quote-matcher-type-bind/Macro_1.scala index 4692c1c277aa..921b646c7050 100644 --- a/tests/run-macros/quote-matcher-type-bind/Macro_1.scala +++ b/tests/run-macros/quote-matcher-type-bind/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/quote-matcher-type-bind/Test_2.scala b/tests/run-macros/quote-matcher-type-bind/Test_2.scala index 4c388ce16d47..878bfc18d9af 100644 --- a/tests/run-macros/quote-matcher-type-bind/Test_2.scala +++ b/tests/run-macros/quote-matcher-type-bind/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-matching-open/Macro_1.scala b/tests/run-macros/quote-matching-open/Macro_1.scala index b01f8e5a1e72..94fdf1959e31 100644 --- a/tests/run-macros/quote-matching-open/Macro_1.scala +++ b/tests/run-macros/quote-matching-open/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { @@ -17,29 +17,29 @@ object Macro { object UnsafeExpr { def open[T1, R, X](f: Expr[T1 => R])(content: (Expr[R], [t] => Expr[t] => Expr[T1] => Expr[t]) => X)(using Quotes): X = { - import quotes.reflect._ + import quotes.reflect.* val (params, bodyExpr) = paramsAndBody[R](f) content(bodyExpr, [t] => (e: Expr[t]) => (v: Expr[T1]) => bodyFn[t](e.asTerm, params, List(v.asTerm)).asExpr.asInstanceOf[Expr[t]]) } def open[T1, T2, R, X](f: Expr[(T1, T2) => R])(content: (Expr[R], [t] => Expr[t] => (Expr[T1], Expr[T2]) => Expr[t]) => X)(using Quotes)(using DummyImplicit): X = { - import quotes.reflect._ + import quotes.reflect.* val (params, bodyExpr) = paramsAndBody[R](f) content(bodyExpr, [t] => (e: Expr[t]) => (v1: Expr[T1], v2: Expr[T2]) => bodyFn[t](e.asTerm, params, List(v1.asTerm, v2.asTerm)).asExpr.asInstanceOf[Expr[t]]) } def open[T1, T2, T3, R, X](f: Expr[(T1, T2, T3) => R])(content: (Expr[R], [t] => Expr[t] => (Expr[T1], Expr[T2], Expr[T3]) => Expr[t]) => X)(using Quotes)(using DummyImplicit, DummyImplicit): X = { - import quotes.reflect._ + import quotes.reflect.* val (params, bodyExpr) = paramsAndBody[R](f) content(bodyExpr, [t] => (e: Expr[t]) => (v1: Expr[T1], v2: Expr[T2], v3: Expr[T3]) => bodyFn[t](e.asTerm, params, List(v1.asTerm, v2.asTerm, v3.asTerm)).asExpr.asInstanceOf[Expr[t]]) } private def paramsAndBody[R](using Quotes)(f: Expr[Any]): (List[quotes.reflect.ValDef], Expr[R]) = { - import quotes.reflect._ + import quotes.reflect.* val Block(List(DefDef("$anonfun", List(TermParamClause(params)), _, Some(body))), Closure(Ident("$anonfun"), None)) = f.asTerm.etaExpand(Symbol.spliceOwner) (params, body.asExpr.asInstanceOf[Expr[R]]) } private def bodyFn[t](using Quotes)(e: quotes.reflect.Term, params: List[quotes.reflect.ValDef], args: List[quotes.reflect.Term]): quotes.reflect.Term = { - import quotes.reflect._ + import quotes.reflect.* val map = params.map(_.symbol).zip(args).toMap new TreeMap { override def transformTerm(tree: Term)(owner: Symbol): Term = diff --git a/tests/run-macros/quote-matching-open/Test_2.scala b/tests/run-macros/quote-matching-open/Test_2.scala index 3fa96cef8726..124e6ff21b2f 100644 --- a/tests/run-macros/quote-matching-open/Test_2.scala +++ b/tests/run-macros/quote-matching-open/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { println(openTest((x: Int) => x)) diff --git a/tests/run-macros/quote-matching-optimize-1/Macro_1.scala b/tests/run-macros/quote-matching-optimize-1/Macro_1.scala index 6909771f7f2f..316ae01853ec 100644 --- a/tests/run-macros/quote-matching-optimize-1/Macro_1.scala +++ b/tests/run-macros/quote-matching-optimize-1/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-matching-optimize-1/Test_2.scala b/tests/run-macros/quote-matching-optimize-1/Test_2.scala index de052ddc8445..cb3c4a0a193e 100644 --- a/tests/run-macros/quote-matching-optimize-1/Test_2.scala +++ b/tests/run-macros/quote-matching-optimize-1/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { val ls = List(1, 2, 3) diff --git a/tests/run-macros/quote-matching-optimize-2/Macro_1.scala b/tests/run-macros/quote-matching-optimize-2/Macro_1.scala index 89f52713c106..b7b2498dd7b4 100644 --- a/tests/run-macros/quote-matching-optimize-2/Macro_1.scala +++ b/tests/run-macros/quote-matching-optimize-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-matching-optimize-2/Test_2.scala b/tests/run-macros/quote-matching-optimize-2/Test_2.scala index bab33d5ba202..b5a57b8f4ccf 100644 --- a/tests/run-macros/quote-matching-optimize-2/Test_2.scala +++ b/tests/run-macros/quote-matching-optimize-2/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { val ls = List(1, 2, 3) diff --git a/tests/run-macros/quote-matching-optimize-3/Macro_1.scala b/tests/run-macros/quote-matching-optimize-3/Macro_1.scala index 7aefe30d20dd..feb3ac926214 100644 --- a/tests/run-macros/quote-matching-optimize-3/Macro_1.scala +++ b/tests/run-macros/quote-matching-optimize-3/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-matching-optimize-3/Test_2.scala b/tests/run-macros/quote-matching-optimize-3/Test_2.scala index fc6aa6c12a95..1290015a2c40 100644 --- a/tests/run-macros/quote-matching-optimize-3/Test_2.scala +++ b/tests/run-macros/quote-matching-optimize-3/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { val ls = List(1, 2, 3) diff --git a/tests/run-macros/quote-matching-optimize-4/Macro_1.scala b/tests/run-macros/quote-matching-optimize-4/Macro_1.scala index 86ea8cd6160f..01e1562b0770 100644 --- a/tests/run-macros/quote-matching-optimize-4/Macro_1.scala +++ b/tests/run-macros/quote-matching-optimize-4/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-matching-optimize-4/Test_2.scala b/tests/run-macros/quote-matching-optimize-4/Test_2.scala index abce7c9ca7d3..987fc01a1fd1 100644 --- a/tests/run-macros/quote-matching-optimize-4/Test_2.scala +++ b/tests/run-macros/quote-matching-optimize-4/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { val ls = List(1, 2, 3) diff --git a/tests/run-macros/quote-matching-optimize-5/Macro_1.scala b/tests/run-macros/quote-matching-optimize-5/Macro_1.scala index 463c30f74eb3..8224daf8563c 100644 --- a/tests/run-macros/quote-matching-optimize-5/Macro_1.scala +++ b/tests/run-macros/quote-matching-optimize-5/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-matching-optimize-5/Test_2.scala b/tests/run-macros/quote-matching-optimize-5/Test_2.scala index abce7c9ca7d3..987fc01a1fd1 100644 --- a/tests/run-macros/quote-matching-optimize-5/Test_2.scala +++ b/tests/run-macros/quote-matching-optimize-5/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Macro._ + import Macro.* def main(args: Array[String]): Unit = { val ls = List(1, 2, 3) diff --git a/tests/run-macros/quote-sep-comp-2/Macro_1.scala b/tests/run-macros/quote-sep-comp-2/Macro_1.scala index c23bd5f1884b..0cef7f5f19df 100644 --- a/tests/run-macros/quote-sep-comp-2/Macro_1.scala +++ b/tests/run-macros/quote-sep-comp-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { def assertImpl(expr: Expr[Boolean])(using Quotes) = '{ println($expr) } diff --git a/tests/run-macros/quote-sep-comp/Macro_1.scala b/tests/run-macros/quote-sep-comp/Macro_1.scala index 611647b7d44a..d8da7f7deade 100644 --- a/tests/run-macros/quote-sep-comp/Macro_1.scala +++ b/tests/run-macros/quote-sep-comp/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def assert2(expr: => Boolean): Unit = ${ assertImpl('expr) } def assertImpl(expr: Expr[Boolean])(using Quotes) = '{ println($expr) } diff --git a/tests/run-macros/quote-sep-comp/Test_2.scala b/tests/run-macros/quote-sep-comp/Test_2.scala index 805fb8a6b079..11b704520db6 100644 --- a/tests/run-macros/quote-sep-comp/Test_2.scala +++ b/tests/run-macros/quote-sep-comp/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { val x = 1 diff --git a/tests/run-macros/quote-simple-macro/quoted_1.scala b/tests/run-macros/quote-simple-macro/quoted_1.scala index 0bc43021a8a6..bd39612bf3ca 100644 --- a/tests/run-macros/quote-simple-macro/quoted_1.scala +++ b/tests/run-macros/quote-simple-macro/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def foo(inline i: Int, dummy: Int, j: Int): Int = ${ bar('i, 'j) } diff --git a/tests/run-macros/quote-simple-macro/quoted_2.scala b/tests/run-macros/quote-simple-macro/quoted_2.scala index f05e44fed20a..748608a7b453 100644 --- a/tests/run-macros/quote-simple-macro/quoted_2.scala +++ b/tests/run-macros/quote-simple-macro/quoted_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Macros._ +import scala.quoted.* +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/quote-toExprOfSeq/Macro_1.scala b/tests/run-macros/quote-toExprOfSeq/Macro_1.scala index b9a7ae0a1396..a4ccec66e2b0 100644 --- a/tests/run-macros/quote-toExprOfSeq/Macro_1.scala +++ b/tests/run-macros/quote-toExprOfSeq/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def seq = ${fooImpl} diff --git a/tests/run-macros/quote-toExprOfTuple/Macro_1.scala b/tests/run-macros/quote-toExprOfTuple/Macro_1.scala index e9eb070c3a14..95e1810b0988 100644 --- a/tests/run-macros/quote-toExprOfTuple/Macro_1.scala +++ b/tests/run-macros/quote-toExprOfTuple/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def t2[T0, T1](t0: T0, t1: T1): (T0, T1) = ${ impl2('{t0}, '{t1}) } def impl2[T0: Type, T1: Type](t0: Expr[T0], t1: Expr[T1])(using Quotes) : Expr[(T0, T1)] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* val seq = List(t0, t1) val res = Expr.ofTupleFromSeq(seq) diff --git a/tests/run-macros/quote-type-matcher-2/quoted_1.scala b/tests/run-macros/quote-type-matcher-2/quoted_1.scala index 4decd9a65ac4..d477f8b99e70 100644 --- a/tests/run-macros/quote-type-matcher-2/quoted_1.scala +++ b/tests/run-macros/quote-type-matcher-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { diff --git a/tests/run-macros/quote-type-matcher-2/quoted_2.scala b/tests/run-macros/quote-type-matcher-2/quoted_2.scala index 02de1c9c1ffb..e0729f75a17c 100644 --- a/tests/run-macros/quote-type-matcher-2/quoted_2.scala +++ b/tests/run-macros/quote-type-matcher-2/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-type-matcher/quoted_1.scala b/tests/run-macros/quote-type-matcher/quoted_1.scala index dd382deb3dd8..346c73daeed2 100644 --- a/tests/run-macros/quote-type-matcher/quoted_1.scala +++ b/tests/run-macros/quote-type-matcher/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def matches[A, B]: Unit = ${ matchesExpr[A, B] } private def matchesExpr[A, B](using a: Type[A], b: Type[B])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val res = quotes.asInstanceOf[scala.quoted.runtime.QuoteMatching].TypeMatch.unapply[Tuple, Tuple](a)(using b).map { tup => tup.toArray.toList.map { diff --git a/tests/run-macros/quote-type-matcher/quoted_2.scala b/tests/run-macros/quote-type-matcher/quoted_2.scala index 0874ef7b0ec5..0202b71a70ad 100644 --- a/tests/run-macros/quote-type-matcher/quoted_2.scala +++ b/tests/run-macros/quote-type-matcher/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { diff --git a/tests/run-macros/quote-unrolled-foreach/quoted_1.scala b/tests/run-macros/quote-unrolled-foreach/quoted_1.scala index b218f135fe9f..c84cd639bda7 100644 --- a/tests/run-macros/quote-unrolled-foreach/quoted_1.scala +++ b/tests/run-macros/quote-unrolled-foreach/quoted_1.scala @@ -1,5 +1,5 @@ import scala.annotation.tailrec -import scala.quoted._ +import scala.quoted.* object Macro { diff --git a/tests/run-macros/quote-unrolled-foreach/quoted_2.scala b/tests/run-macros/quote-unrolled-foreach/quoted_2.scala index 39d4cf2ba9e3..4a700457cb6e 100644 --- a/tests/run-macros/quote-unrolled-foreach/quoted_2.scala +++ b/tests/run-macros/quote-unrolled-foreach/quoted_2.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/quote-whitebox/Macro_1.scala b/tests/run-macros/quote-whitebox/Macro_1.scala index 273e755426a2..a18fccbc166e 100644 --- a/tests/run-macros/quote-whitebox/Macro_1.scala +++ b/tests/run-macros/quote-whitebox/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { transparent inline def defaultOf(inline str: String): Any = ${ defaultOfImpl('str) } diff --git a/tests/run-macros/quote-whitebox/Test_2.scala b/tests/run-macros/quote-whitebox/Test_2.scala index 105fcad244b7..b6ac7209b98c 100644 --- a/tests/run-macros/quote-whitebox/Test_2.scala +++ b/tests/run-macros/quote-whitebox/Test_2.scala @@ -1,4 +1,4 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/quoted-expr-block/quoted_1.scala b/tests/run-macros/quoted-expr-block/quoted_1.scala index d392ef9b29dc..8d2403df4c10 100644 --- a/tests/run-macros/quoted-expr-block/quoted_1.scala +++ b/tests/run-macros/quoted-expr-block/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def replicate(inline times: Int, code: => Any) = ${replicateImpl('times, 'code)} diff --git a/tests/run-macros/quoted-matching-docs-2/Macro_1.scala b/tests/run-macros/quoted-matching-docs-2/Macro_1.scala index 9f0edee63294..8edaab8ad086 100644 --- a/tests/run-macros/quoted-matching-docs-2/Macro_1.scala +++ b/tests/run-macros/quoted-matching-docs-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* def sum(args: Int*): Int = args.sum diff --git a/tests/run-macros/quoted-matching-docs/Macro_1.scala b/tests/run-macros/quoted-matching-docs/Macro_1.scala index 5fa124b8ec1a..82ea6f956b78 100644 --- a/tests/run-macros/quoted-matching-docs/Macro_1.scala +++ b/tests/run-macros/quoted-matching-docs/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def sum(args: Int*): Int = ${ sumExpr('args) } @@ -22,6 +22,6 @@ private def sumExpr(argsExpr: Expr[Seq[Int]])(using Quotes) : Expr[Int] = { object UnsafeExpr { def underlyingArgument[T](expr: Expr[T])(using Quotes): Expr[T] = - import quotes.reflect._ + import quotes.reflect.* expr.asTerm.underlyingArgument.asExpr.asInstanceOf[Expr[T]] } \ No newline at end of file diff --git a/tests/run-macros/quoted-pattern-open-expr-0/Macro_1.scala b/tests/run-macros/quoted-pattern-open-expr-0/Macro_1.scala index 9f5fdc044415..3f1edf119876 100644 --- a/tests/run-macros/quoted-pattern-open-expr-0/Macro_1.scala +++ b/tests/run-macros/quoted-pattern-open-expr-0/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def test(inline e: Int): String = ${testExpr('e)} diff --git a/tests/run-macros/quoted-pattern-open-expr-simple-eval/Macro_1.scala b/tests/run-macros/quoted-pattern-open-expr-simple-eval/Macro_1.scala index 096911841e9a..c31cadae3ca7 100644 --- a/tests/run-macros/quoted-pattern-open-expr-simple-eval/Macro_1.scala +++ b/tests/run-macros/quoted-pattern-open-expr-simple-eval/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def eval(inline e: Int): Int = ${ evalExpr('e) } diff --git a/tests/run-macros/quoted-pattern-open-expr/Macro_1.scala b/tests/run-macros/quoted-pattern-open-expr/Macro_1.scala index 3416c9379ca5..8f759c9a7c7a 100644 --- a/tests/run-macros/quoted-pattern-open-expr/Macro_1.scala +++ b/tests/run-macros/quoted-pattern-open-expr/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def test(inline e: Int): String = ${testExpr('e)} diff --git a/tests/run-macros/quoted-pattern-type/Macro_1.scala b/tests/run-macros/quoted-pattern-type/Macro_1.scala index 9406a6f4cd04..ab3939e5ab9d 100644 --- a/tests/run-macros/quoted-pattern-type/Macro_1.scala +++ b/tests/run-macros/quoted-pattern-type/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Lib { diff --git a/tests/run-macros/quoted-pattern-type/Test_2.scala b/tests/run-macros/quoted-pattern-type/Test_2.scala index 60ae48cdfb92..d149c188d700 100644 --- a/tests/run-macros/quoted-pattern-type/Test_2.scala +++ b/tests/run-macros/quoted-pattern-type/Test_2.scala @@ -1,5 +1,5 @@ object Test { - import Lib._ + import Lib.* def main(args: Array[String]): Unit = { foo(true) diff --git a/tests/run-macros/quoted-toExprOfClass/Macros_1.scala b/tests/run-macros/quoted-toExprOfClass/Macros_1.scala index 0b9f33f5ddbc..e64bb1078f33 100644 --- a/tests/run-macros/quoted-toExprOfClass/Macros_1.scala +++ b/tests/run-macros/quoted-toExprOfClass/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* inline def wildcard: Map[String, Class[?]] = ${ wildcardMacro } inline def noWildcard: Map[String, Class[Int]] = ${ noWildcardMacro } diff --git a/tests/run-macros/refined-selectable-macro/Macro_1.scala b/tests/run-macros/refined-selectable-macro/Macro_1.scala index a648dc3a4a43..d8a81d2ebdfd 100644 --- a/tests/run-macros/refined-selectable-macro/Macro_1.scala +++ b/tests/run-macros/refined-selectable-macro/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macro { @@ -15,7 +15,7 @@ object Macro { } private def toTupleImpl(s: Expr[Selectable])(using qctx:Quotes) : Expr[Tuple] = { - import quotes.reflect._ + import quotes.reflect.* val repr = s.asTerm.tpe.widenTermRefByName.dealias @@ -49,7 +49,7 @@ object Macro { } private def fromTupleImpl[T: Type](s: Expr[Tuple], newRecord: Expr[Array[(String, Any)] => T])(using qctx:Quotes) : Expr[Any] = { - import quotes.reflect._ + import quotes.reflect.* val repr = s.asTerm.tpe.widenTermRefByName.dealias diff --git a/tests/run-macros/refined-selectable-macro/Macro_2.scala b/tests/run-macros/refined-selectable-macro/Macro_2.scala index 7d686a0e065a..f25d42b7926d 100644 --- a/tests/run-macros/refined-selectable-macro/Macro_2.scala +++ b/tests/run-macros/refined-selectable-macro/Macro_2.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import Macro._ +import scala.quoted.* +import Macro.* object Macro2 { // TODO should elems of `new Record` and `Record.fromUntypedTuple` be IArray[Object] @@ -12,7 +12,7 @@ object Macro2 { } object Record extends SelectableRecordCompanion[Record] { - import scala.quoted._ + import scala.quoted.* inline def apply[R <: Record](elems: (String, Any)*) : R = ${ applyImpl[R]('elems) } diff --git a/tests/run-macros/refined-selectable-macro/Test_3.scala b/tests/run-macros/refined-selectable-macro/Test_3.scala index 53a852c81e2b..8f8a9fc4d23a 100644 --- a/tests/run-macros/refined-selectable-macro/Test_3.scala +++ b/tests/run-macros/refined-selectable-macro/Test_3.scala @@ -1,7 +1,7 @@ -import Macro._ -import Macro2._ +import Macro.* +import Macro2.* -import scala.compiletime.testing._ +import scala.compiletime.testing.* object Test { diff --git a/tests/run-macros/reflect-dsl/assert_1.scala b/tests/run-macros/reflect-dsl/assert_1.scala index 9424226f6de9..a258f31e9e83 100644 --- a/tests/run-macros/reflect-dsl/assert_1.scala +++ b/tests/run-macros/reflect-dsl/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes): Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp match case tp: MethodType => tp.isImplicit diff --git a/tests/run-macros/reflect-dsl/test_2.scala b/tests/run-macros/reflect-dsl/test_2.scala index 1525360a71f7..08ffce1b3747 100644 --- a/tests/run-macros/reflect-dsl/test_2.scala +++ b/tests/run-macros/reflect-dsl/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* case class Box[T](v: T) { def >(that: Box[T]): Boolean = this == that diff --git a/tests/run-macros/reflect-inline/assert_1.scala b/tests/run-macros/reflect-inline/assert_1.scala index d6b115529ea6..6c797be0fc85 100644 --- a/tests/run-macros/reflect-inline/assert_1.scala +++ b/tests/run-macros/reflect-inline/assert_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object api { extension (inline x: String) inline def stripMargin: String = diff --git a/tests/run-macros/reflect-inline/test_2.scala b/tests/run-macros/reflect-inline/test_2.scala index 2f36d7b52214..bf06a174bac9 100644 --- a/tests/run-macros/reflect-inline/test_2.scala +++ b/tests/run-macros/reflect-inline/test_2.scala @@ -1,4 +1,4 @@ -import api._ +import api.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/reflect-lambda/assert_1.scala b/tests/run-macros/reflect-lambda/assert_1.scala index 077635b93cef..7977a4ee9058 100644 --- a/tests/run-macros/reflect-lambda/assert_1.scala +++ b/tests/run-macros/reflect-lambda/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object lib { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* cond.asTerm.underlyingArgument match { case t @ Apply(Select(lhs, op), Lambda(param :: Nil, Apply(Select(a, "=="), b :: Nil)) :: Nil) diff --git a/tests/run-macros/reflect-lambda/test_2.scala b/tests/run-macros/reflect-lambda/test_2.scala index bb712c81b477..3cd18153861d 100644 --- a/tests/run-macros/reflect-lambda/test_2.scala +++ b/tests/run-macros/reflect-lambda/test_2.scala @@ -1,5 +1,5 @@ object Test { - import lib._ + import lib.* case class IntList(args: Int*) { def exists(f: Int => Boolean): Boolean = args.exists(f) diff --git a/tests/run-macros/reflect-pos-fun/assert_1.scala b/tests/run-macros/reflect-pos-fun/assert_1.scala index 712983517b01..1b62fc643fc4 100644 --- a/tests/run-macros/reflect-pos-fun/assert_1.scala +++ b/tests/run-macros/reflect-pos-fun/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition) } def assertImpl(cond: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* cond.asTerm.underlyingArgument match { case t @ Apply(TypeApply(Select(lhs, op), targs), rhs) => diff --git a/tests/run-macros/reflect-pos-fun/test_2.scala b/tests/run-macros/reflect-pos-fun/test_2.scala index b4d32b93a5cf..762bad12a5d4 100644 --- a/tests/run-macros/reflect-pos-fun/test_2.scala +++ b/tests/run-macros/reflect-pos-fun/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* def main(args: Array[String]): Unit = { val l = List(3, 5) diff --git a/tests/run-macros/reflect-select-constructor/assert_1.scala b/tests/run-macros/reflect-select-constructor/assert_1.scala index 3774fa5e98ba..ce469d9f9741 100644 --- a/tests/run-macros/reflect-select-constructor/assert_1.scala +++ b/tests/run-macros/reflect-select-constructor/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp match case tp: MethodType => tp.isImplicit diff --git a/tests/run-macros/reflect-select-constructor/test_2.scala b/tests/run-macros/reflect-select-constructor/test_2.scala index 1525360a71f7..08ffce1b3747 100644 --- a/tests/run-macros/reflect-select-constructor/test_2.scala +++ b/tests/run-macros/reflect-select-constructor/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* case class Box[T](v: T) { def >(that: Box[T]): Boolean = this == that diff --git a/tests/run-macros/reflect-select-copy-2/assert_1.scala b/tests/run-macros/reflect-select-copy-2/assert_1.scala index 8b9c535ab5b9..0fd7f7cfbf7e 100644 --- a/tests/run-macros/reflect-select-copy-2/assert_1.scala +++ b/tests/run-macros/reflect-select-copy-2/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp match case tp: MethodType => tp.isImplicit diff --git a/tests/run-macros/reflect-select-copy-2/test_2.scala b/tests/run-macros/reflect-select-copy-2/test_2.scala index 1525360a71f7..08ffce1b3747 100644 --- a/tests/run-macros/reflect-select-copy-2/test_2.scala +++ b/tests/run-macros/reflect-select-copy-2/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* case class Box[T](v: T) { def >(that: Box[T]): Boolean = this == that diff --git a/tests/run-macros/reflect-select-copy/assert_1.scala b/tests/run-macros/reflect-select-copy/assert_1.scala index af9a78fdb7d5..d4822ad2bc1e 100644 --- a/tests/run-macros/reflect-select-copy/assert_1.scala +++ b/tests/run-macros/reflect-select-copy/assert_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* cond.asTerm.underlyingArgument match { case Apply(select @ Select(lhs, op), rhs :: Nil) => diff --git a/tests/run-macros/reflect-select-copy/test_2.scala b/tests/run-macros/reflect-select-copy/test_2.scala index 435c487885a2..e411c7f19bd7 100644 --- a/tests/run-macros/reflect-select-copy/test_2.scala +++ b/tests/run-macros/reflect-select-copy/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* class Box(val x: Int) { def >(y: Int): Boolean = x > y diff --git a/tests/run-macros/reflect-select-symbol-constructor/assert_1.scala b/tests/run-macros/reflect-select-symbol-constructor/assert_1.scala index 4f1e8e50b948..6d155d794324 100644 --- a/tests/run-macros/reflect-select-symbol-constructor/assert_1.scala +++ b/tests/run-macros/reflect-select-symbol-constructor/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp match case tp: MethodType => tp.isImplicit diff --git a/tests/run-macros/reflect-select-symbol-constructor/test_2.scala b/tests/run-macros/reflect-select-symbol-constructor/test_2.scala index 1525360a71f7..08ffce1b3747 100644 --- a/tests/run-macros/reflect-select-symbol-constructor/test_2.scala +++ b/tests/run-macros/reflect-select-symbol-constructor/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* case class Box[T](v: T) { def >(that: Box[T]): Boolean = this == that diff --git a/tests/run-macros/reflect-select-value-class/assert_1.scala b/tests/run-macros/reflect-select-value-class/assert_1.scala index 3774fa5e98ba..ce469d9f9741 100644 --- a/tests/run-macros/reflect-select-value-class/assert_1.scala +++ b/tests/run-macros/reflect-select-value-class/assert_1.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ - import util._ + import quotes.reflect.* + import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp match case tp: MethodType => tp.isImplicit diff --git a/tests/run-macros/reflect-select-value-class/test_2.scala b/tests/run-macros/reflect-select-value-class/test_2.scala index f1fa2581213d..92042638c75f 100644 --- a/tests/run-macros/reflect-select-value-class/test_2.scala +++ b/tests/run-macros/reflect-select-value-class/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* implicit class AnyOps(x: String) extends AnyVal { def *(y: String): String = x + ", " + y diff --git a/tests/run-macros/reflect-sourceCode/Macro_1.scala b/tests/run-macros/reflect-sourceCode/Macro_1.scala index f2d85af7234f..f07fde79c5ae 100644 --- a/tests/run-macros/reflect-sourceCode/Macro_1.scala +++ b/tests/run-macros/reflect-sourceCode/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object api { extension [T](x: => T) inline def reflect: String = ${ reflImpl('x) } private def reflImpl[T](x: Expr[T])(implicit qctx: Quotes): Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* Expr(x.asTerm.pos.sourceCode.get) } } diff --git a/tests/run-macros/reflect-sourceCode/Test_2.scala b/tests/run-macros/reflect-sourceCode/Test_2.scala index a1a6d6562473..8a03fbfc5f8e 100644 --- a/tests/run-macros/reflect-sourceCode/Test_2.scala +++ b/tests/run-macros/reflect-sourceCode/Test_2.scala @@ -1,4 +1,4 @@ -import api._ +import api.* object Test { def f(implicit x: Int): Int = x * x diff --git a/tests/run-macros/reflect-typeChecks/assert_1.scala b/tests/run-macros/reflect-typeChecks/assert_1.scala index db8d4fe3dd31..4d0346e19d34 100644 --- a/tests/run-macros/reflect-typeChecks/assert_1.scala +++ b/tests/run-macros/reflect-typeChecks/assert_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object scalatest { diff --git a/tests/run-macros/reflect-typeChecks/test_2.scala b/tests/run-macros/reflect-typeChecks/test_2.scala index e83eb0c9503b..351edf8fd55e 100644 --- a/tests/run-macros/reflect-typeChecks/test_2.scala +++ b/tests/run-macros/reflect-typeChecks/test_2.scala @@ -1,5 +1,5 @@ object Test { - import scalatest._ + import scalatest.* trait Eq[T] implicit val eq: Eq[Int] = new Eq[Int] {} diff --git a/tests/run-macros/requiredSymbols/Macro_1.scala b/tests/run-macros/requiredSymbols/Macro_1.scala index 8a516081a80a..1ee1be3064b5 100644 --- a/tests/run-macros/requiredSymbols/Macro_1.scala +++ b/tests/run-macros/requiredSymbols/Macro_1.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* object Macro { inline def foo: String = ${ fooImpl } def fooImpl(using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* val list = List( Symbol.requiredPackage("java"), Symbol.requiredPackage("java.lang"), diff --git a/tests/run-macros/simple-interpreter/Macro_1.scala b/tests/run-macros/simple-interpreter/Macro_1.scala index 2a5f8a36ebe6..98ce017e563c 100644 --- a/tests/run-macros/simple-interpreter/Macro_1.scala +++ b/tests/run-macros/simple-interpreter/Macro_1.scala @@ -13,7 +13,7 @@ object Schema { * Assumes that all instances of schema come from `object Schema` */ object SchemaInterpreter { - import scala.quoted._ + import scala.quoted.* def interpretSchemaType[T: Type](schema: Expr[SchemaType[T]])(using Quotes): Option[SchemaType[T]] = schema match { @@ -39,7 +39,7 @@ object SchemaInterpreter { } object Macro { - import scala.quoted._ + import scala.quoted.* inline def useSchema[T](using inline schema: Schema[T]): String = ${ useSchemaExpr[T]('schema) } diff --git a/tests/run-macros/string-context-implicits/Macro_1.scala b/tests/run-macros/string-context-implicits/Macro_1.scala index b0049f9049d3..59e7cfd32543 100644 --- a/tests/run-macros/string-context-implicits/Macro_1.scala +++ b/tests/run-macros/string-context-implicits/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* extension (sc: StringContext) inline def showMe(inline args: Any*): String = ${ showMeExpr('sc, 'args) } diff --git a/tests/run-macros/tasty-argument-tree-1/quoted_1.scala b/tests/run-macros/tasty-argument-tree-1/quoted_1.scala index f25d0f2e3c18..8e5342b1cf0a 100644 --- a/tests/run-macros/tasty-argument-tree-1/quoted_1.scala +++ b/tests/run-macros/tasty-argument-tree-1/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def inspect[T](x: T): Unit = ${ impl('x) } def impl[T](x: Expr[T])(using q: Quotes) : Expr[Unit] = { - import q.reflect._ + import q.reflect.* val tree = x.asTerm given Printer[Tree] = Printer.TreeStructure '{ diff --git a/tests/run-macros/tasty-construct-types/Macro_1.scala b/tests/run-macros/tasty-construct-types/Macro_1.scala index aa896f8fb968..bbeeb4bc9d38 100644 --- a/tests/run-macros/tasty-construct-types/Macro_1.scala +++ b/tests/run-macros/tasty-construct-types/Macro_1.scala @@ -1,4 +1,4 @@ -import quoted._ +import quoted.* object Macros { inline def theTestBlock : Unit = ${ theTestBlockImpl } @@ -11,7 +11,7 @@ object Macros { class TestAnnotation extends scala.annotation.Annotation def theTestBlockImpl(using qctx : Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val x1T = ConstantType(IntConstant(1)) val x2T = OrType(ConstantType(IntConstant(1)), ConstantType(IntConstant(2))) diff --git a/tests/run-macros/tasty-create-method-symbol/Macro_1.scala b/tests/run-macros/tasty-create-method-symbol/Macro_1.scala index ecfed89ded8a..b5953e55402b 100644 --- a/tests/run-macros/tasty-create-method-symbol/Macro_1.scala +++ b/tests/run-macros/tasty-create-method-symbol/Macro_1.scala @@ -1,11 +1,11 @@ -import quoted._ +import quoted.* object Macros { inline def theTestBlock : Unit = ${ theTestBlockImpl } def theTestBlockImpl(using q: Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* // simple smoke test val sym1 : Symbol = Symbol.newMethod( diff --git a/tests/run-macros/tasty-dealias/quoted_1.scala b/tests/run-macros/tasty-dealias/quoted_1.scala index 7e77ea345572..a1ab806f9618 100644 --- a/tests/run-macros/tasty-dealias/quoted_1.scala +++ b/tests/run-macros/tasty-dealias/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def dealias[T]: String = ${ impl[T] } def impl[T: Type](using Quotes) : Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* Expr(TypeRepr.of[T].dealias.show) } } diff --git a/tests/run-macros/tasty-definitions-1/quoted_1.scala b/tests/run-macros/tasty-definitions-1/quoted_1.scala index f425384da21f..6ee80daeeb1d 100644 --- a/tests/run-macros/tasty-definitions-1/quoted_1.scala +++ b/tests/run-macros/tasty-definitions-1/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def testDefinitions(): Unit = ${testDefinitionsImpl} def testDefinitionsImpl(using q: Quotes) : Expr[Unit] = { - import q.reflect._ + import q.reflect.* val buff = List.newBuilder[String] def printout(x: => String): Unit = { diff --git a/tests/run-macros/tasty-eval/quoted_1.scala b/tests/run-macros/tasty-eval/quoted_1.scala index b8af0ac99d63..7a9cf4425d4f 100644 --- a/tests/run-macros/tasty-eval/quoted_1.scala +++ b/tests/run-macros/tasty-eval/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -17,7 +17,7 @@ object Macros { implicit def intIsEvalable: Valuable[Int] = new Valuable[Int] { override def value(e: Expr[Int])(using Quotes) : Option[Int] = { - import quotes.reflect._ + import quotes.reflect.* e.asTerm.tpe match { case pre: TermRef if pre.termSymbol.isValDef => diff --git a/tests/run-macros/tasty-eval/quoted_2.scala b/tests/run-macros/tasty-eval/quoted_2.scala index ac3adbcc9bcd..78cecb18a913 100644 --- a/tests/run-macros/tasty-eval/quoted_2.scala +++ b/tests/run-macros/tasty-eval/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { final val y = 5 diff --git a/tests/run-macros/tasty-extractors-1/quoted_1.scala b/tests/run-macros/tasty-extractors-1/quoted_1.scala index b46abc9d20a1..fd8c68ccb178 100644 --- a/tests/run-macros/tasty-extractors-1/quoted_1.scala +++ b/tests/run-macros/tasty-extractors-1/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -6,7 +6,7 @@ object Macros { ${ impl('x) } def impl[T](x: Expr[T])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = x.asTerm val treeStr = Expr(tree.show(using Printer.TreeStructure)) diff --git a/tests/run-macros/tasty-extractors-1/quoted_2.scala b/tests/run-macros/tasty-extractors-1/quoted_2.scala index b0c052366225..788b0e691bb7 100644 --- a/tests/run-macros/tasty-extractors-1/quoted_2.scala +++ b/tests/run-macros/tasty-extractors-1/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-extractors-2/quoted_1.scala b/tests/run-macros/tasty-extractors-2/quoted_1.scala index 83e401e09cf7..14491d16ed0e 100644 --- a/tests/run-macros/tasty-extractors-2/quoted_1.scala +++ b/tests/run-macros/tasty-extractors-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -6,7 +6,7 @@ object Macros { ${ impl('x) } def impl[T](x: Expr[T])(using q: Quotes) : Expr[Unit] = { - import q.reflect._ + import q.reflect.* val tree = x.asTerm diff --git a/tests/run-macros/tasty-extractors-2/quoted_2.scala b/tests/run-macros/tasty-extractors-2/quoted_2.scala index f2e9908649b9..9a0b21d49855 100644 --- a/tests/run-macros/tasty-extractors-2/quoted_2.scala +++ b/tests/run-macros/tasty-extractors-2/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-extractors-3/quoted_1.scala b/tests/run-macros/tasty-extractors-3/quoted_1.scala index 6f20cb701bd1..435a0b70a351 100644 --- a/tests/run-macros/tasty-extractors-3/quoted_1.scala +++ b/tests/run-macros/tasty-extractors-3/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -7,7 +7,7 @@ object Macros { ${impl('x)} def impl[T](x: Expr[T])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val buff = new StringBuilder val traverser = new TreeTraverser { diff --git a/tests/run-macros/tasty-extractors-3/quoted_2.scala b/tests/run-macros/tasty-extractors-3/quoted_2.scala index 3a5676a765fe..c58b4ad25080 100644 --- a/tests/run-macros/tasty-extractors-3/quoted_2.scala +++ b/tests/run-macros/tasty-extractors-3/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-extractors-constants-1/quoted_1.scala b/tests/run-macros/tasty-extractors-constants-1/quoted_1.scala index 2616f626a6c7..f106dd843566 100644 --- a/tests/run-macros/tasty-extractors-constants-1/quoted_1.scala +++ b/tests/run-macros/tasty-extractors-constants-1/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* diff --git a/tests/run-macros/tasty-extractors-types/quoted_1.scala b/tests/run-macros/tasty-extractors-types/quoted_1.scala index 626f5f0acf57..e59407f3ab2b 100644 --- a/tests/run-macros/tasty-extractors-types/quoted_1.scala +++ b/tests/run-macros/tasty-extractors-types/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { implicit inline def printType[T]: Unit = ${ impl[T] } def impl[T: Type](using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* '{ println(${Expr(TypeTree.of[T].show(using Printer.TreeStructure))}) println(${Expr(TypeRepr.of[T].show(using Printer.TypeReprStructure))}) diff --git a/tests/run-macros/tasty-extractors-types/quoted_2.scala b/tests/run-macros/tasty-extractors-types/quoted_2.scala index 6e19f6cb53a8..b65e5df59c3a 100644 --- a/tests/run-macros/tasty-extractors-types/quoted_2.scala +++ b/tests/run-macros/tasty-extractors-types/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-getfile-implicit-by-name-fun-context/Macro_1.scala b/tests/run-macros/tasty-getfile-implicit-by-name-fun-context/Macro_1.scala index 6fc28ac4403f..bb478331aa64 100644 --- a/tests/run-macros/tasty-getfile-implicit-by-name-fun-context/Macro_1.scala +++ b/tests/run-macros/tasty-getfile-implicit-by-name-fun-context/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object SourceFiles { diff --git a/tests/run-macros/tasty-getfile-implicit-fun-context/Macro_1.scala b/tests/run-macros/tasty-getfile-implicit-fun-context/Macro_1.scala index eab7808ac0fb..d0835e186bfd 100644 --- a/tests/run-macros/tasty-getfile-implicit-fun-context/Macro_1.scala +++ b/tests/run-macros/tasty-getfile-implicit-fun-context/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object SourceFiles { diff --git a/tests/run-macros/tasty-getfile/Macro_1.scala b/tests/run-macros/tasty-getfile/Macro_1.scala index 5e9ccb58e1f0..e0d61b3c6659 100644 --- a/tests/run-macros/tasty-getfile/Macro_1.scala +++ b/tests/run-macros/tasty-getfile/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object SourceFiles { diff --git a/tests/run-macros/tasty-implicit-fun-context-2/Macro_1.scala b/tests/run-macros/tasty-implicit-fun-context-2/Macro_1.scala index ab3a214605db..d99132b853f3 100644 --- a/tests/run-macros/tasty-implicit-fun-context-2/Macro_1.scala +++ b/tests/run-macros/tasty-implicit-fun-context-2/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Foo { diff --git a/tests/run-macros/tasty-indexed-map/quoted_1.scala b/tests/run-macros/tasty-indexed-map/quoted_1.scala index 999d56f7f95e..7cbd7d71d542 100644 --- a/tests/run-macros/tasty-indexed-map/quoted_1.scala +++ b/tests/run-macros/tasty-indexed-map/quoted_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* class MyMap[Keys](private val underlying: Array[Int]) extends AnyVal { def get[K <: String](implicit i: Index[K, Keys]): Int = underlying(i.index) @@ -25,7 +25,7 @@ object Index { implicit inline def succ[K, H, T](implicit prev: => Index[K, T]): Index[K, (H, T)] = ${succImpl[K, H, T]} def succImpl[K, H, T](implicit qctx: Quotes, k: Type[K], h: Type[H], t: Type[T]): Expr[Index[K, (H, T)]] = { - import quotes.reflect._ + import quotes.reflect.* def name(tp: TypeRepr): String = tp match { case ConstantType(StringConstant(str)) => str diff --git a/tests/run-macros/tasty-interpolation-1/Macro.scala b/tests/run-macros/tasty-interpolation-1/Macro.scala index bf5ab7091f1c..4baa52aa2b90 100644 --- a/tests/run-macros/tasty-interpolation-1/Macro.scala +++ b/tests/run-macros/tasty-interpolation-1/Macro.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions object Macro { @@ -55,7 +55,7 @@ abstract class MacroStringInterpolator[T] { protected def interpolate(strCtx: StringContext, argExprs: List[Expr[Any]]) (using Quotes): Expr[T] protected def getStaticStringContext(strCtxExpr: Expr[StringContext])(using Quotes) : StringContext = { - import quotes.reflect._ + import quotes.reflect.* strCtxExpr.asTerm.underlyingArgument match { case Select(Typed(Apply(_, List(Apply(_, List(Typed(Repeated(strCtxArgTrees, _), Inferred()))))), _), _) => val strCtxArgs = strCtxArgTrees.map { @@ -69,7 +69,7 @@ abstract class MacroStringInterpolator[T] { } protected def getArgsList(argsExpr: Expr[Seq[Any]])(using Quotes) : List[Expr[Any]] = { - import quotes.reflect._ + import quotes.reflect.* argsExpr.asTerm.underlyingArgument match { case Typed(Repeated(args, _), _) => args.map(_.asExpr) case tree => throw new NotStaticlyKnownError("Expected statically known argument list", tree.asExpr) diff --git a/tests/run-macros/tasty-interpolation-1/Test_2.scala b/tests/run-macros/tasty-interpolation-1/Test_2.scala index 716adac21f45..eba94ccce355 100644 --- a/tests/run-macros/tasty-interpolation-1/Test_2.scala +++ b/tests/run-macros/tasty-interpolation-1/Test_2.scala @@ -1,4 +1,4 @@ -import Macro._ +import Macro.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-linenumber-2/quoted_1.scala b/tests/run-macros/tasty-linenumber-2/quoted_1.scala index 6205e871457b..39e40fda8556 100644 --- a/tests/run-macros/tasty-linenumber-2/quoted_1.scala +++ b/tests/run-macros/tasty-linenumber-2/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class LineNumber(val value: Int) { override def toString: String = value.toString @@ -9,7 +9,7 @@ object LineNumber { implicit inline def line: LineNumber = ${lineImpl} def lineImpl(using Quotes) : Expr[LineNumber] = { - import quotes.reflect._ + import quotes.reflect.* '{new LineNumber(${Expr(Position.ofMacroExpansion.startLine)})} } diff --git a/tests/run-macros/tasty-linenumber-2/quoted_2.scala b/tests/run-macros/tasty-linenumber-2/quoted_2.scala index 253f4f85ead9..3682de15f841 100644 --- a/tests/run-macros/tasty-linenumber-2/quoted_2.scala +++ b/tests/run-macros/tasty-linenumber-2/quoted_2.scala @@ -1,5 +1,5 @@ -import LineNumber._ +import LineNumber.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-linenumber/quoted_1.scala b/tests/run-macros/tasty-linenumber/quoted_1.scala index c6d71a1c60e8..3ed3c3b68fd9 100644 --- a/tests/run-macros/tasty-linenumber/quoted_1.scala +++ b/tests/run-macros/tasty-linenumber/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* class LineNumber(val value: Int) { override def toString: String = value.toString @@ -10,7 +10,7 @@ object LineNumber { ${lineImpl(Type.of[T])} def lineImpl(x: Type[Unit])(using Quotes) : Expr[LineNumber] = { - import quotes.reflect._ + import quotes.reflect.* '{new LineNumber(${Expr(Position.ofMacroExpansion.startLine)})} } diff --git a/tests/run-macros/tasty-linenumber/quoted_2.scala b/tests/run-macros/tasty-linenumber/quoted_2.scala index 253f4f85ead9..3682de15f841 100644 --- a/tests/run-macros/tasty-linenumber/quoted_2.scala +++ b/tests/run-macros/tasty-linenumber/quoted_2.scala @@ -1,5 +1,5 @@ -import LineNumber._ +import LineNumber.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-location/quoted_1.scala b/tests/run-macros/tasty-location/quoted_1.scala index ae84485437be..c7679c9493b5 100644 --- a/tests/run-macros/tasty-location/quoted_1.scala +++ b/tests/run-macros/tasty-location/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Location(owners: List[String]) @@ -7,7 +7,7 @@ object Location { implicit inline def location: Location = ${impl} def impl(using Quotes) : Expr[Location] = { - import quotes.reflect._ + import quotes.reflect.* def listOwnerNames(sym: Symbol, acc: List[String]): List[String] = if (sym == defn.RootClass || sym == defn.EmptyPackageClass) acc diff --git a/tests/run-macros/tasty-location/quoted_2.scala b/tests/run-macros/tasty-location/quoted_2.scala index 42589dc32db5..089d41f584e9 100644 --- a/tests/run-macros/tasty-location/quoted_2.scala +++ b/tests/run-macros/tasty-location/quoted_2.scala @@ -1,5 +1,5 @@ -import Location._ +import Location.* object Test { val loc1 = location diff --git a/tests/run-macros/tasty-macro-assert/quoted_1.scala b/tests/run-macros/tasty-macro-assert/quoted_1.scala index da2afd1126b6..69cb7ceced5f 100644 --- a/tests/run-macros/tasty-macro-assert/quoted_1.scala +++ b/tests/run-macros/tasty-macro-assert/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Asserts { @@ -13,7 +13,7 @@ object Asserts { ${impl('cond)} def impl(cond: Expr[Boolean])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val tree = cond.asTerm diff --git a/tests/run-macros/tasty-macro-assert/quoted_2.scala b/tests/run-macros/tasty-macro-assert/quoted_2.scala index 06fb973ca4bd..32b5aab0cbc7 100644 --- a/tests/run-macros/tasty-macro-assert/quoted_2.scala +++ b/tests/run-macros/tasty-macro-assert/quoted_2.scala @@ -1,5 +1,5 @@ -import Asserts._ +import Asserts.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-macro-const/quoted_1.scala b/tests/run-macros/tasty-macro-const/quoted_1.scala index 6f33602e4a48..337183e16df4 100644 --- a/tests/run-macros/tasty-macro-const/quoted_1.scala +++ b/tests/run-macros/tasty-macro-const/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def natConst(x: Int): Int = ${ natConstImpl('x) } def natConstImpl(x: Expr[Int])(using Quotes) : Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* val xTree: Term = x.asTerm xTree match { case Inlined(_, _, Literal(IntConstant(n))) => diff --git a/tests/run-macros/tasty-macro-const/quoted_2.scala b/tests/run-macros/tasty-macro-const/quoted_2.scala index 101f5a6488c6..2c8ea5f3f816 100644 --- a/tests/run-macros/tasty-macro-const/quoted_2.scala +++ b/tests/run-macros/tasty-macro-const/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-macro-positions/quoted_1.scala b/tests/run-macros/tasty-macro-positions/quoted_1.scala index e0f7f02e9760..d53cd16088b9 100644 --- a/tests/run-macros/tasty-macro-positions/quoted_1.scala +++ b/tests/run-macros/tasty-macro-positions/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -9,7 +9,7 @@ object Macros { inline def fun3[T]: Unit = ${ impl2(using Type.of[T]) } def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val pos = posStr(x.asTerm.underlyingArgument.pos) val code = x.asTerm.underlyingArgument.show '{ @@ -19,7 +19,7 @@ object Macros { } def impl2[T](using x: Type[T])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val pos = posStr(TypeTree.of[T].pos) val code = TypeTree.of[T].show '{ @@ -29,7 +29,7 @@ object Macros { } def posStr(using Quotes)(pos: quotes.reflect.Position): Expr[String] = { - import quotes.reflect._ + import quotes.reflect.* Expr(s"${pos.sourceFile.jpath.getFileName.toString}:[${pos.start}..${pos.end}]") } } diff --git a/tests/run-macros/tasty-macro-positions/quoted_2.scala b/tests/run-macros/tasty-macro-positions/quoted_2.scala index 105dfe581364..ebd032d4417d 100644 --- a/tests/run-macros/tasty-macro-positions/quoted_2.scala +++ b/tests/run-macros/tasty-macro-positions/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-original-source/Macros_1.scala b/tests/run-macros/tasty-original-source/Macros_1.scala index fc733e3037ae..07d1f8e42e96 100644 --- a/tests/run-macros/tasty-original-source/Macros_1.scala +++ b/tests/run-macros/tasty-original-source/Macros_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { implicit inline def withSource(arg: Any): (String, Any) = ${ impl('arg) } private def impl(arg: Expr[Any])(using Quotes) : Expr[(String, Any)] = { - import quotes.reflect._ + import quotes.reflect.* val source = Expr(arg.asTerm.underlyingArgument.pos.sourceCode.get.toString) '{Tuple2($source, $arg)} } diff --git a/tests/run-macros/tasty-original-source/Test_2.scala b/tests/run-macros/tasty-original-source/Test_2.scala index 9a49456af140..2aae18d26d24 100644 --- a/tests/run-macros/tasty-original-source/Test_2.scala +++ b/tests/run-macros/tasty-original-source/Test_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-overload-secondargs/Macro_1.scala b/tests/run-macros/tasty-overload-secondargs/Macro_1.scala index 91c74945c92b..6967116c01ba 100644 --- a/tests/run-macros/tasty-overload-secondargs/Macro_1.scala +++ b/tests/run-macros/tasty-overload-secondargs/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object X: @@ -22,7 +22,7 @@ object Macro: } def mThenImpl[A:Type, B:Type, S<:(A=>B) :Type, R:Type](x:Expr[S])(using Quotes):Expr[R] = - import quotes.reflect._ + import quotes.reflect.* val fun = '{X}.asTerm val returnType = TypeRepr.of[(S) => ?] val firstPart = Select.overloaded(fun,"andThen", diff --git a/tests/run-macros/tasty-positioned/quoted_1.scala b/tests/run-macros/tasty-positioned/quoted_1.scala index 50c5c79911ae..e6664c6a1774 100644 --- a/tests/run-macros/tasty-positioned/quoted_1.scala +++ b/tests/run-macros/tasty-positioned/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Position(path: String, start: Int, end: Int, startLine: Int, startColumn: Int, endLine: Int, endColumn: Int) @@ -10,7 +10,7 @@ object Positioned { implicit inline def apply[T](x: => T): Positioned[T] = ${impl('x)} def impl[T](x: Expr[T])(implicit ev: Type[T], qctx: Quotes): Expr[Positioned[T]] = { - import quotes.reflect.{Position => Pos, _} + import quotes.reflect.{Position as Pos, *} val pos = Pos.ofMacroExpansion val path = Expr(pos.sourceFile.jpath.toString) diff --git a/tests/run-macros/tasty-positioned/quoted_2.scala b/tests/run-macros/tasty-positioned/quoted_2.scala index 2ef194c72f63..a39449ea2f37 100644 --- a/tests/run-macros/tasty-positioned/quoted_2.scala +++ b/tests/run-macros/tasty-positioned/quoted_2.scala @@ -1,5 +1,5 @@ -import Positioned._ +import Positioned.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-seal-method/quoted_1.scala b/tests/run-macros/tasty-seal-method/quoted_1.scala index 735270480998..bcedc1d08515 100644 --- a/tests/run-macros/tasty-seal-method/quoted_1.scala +++ b/tests/run-macros/tasty-seal-method/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Asserts { @@ -7,7 +7,7 @@ object Asserts { /** Replaces last argument list by 0s */ def zeroLastArgsImpl(x: Expr[Int])(using Quotes) : Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* // For simplicity assumes that all parameters are Int and parameter lists have no more than 3 elements x.asTerm.underlyingArgument match { case Apply(fn, args) => @@ -29,7 +29,7 @@ object Asserts { /** Replaces all argument list by 0s */ def zeroAllArgsImpl(x: Expr[Int])(using Quotes) : Expr[Int] = { - import quotes.reflect._ + import quotes.reflect.* // For simplicity assumes that all parameters are Int and parameter lists have no more than 3 elements def rec(term: Term): Term = term match { case Apply(fn, args) => diff --git a/tests/run-macros/tasty-seal-method/quoted_2.scala b/tests/run-macros/tasty-seal-method/quoted_2.scala index e4f34a4615d0..4232bf008209 100644 --- a/tests/run-macros/tasty-seal-method/quoted_2.scala +++ b/tests/run-macros/tasty-seal-method/quoted_2.scala @@ -1,5 +1,5 @@ -import Asserts._ +import Asserts.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/tasty-simplified/quoted_1.scala b/tests/run-macros/tasty-simplified/quoted_1.scala index bf3b2e2287d8..6635f5afd7c7 100644 --- a/tests/run-macros/tasty-simplified/quoted_1.scala +++ b/tests/run-macros/tasty-simplified/quoted_1.scala @@ -1,12 +1,12 @@ import scala.annotation.tailrec -import scala.quoted._ +import scala.quoted.* object Macros { inline def simplified[T <: Tuple]: Seq[String] = ${ impl[T] } def impl[T: Type](using Quotes) : Expr[Seq[String]] = { - import quotes.reflect._ + import quotes.reflect.* def unpackTuple(tp: TypeRepr): List[TypeRepr] = { @tailrec diff --git a/tests/run-macros/tasty-string-interpolation-reporter-test/Macros_1.scala b/tests/run-macros/tasty-string-interpolation-reporter-test/Macros_1.scala index 23cca5a1ba7a..14d43bd98657 100644 --- a/tests/run-macros/tasty-string-interpolation-reporter-test/Macros_1.scala +++ b/tests/run-macros/tasty-string-interpolation-reporter-test/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions @@ -23,7 +23,7 @@ object Macro { case ('{ StringContext(${Varargs(parts)}*) }, Varargs(args)) => val reporter = new Reporter { def errorOnPart(msg: String, partIdx: Int): Unit = { - import quotes.reflect._ + import quotes.reflect.* report.error(msg, parts(partIdx).asTerm.pos) } } @@ -37,7 +37,7 @@ object Macro { val errors = List.newBuilder[Expr[(Int, Int, Int, String)]] val reporter = new Reporter { def errorOnPart(msg: String, partIdx: Int): Unit = { - import quotes.reflect._ + import quotes.reflect.* val pos = parts(partIdx).asTerm.pos errors += '{ Tuple4(${Expr(partIdx)}, ${Expr(pos.start)}, ${Expr(pos.end)}, ${Expr(msg)}) } } diff --git a/tests/run-macros/tasty-string-interpolation-reporter-test/Test_2.scala b/tests/run-macros/tasty-string-interpolation-reporter-test/Test_2.scala index 8b9424bfecb0..2e459e98f290 100644 --- a/tests/run-macros/tasty-string-interpolation-reporter-test/Test_2.scala +++ b/tests/run-macros/tasty-string-interpolation-reporter-test/Test_2.scala @@ -7,12 +7,12 @@ object Test { } def posTests() = { - import Foo._ + import Foo.* assertEquals(foo"abc${"123"}def", "abc123def") } def negTests() = { - import TestFooErrors._ + import TestFooErrors.* assertEquals(foo"a#c${"123"}def", List((0, 256, 259, "Cannot use #"))) assertEquals(foo"abc${"123"}#ef", List((1, 342, 345, "Cannot use #"))) assertEquals(foo"a#c${"123"}#ef", List((0, 406, 409, "Cannot use #"), (1, 417, 420, "Cannot use #"))) diff --git a/tests/run-macros/tasty-subtyping/quoted_1.scala b/tests/run-macros/tasty-subtyping/quoted_1.scala index 3622d1277f54..bf3cc844f6c7 100644 --- a/tests/run-macros/tasty-subtyping/quoted_1.scala +++ b/tests/run-macros/tasty-subtyping/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -9,13 +9,13 @@ object Macros { ${isSubTypeOfImpl[T, U]} def isTypeEqualImpl[T: Type, U: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* val isTypeEqual = TypeRepr.of[T] =:= TypeRepr.of[U] Expr(isTypeEqual) } def isSubTypeOfImpl[T: Type, U: Type](using Quotes) : Expr[Boolean] = { - import quotes.reflect._ + import quotes.reflect.* val isTypeEqual = TypeRepr.of[T] <:< TypeRepr.of[U] Expr(isTypeEqual) } diff --git a/tests/run-macros/tasty-subtyping/quoted_2.scala b/tests/run-macros/tasty-subtyping/quoted_2.scala index 1223787c2d1e..57f7eec3a25f 100644 --- a/tests/run-macros/tasty-subtyping/quoted_2.scala +++ b/tests/run-macros/tasty-subtyping/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { type A diff --git a/tests/run-macros/tasty-tree-map/quoted_1.scala b/tests/run-macros/tasty-tree-map/quoted_1.scala index a4363f60b599..e502d845591e 100644 --- a/tests/run-macros/tasty-tree-map/quoted_1.scala +++ b/tests/run-macros/tasty-tree-map/quoted_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros: implicit inline def identityMaped[T](x: => T): T = ${ MacrosImpl.impl('x) } object MacrosImpl: def impl[T: Type](x: Expr[T])(using Quotes) : Expr[T] = { - import quotes.reflect._ + import quotes.reflect.* val identityMap = new TreeMap { } val transformed = identityMap.transformTerm(x.asTerm)(Symbol.spliceOwner).asExprOf[T] transformed diff --git a/tests/run-macros/tasty-tree-map/quoted_2.scala b/tests/run-macros/tasty-tree-map/quoted_2.scala index 40e8aeaa7386..85923f1471f9 100644 --- a/tests/run-macros/tasty-tree-map/quoted_2.scala +++ b/tests/run-macros/tasty-tree-map/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* class Annot extends scala.annotation.Annotation @@ -30,7 +30,7 @@ object Test { println(identityMaped({ def f(a: Int*): Int = a.sum; f(47, 1) })) println(identityMaped(((a: Int) => a)(49))) println(identityMaped({ type A = Int; 50: A })) - println(identityMaped({ import scala.{Int => I}; 51: I })) + println(identityMaped({ import scala.{Int as I}; 51: I })) println(identityMaped(52 match { case x => x })) println(identityMaped(53 match { case x: Int => x })) println(identityMaped((0: Any) match { case _: Int | _: Double => 54 })) diff --git a/tests/run-macros/tasty-typeof/Macro_1.scala b/tests/run-macros/tasty-typeof/Macro_1.scala index fdc54f5cd844..005e8f5a96a1 100644 --- a/tests/run-macros/tasty-typeof/Macro_1.scala +++ b/tests/run-macros/tasty-typeof/Macro_1.scala @@ -1,11 +1,11 @@ -import scala.quoted._ +import scala.quoted.* object Macros { inline def testTypeOf(): Unit = ${ testTypeOfImpl } private def testTypeOfImpl(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* '{ assert(${Expr(TypeRepr.of[Unit] =:= TypeRepr.of[Unit])}, "Unit") assert(${Expr(TypeRepr.of[Byte] =:= TypeRepr.of[Byte])}, "Byte") diff --git a/tests/run-macros/tasty-unsafe-let/quoted_1.scala b/tests/run-macros/tasty-unsafe-let/quoted_1.scala index fe8b3c7b86d2..1f366506f768 100644 --- a/tests/run-macros/tasty-unsafe-let/quoted_1.scala +++ b/tests/run-macros/tasty-unsafe-let/quoted_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object Macros { @@ -6,11 +6,11 @@ object Macros { ${ impl('rhs, 'body) } private def impl[T: Type](rhs: Expr[T], body: Expr[T => Unit])(using Quotes) : Expr[Unit] = { - import quotes.reflect._ + import quotes.reflect.* val rhsTerm = rhs.asTerm - import quotes.reflect._ + import quotes.reflect.* ValDef.let(Symbol.spliceOwner, rhsTerm) { rhsId => Expr.betaReduce('{$body(${rhsId.asExpr.asInstanceOf[Expr[T]]})}).asTerm // Dangerous uncheked cast! }.asExprOf[Unit] diff --git a/tests/run-macros/tasty-unsafe-let/quoted_2.scala b/tests/run-macros/tasty-unsafe-let/quoted_2.scala index 10189f718ff9..5b19696d00ff 100644 --- a/tests/run-macros/tasty-unsafe-let/quoted_2.scala +++ b/tests/run-macros/tasty-unsafe-let/quoted_2.scala @@ -1,5 +1,5 @@ -import Macros._ +import Macros.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/type-show/Macro_1.scala b/tests/run-macros/type-show/Macro_1.scala index c20f592dbfef..57a74a3a24f9 100644 --- a/tests/run-macros/type-show/Macro_1.scala +++ b/tests/run-macros/type-show/Macro_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* object TypeToolbox { inline def show[A]: String = ${ showImpl[A] } diff --git a/tests/run-macros/type-show/Test_2.scala b/tests/run-macros/type-show/Test_2.scala index 471d19840338..ee33205413f1 100644 --- a/tests/run-macros/type-show/Test_2.scala +++ b/tests/run-macros/type-show/Test_2.scala @@ -1,6 +1,6 @@ object Test { - import TypeToolbox._ + import TypeToolbox.* def main(args: Array[String]): Unit = { val x = 5 assert(show[x.type] == "x.type") diff --git a/tests/run-macros/xml-interpolation-1/Test_2.scala b/tests/run-macros/xml-interpolation-1/Test_2.scala index 9a3d8d64161b..2d51c6433097 100644 --- a/tests/run-macros/xml-interpolation-1/Test_2.scala +++ b/tests/run-macros/xml-interpolation-1/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/xml-interpolation-1/XmlQuote_1.scala b/tests/run-macros/xml-interpolation-1/XmlQuote_1.scala index 9a359bcfc661..81ec927c3338 100644 --- a/tests/run-macros/xml-interpolation-1/XmlQuote_1.scala +++ b/tests/run-macros/xml-interpolation-1/XmlQuote_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions @@ -13,7 +13,7 @@ object XmlQuote { def impl(receiver: Expr[SCOps], args: Expr[Seq[Any]]) (using Quotes) : Expr[Xml] = { - import quotes.reflect._ + import quotes.reflect.* // for debugging purpose def pp(tree: Tree): Unit = { diff --git a/tests/run-macros/xml-interpolation-2/Test_2.scala b/tests/run-macros/xml-interpolation-2/Test_2.scala index ef060d87e864..c1be23324695 100644 --- a/tests/run-macros/xml-interpolation-2/Test_2.scala +++ b/tests/run-macros/xml-interpolation-2/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/xml-interpolation-2/XmlQuote_1.scala b/tests/run-macros/xml-interpolation-2/XmlQuote_1.scala index 47bb2b079548..1aba40352092 100644 --- a/tests/run-macros/xml-interpolation-2/XmlQuote_1.scala +++ b/tests/run-macros/xml-interpolation-2/XmlQuote_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions @@ -14,7 +14,7 @@ object XmlQuote { implicit inline def SCOps(ctx: => StringContext): SCOps = new SCOps(ctx) def impl(receiver: Expr[SCOps], args: Expr[Seq[Any]])(using Quotes) : Expr[Xml] = { - import quotes.reflect._ + import quotes.reflect.* // for debugging purpose def pp(tree: Tree): Unit = { diff --git a/tests/run-macros/xml-interpolation-3/Test_2.scala b/tests/run-macros/xml-interpolation-3/Test_2.scala index 9a3d8d64161b..2d51c6433097 100644 --- a/tests/run-macros/xml-interpolation-3/Test_2.scala +++ b/tests/run-macros/xml-interpolation-3/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/xml-interpolation-3/XmlQuote_1.scala b/tests/run-macros/xml-interpolation-3/XmlQuote_1.scala index 0dae5174e017..5f3505be3fe7 100644 --- a/tests/run-macros/xml-interpolation-3/XmlQuote_1.scala +++ b/tests/run-macros/xml-interpolation-3/XmlQuote_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions diff --git a/tests/run-macros/xml-interpolation-4/Macros_1.scala b/tests/run-macros/xml-interpolation-4/Macros_1.scala index ef0416817acd..48930ea47f12 100644 --- a/tests/run-macros/xml-interpolation-4/Macros_1.scala +++ b/tests/run-macros/xml-interpolation-4/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions diff --git a/tests/run-macros/xml-interpolation-4/Test_2.scala b/tests/run-macros/xml-interpolation-4/Test_2.scala index 58a2e4d8a05c..89746f4a7592 100644 --- a/tests/run-macros/xml-interpolation-4/Test_2.scala +++ b/tests/run-macros/xml-interpolation-4/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/xml-interpolation-5/Macros_1.scala b/tests/run-macros/xml-interpolation-5/Macros_1.scala index 889696b0335f..b5cd9cb768ca 100644 --- a/tests/run-macros/xml-interpolation-5/Macros_1.scala +++ b/tests/run-macros/xml-interpolation-5/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions diff --git a/tests/run-macros/xml-interpolation-5/Test_2.scala b/tests/run-macros/xml-interpolation-5/Test_2.scala index 37549d857ddb..f822ef37e560 100644 --- a/tests/run-macros/xml-interpolation-5/Test_2.scala +++ b/tests/run-macros/xml-interpolation-5/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/xml-interpolation-6/Macros_1.scala b/tests/run-macros/xml-interpolation-6/Macros_1.scala index f723a57123c1..2660d0aef623 100644 --- a/tests/run-macros/xml-interpolation-6/Macros_1.scala +++ b/tests/run-macros/xml-interpolation-6/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions diff --git a/tests/run-macros/xml-interpolation-6/Test_2.scala b/tests/run-macros/xml-interpolation-6/Test_2.scala index 37549d857ddb..f822ef37e560 100644 --- a/tests/run-macros/xml-interpolation-6/Test_2.scala +++ b/tests/run-macros/xml-interpolation-6/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-macros/xml-interpolation-7/Macros_1.scala b/tests/run-macros/xml-interpolation-7/Macros_1.scala index d41af1bb8d2e..854e20d3c592 100644 --- a/tests/run-macros/xml-interpolation-7/Macros_1.scala +++ b/tests/run-macros/xml-interpolation-7/Macros_1.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.language.implicitConversions diff --git a/tests/run-macros/xml-interpolation-7/Test_2.scala b/tests/run-macros/xml-interpolation-7/Test_2.scala index 367ead05b0a8..296ad2598827 100644 --- a/tests/run-macros/xml-interpolation-7/Test_2.scala +++ b/tests/run-macros/xml-interpolation-7/Test_2.scala @@ -1,4 +1,4 @@ -import XmlQuote._ +import XmlQuote.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/abstract-int-quote.scala b/tests/run-staging/abstract-int-quote.scala index c3070086104b..4f034909c0ff 100644 --- a/tests/run-staging/abstract-int-quote.scala +++ b/tests/run-staging/abstract-int-quote.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test: diff --git a/tests/run-staging/expr-matches.scala b/tests/run-staging/expr-matches.scala index 58eec89f2ace..4e53e0f9a3d2 100644 --- a/tests/run-staging/expr-matches.scala +++ b/tests/run-staging/expr-matches.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i11152.scala b/tests/run-staging/i11152.scala index 6edfab3e85b6..3ebfae25e2f0 100644 --- a/tests/run-staging/i11152.scala +++ b/tests/run-staging/i11152.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i3823-b.scala b/tests/run-staging/i3823-b.scala index 5e45612bb15f..6169ff118dda 100644 --- a/tests/run-staging/i3823-b.scala +++ b/tests/run-staging/i3823-b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { diff --git a/tests/run-staging/i3823-c.scala b/tests/run-staging/i3823-c.scala index bc60ed26ce8e..ce511ea20607 100644 --- a/tests/run-staging/i3823-c.scala +++ b/tests/run-staging/i3823-c.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { diff --git a/tests/run-staging/i3823.scala b/tests/run-staging/i3823.scala index 67c96f3f6637..55a9947a144a 100644 --- a/tests/run-staging/i3823.scala +++ b/tests/run-staging/i3823.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { diff --git a/tests/run-staging/i3847-b.scala b/tests/run-staging/i3847-b.scala index 089927bb7c5b..838dbc6cc4b1 100644 --- a/tests/run-staging/i3847-b.scala +++ b/tests/run-staging/i3847-b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* import scala.reflect.ClassTag object Arrays { @@ -16,7 +16,7 @@ object Arrays { object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { - import Arrays._ + import Arrays.* implicit val ct: Expr[ClassTag[Int]] = '{ClassTag.Int} val arr: Expr[Array[List[Int]]] = Expr(Array[List[Int]](List(1, 2, 3))) println(arr.show) diff --git a/tests/run-staging/i3847.scala b/tests/run-staging/i3847.scala index 5c7c17decb9e..66f0d9c268bf 100644 --- a/tests/run-staging/i3847.scala +++ b/tests/run-staging/i3847.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* import scala.reflect.ClassTag object Arrays { @@ -16,7 +16,7 @@ object Arrays { object Test { implicit val toolbox: scala.quoted.staging.Compiler = scala.quoted.staging.Compiler.make(this.getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { - import Arrays._ + import Arrays.* implicit val ct: Expr[ClassTag[Int]] = '{ClassTag.Int} val arr: Expr[Array[Int]] = Expr(Array[Int](1, 2, 3)) println(arr.show) diff --git a/tests/run-staging/i3876-b.scala b/tests/run-staging/i3876-b.scala index c37026de4a31..eda1b6a77bd7 100644 --- a/tests/run-staging/i3876-b.scala +++ b/tests/run-staging/i3876-b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3876-c.scala b/tests/run-staging/i3876-c.scala index 9995817303cc..de2be818b545 100644 --- a/tests/run-staging/i3876-c.scala +++ b/tests/run-staging/i3876-c.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { implicit def toolbox: scala.quoted.staging.Compiler = scala.quoted.staging.Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3876-d.scala b/tests/run-staging/i3876-d.scala index 87c9394f4e11..cd22aaf90400 100644 --- a/tests/run-staging/i3876-d.scala +++ b/tests/run-staging/i3876-d.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3876-e.scala b/tests/run-staging/i3876-e.scala index f9195a89c633..3950899c1f4c 100644 --- a/tests/run-staging/i3876-e.scala +++ b/tests/run-staging/i3876-e.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3876.scala b/tests/run-staging/i3876.scala index 0b3c4fdf7229..1e5f991257cc 100644 --- a/tests/run-staging/i3876.scala +++ b/tests/run-staging/i3876.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3946.scala b/tests/run-staging/i3946.scala index 768a22eb8a27..73aa4883e792 100644 --- a/tests/run-staging/i3946.scala +++ b/tests/run-staging/i3946.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947.scala b/tests/run-staging/i3947.scala index 18dbde6803f8..cf83bae1ccb9 100644 --- a/tests/run-staging/i3947.scala +++ b/tests/run-staging/i3947.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i3947b.scala b/tests/run-staging/i3947b.scala index 4692f98cd825..fb1d0f19d995 100644 --- a/tests/run-staging/i3947b.scala +++ b/tests/run-staging/i3947b.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i3947b2.scala b/tests/run-staging/i3947b2.scala index aae1e363e325..33d76753b1a4 100644 --- a/tests/run-staging/i3947b2.scala +++ b/tests/run-staging/i3947b2.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i3947b3.scala b/tests/run-staging/i3947b3.scala index ff69aeb5fd91..fd9ec26d15a6 100644 --- a/tests/run-staging/i3947b3.scala +++ b/tests/run-staging/i3947b3.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i3947c.scala b/tests/run-staging/i3947c.scala index 5d676d784afc..963ff3750fbd 100644 --- a/tests/run-staging/i3947c.scala +++ b/tests/run-staging/i3947c.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947d.scala b/tests/run-staging/i3947d.scala index e9bb565a3394..44c46ee169ef 100644 --- a/tests/run-staging/i3947d.scala +++ b/tests/run-staging/i3947d.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947d2.scala b/tests/run-staging/i3947d2.scala index 9ad505021ddb..0108893a7b78 100644 --- a/tests/run-staging/i3947d2.scala +++ b/tests/run-staging/i3947d2.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947e.scala b/tests/run-staging/i3947e.scala index 9e9c79858f56..64f4e51dfdda 100644 --- a/tests/run-staging/i3947e.scala +++ b/tests/run-staging/i3947e.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947f.scala b/tests/run-staging/i3947f.scala index 8f5853f5dabe..8acbb2b9678b 100644 --- a/tests/run-staging/i3947f.scala +++ b/tests/run-staging/i3947f.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i3947g.scala b/tests/run-staging/i3947g.scala index 2f0fb441976d..548566213321 100644 --- a/tests/run-staging/i3947g.scala +++ b/tests/run-staging/i3947g.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947i.scala b/tests/run-staging/i3947i.scala index c44ca7813220..bc5151528de6 100644 --- a/tests/run-staging/i3947i.scala +++ b/tests/run-staging/i3947i.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i3947j.scala b/tests/run-staging/i3947j.scala index ba2c1010acaa..19b7c4a7f77d 100644 --- a/tests/run-staging/i3947j.scala +++ b/tests/run-staging/i3947j.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i4044a.scala b/tests/run-staging/i4044a.scala index fffb3f582d6c..0915adfe7e69 100644 --- a/tests/run-staging/i4044a.scala +++ b/tests/run-staging/i4044a.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* class Foo { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i4044b.scala b/tests/run-staging/i4044b.scala index 562d74c5c6ba..35ee33f87931 100644 --- a/tests/run-staging/i4044b.scala +++ b/tests/run-staging/i4044b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* sealed abstract class VarRef[T] { def update(expr: Expr[T])(using Quotes): Expr[Unit] diff --git a/tests/run-staging/i4044c.scala b/tests/run-staging/i4044c.scala index 1346e3b97b01..2a2839655ccb 100644 --- a/tests/run-staging/i4044c.scala +++ b/tests/run-staging/i4044c.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* class Foo { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i4044d.scala b/tests/run-staging/i4044d.scala index f3a7c6e6bebb..221582f68d6f 100644 --- a/tests/run-staging/i4044d.scala +++ b/tests/run-staging/i4044d.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* class Foo { def foo: Unit = { diff --git a/tests/run-staging/i4044e.scala b/tests/run-staging/i4044e.scala index 96b13eec7470..298e4703351b 100644 --- a/tests/run-staging/i4044e.scala +++ b/tests/run-staging/i4044e.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* class Foo { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i4044f.scala b/tests/run-staging/i4044f.scala index 1107428a3074..c3cc7686621e 100644 --- a/tests/run-staging/i4044f.scala +++ b/tests/run-staging/i4044f.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* class Foo { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i4350.scala b/tests/run-staging/i4350.scala index 3065042b3e49..9a488cd50086 100644 --- a/tests/run-staging/i4350.scala +++ b/tests/run-staging/i4350.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* class Foo[T: Type] { def q(using Quotes) = '{(null: Any).asInstanceOf[T]} diff --git a/tests/run-staging/i4591.scala b/tests/run-staging/i4591.scala index 9b31015ae82d..f37dd2898e8b 100644 --- a/tests/run-staging/i4591.scala +++ b/tests/run-staging/i4591.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i4730.scala b/tests/run-staging/i4730.scala index 66583a31969c..4c3d9b23cb10 100644 --- a/tests/run-staging/i4730.scala +++ b/tests/run-staging/i4730.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5144.scala b/tests/run-staging/i5144.scala index b1dc4ac6feef..fe51412931c7 100644 --- a/tests/run-staging/i5144.scala +++ b/tests/run-staging/i5144.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5144b.scala b/tests/run-staging/i5144b.scala index 056b19c33b46..f9ef56666af2 100644 --- a/tests/run-staging/i5144b.scala +++ b/tests/run-staging/i5144b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5152.scala b/tests/run-staging/i5152.scala index e89eed3b4e04..d140bf8459a7 100644 --- a/tests/run-staging/i5152.scala +++ b/tests/run-staging/i5152.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5161.scala b/tests/run-staging/i5161.scala index 1851a0200466..0509b12ec5ba 100644 --- a/tests/run-staging/i5161.scala +++ b/tests/run-staging/i5161.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) @@ -8,7 +8,7 @@ object Test { case Int2(x: Int) case Add(e1: Exp, e2: Exp) } - import Exp._ + import Exp.* def evalTest(e: Exp)(using Quotes): Expr[Option[Int]] = e match { case Int2(x) => '{ Some(${Expr(x)}) } diff --git a/tests/run-staging/i5161b.scala b/tests/run-staging/i5161b.scala index 8777b90ed27f..2c6f0c3474d0 100644 --- a/tests/run-staging/i5161b.scala +++ b/tests/run-staging/i5161b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5247.scala b/tests/run-staging/i5247.scala index 86c27af39c8d..7e6f7d46e1f6 100644 --- a/tests/run-staging/i5247.scala +++ b/tests/run-staging/i5247.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5376.scala b/tests/run-staging/i5376.scala index be6ea755857a..37b8e3cf5efe 100644 --- a/tests/run-staging/i5376.scala +++ b/tests/run-staging/i5376.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5434.scala b/tests/run-staging/i5434.scala index 199392390f93..0581ccbe397a 100644 --- a/tests/run-staging/i5434.scala +++ b/tests/run-staging/i5434.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i5965.scala b/tests/run-staging/i5965.scala index b77246fe7853..78b57557ca11 100644 --- a/tests/run-staging/i5965.scala +++ b/tests/run-staging/i5965.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i5965b.scala b/tests/run-staging/i5965b.scala index ddf9f4226c2d..1d4612313c0e 100644 --- a/tests/run-staging/i5965b.scala +++ b/tests/run-staging/i5965b.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i5997.scala b/tests/run-staging/i5997.scala index faf5675aac15..854a9fc98315 100644 --- a/tests/run-staging/i5997.scala +++ b/tests/run-staging/i5997.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i6263.scala b/tests/run-staging/i6263.scala index 5b69b12b7660..0b7fd06c1885 100644 --- a/tests/run-staging/i6263.scala +++ b/tests/run-staging/i6263.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i6281.scala b/tests/run-staging/i6281.scala index 92a14c21536a..a6667a41d7bc 100644 --- a/tests/run-staging/i6281.scala +++ b/tests/run-staging/i6281.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* sealed trait HList sealed trait HNil extends HList diff --git a/tests/run-staging/i6754.scala b/tests/run-staging/i6754.scala index 686c402d516b..e11ea596f6e7 100644 --- a/tests/run-staging/i6754.scala +++ b/tests/run-staging/i6754.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = diff --git a/tests/run-staging/i6992/Macro_1.scala b/tests/run-staging/i6992/Macro_1.scala index b03cf874f19b..09cacfd9e1eb 100644 --- a/tests/run-staging/i6992/Macro_1.scala +++ b/tests/run-staging/i6992/Macro_1.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object macros { @@ -14,12 +14,12 @@ object macros { package scala { object MyTest { - import macros._ + import macros.* given Compiler = Compiler.make(getClass.getClassLoader) def mcrImpl(body: Expr[Any])(using ctx: Quotes): Expr[Any] = { - import ctx.reflect._ + import ctx.reflect.* try { body match { case '{$x: Foo} => Expr(run(x).x) diff --git a/tests/run-staging/i6992/Test_2.scala b/tests/run-staging/i6992/Test_2.scala index 13ff747a80c5..01ce6977c72c 100644 --- a/tests/run-staging/i6992/Test_2.scala +++ b/tests/run-staging/i6992/Test_2.scala @@ -1,4 +1,4 @@ -import macros._ +import macros.* object Test { val foo = new Foo diff --git a/tests/run-staging/i7142.scala b/tests/run-staging/i7142.scala index a8323e8a2668..5ec9b0785d30 100644 --- a/tests/run-staging/i7142.scala +++ b/tests/run-staging/i7142.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ -import scala.util.control.NonLocalReturns._ +import scala.quoted.* +import scala.quoted.staging.* +import scala.util.control.NonLocalReturns.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i7381.scala b/tests/run-staging/i7381.scala index d84fb72c858d..1bdc21277e22 100644 --- a/tests/run-staging/i7381.scala +++ b/tests/run-staging/i7381.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/i7897.scala b/tests/run-staging/i7897.scala index 2b0952971761..21909f4306d6 100644 --- a/tests/run-staging/i7897.scala +++ b/tests/run-staging/i7897.scala @@ -1,4 +1,4 @@ -import scala.quoted._, staging._ +import scala.quoted._, staging.* object Test: given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/i8178.scala b/tests/run-staging/i8178.scala index c0aeb545bad2..3a29cf9abfd5 100644 --- a/tests/run-staging/i8178.scala +++ b/tests/run-staging/i8178.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* def foo(n: Int, t: Expr[Int])(using Quotes): Expr[Int] = if (n == 0) t diff --git a/tests/run-staging/i8585.scala b/tests/run-staging/i8585.scala index e525e056a336..ef099579fbcf 100644 --- a/tests/run-staging/i8585.scala +++ b/tests/run-staging/i8585.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* import scala.quoted.staging.{run, withQuotes, Compiler} object Test { diff --git a/tests/run-staging/inline-at-level-2.scala b/tests/run-staging/inline-at-level-2.scala index 9d0689296032..0d2335ac1004 100644 --- a/tests/run-staging/inline-at-level-2.scala +++ b/tests/run-staging/inline-at-level-2.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/inline-quote.scala b/tests/run-staging/inline-quote.scala index 0af500dafebe..07b35d614894 100644 --- a/tests/run-staging/inline-quote.scala +++ b/tests/run-staging/inline-quote.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/liftables.scala b/tests/run-staging/liftables.scala index 758333946ced..f30c01280ed5 100644 --- a/tests/run-staging/liftables.scala +++ b/tests/run-staging/liftables.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { diff --git a/tests/run-staging/multi-staging.scala b/tests/run-staging/multi-staging.scala index e94e6b84f434..d94528f18e4b 100644 --- a/tests/run-staging/multi-staging.scala +++ b/tests/run-staging/multi-staging.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = diff --git a/tests/run-staging/quote-ackermann-1.scala b/tests/run-staging/quote-ackermann-1.scala index f0f1d5891087..de689f5559be 100644 --- a/tests/run-staging/quote-ackermann-1.scala +++ b/tests/run-staging/quote-ackermann-1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/quote-fun-app-1.scala b/tests/run-staging/quote-fun-app-1.scala index 2f92275a6ccc..804899e45fd5 100644 --- a/tests/run-staging/quote-fun-app-1.scala +++ b/tests/run-staging/quote-fun-app-1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/quote-function-applied-to.scala b/tests/run-staging/quote-function-applied-to.scala index ddbc472e3b2d..454b8bb6e1a8 100644 --- a/tests/run-staging/quote-function-applied-to.scala +++ b/tests/run-staging/quote-function-applied-to.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-lambda.scala b/tests/run-staging/quote-lambda.scala index 216be6f9f027..8e85c40e3637 100644 --- a/tests/run-staging/quote-lambda.scala +++ b/tests/run-staging/quote-lambda.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-lib.scala b/tests/run-staging/quote-lib.scala index 527adaa21958..25a829f01d8c 100644 --- a/tests/run-staging/quote-lib.scala +++ b/tests/run-staging/quote-lib.scala @@ -1,12 +1,12 @@ -import scala.quoted._ -import scala.quoted.staging._ - -import liftable.Units._ -import liftable.Lets._ -import liftable.Loops._ -import liftable.Lists._ -import liftable.Exprs._ +import scala.quoted.* +import scala.quoted.staging.* + +import liftable.Units.* +import liftable.Lets.* +import liftable.Loops.* +import liftable.Lists.* +import liftable.Exprs.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-lift-Array.scala b/tests/run-staging/quote-lift-Array.scala index 6fd9f7c82416..b65695097f11 100644 --- a/tests/run-staging/quote-lift-Array.scala +++ b/tests/run-staging/quote-lift-Array.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { implicit val toolbox: scala.quoted.staging.Compiler = scala.quoted.staging.Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = run { diff --git a/tests/run-staging/quote-lift-BigDecimal.scala b/tests/run-staging/quote-lift-BigDecimal.scala index 8f3cff7f8494..39c5b79d532d 100644 --- a/tests/run-staging/quote-lift-BigDecimal.scala +++ b/tests/run-staging/quote-lift-BigDecimal.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = println(run { diff --git a/tests/run-staging/quote-lift-BigInt.scala b/tests/run-staging/quote-lift-BigInt.scala index 607828798c9a..de4b5296741d 100644 --- a/tests/run-staging/quote-lift-BigInt.scala +++ b/tests/run-staging/quote-lift-BigInt.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = println(run { diff --git a/tests/run-staging/quote-lift-IArray.scala b/tests/run-staging/quote-lift-IArray.scala index 2733a7e12fc8..8219ce96f063 100644 --- a/tests/run-staging/quote-lift-IArray.scala +++ b/tests/run-staging/quote-lift-IArray.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-nested-1.scala b/tests/run-staging/quote-nested-1.scala index 222247b55290..e22699992e38 100644 --- a/tests/run-staging/quote-nested-1.scala +++ b/tests/run-staging/quote-nested-1.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-nested-2.scala b/tests/run-staging/quote-nested-2.scala index 6616dada2577..7769bcd4707e 100644 --- a/tests/run-staging/quote-nested-2.scala +++ b/tests/run-staging/quote-nested-2.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-nested-3.scala b/tests/run-staging/quote-nested-3.scala index d07489199a21..303df1ad79e9 100644 --- a/tests/run-staging/quote-nested-3.scala +++ b/tests/run-staging/quote-nested-3.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-nested-4.scala b/tests/run-staging/quote-nested-4.scala index ae1457592c0f..d986b2299265 100644 --- a/tests/run-staging/quote-nested-4.scala +++ b/tests/run-staging/quote-nested-4.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-nested-5.scala b/tests/run-staging/quote-nested-5.scala index 4a807b403e4b..919b9c1bfad4 100644 --- a/tests/run-staging/quote-nested-5.scala +++ b/tests/run-staging/quote-nested-5.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-nested-6.scala b/tests/run-staging/quote-nested-6.scala index d7599a2dbf7d..193e7b2f4676 100644 --- a/tests/run-staging/quote-nested-6.scala +++ b/tests/run-staging/quote-nested-6.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-owners-2.scala b/tests/run-staging/quote-owners-2.scala index 4d51093c9efd..4e17d9d7a3c5 100644 --- a/tests/run-staging/quote-owners-2.scala +++ b/tests/run-staging/quote-owners-2.scala @@ -1,6 +1,6 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-owners.scala b/tests/run-staging/quote-owners.scala index b012c5084d0d..d3850d9d7801 100644 --- a/tests/run-staging/quote-owners.scala +++ b/tests/run-staging/quote-owners.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run-2.scala b/tests/run-staging/quote-run-2.scala index 480972336de9..3b69514cf908 100644 --- a/tests/run-staging/quote-run-2.scala +++ b/tests/run-staging/quote-run-2.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-run-b.scala b/tests/run-staging/quote-run-b.scala index b4e0a4dd8913..479b4c60aec5 100644 --- a/tests/run-staging/quote-run-b.scala +++ b/tests/run-staging/quote-run-b.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run-c.scala b/tests/run-staging/quote-run-c.scala index 4ac8b9121a43..7cb21efe56f0 100644 --- a/tests/run-staging/quote-run-c.scala +++ b/tests/run-staging/quote-run-c.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run-constants.scala b/tests/run-staging/quote-run-constants.scala index f73d24721054..a48f290557d8 100644 --- a/tests/run-staging/quote-run-constants.scala +++ b/tests/run-staging/quote-run-constants.scala @@ -1,7 +1,7 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run-large.scala b/tests/run-staging/quote-run-large.scala index a6943da60a5f..048ff69f67dc 100644 --- a/tests/run-staging/quote-run-large.scala +++ b/tests/run-staging/quote-run-large.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run-many.scala b/tests/run-staging/quote-run-many.scala index 0896e0e3ba8f..9f635eeab5e9 100644 --- a/tests/run-staging/quote-run-many.scala +++ b/tests/run-staging/quote-run-many.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run-staged-interpreter.scala b/tests/run-staging/quote-run-staged-interpreter.scala index d31b617a905d..2f2d977f6d4e 100644 --- a/tests/run-staging/quote-run-staged-interpreter.scala +++ b/tests/run-staging/quote-run-staged-interpreter.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* enum Exp { case Num(n: Int) @@ -9,7 +9,7 @@ enum Exp { } object Test { - import Exp._ + import Exp.* def compile(e: Exp, env: Map[String, Expr[Int]], keepLets: Boolean)(using Quotes): Expr[Int] = { def compileImpl(e: Exp, env: Map[String, Expr[Int]]): Expr[Int] = e match { diff --git a/tests/run-staging/quote-run-with-settings.scala b/tests/run-staging/quote-run-with-settings.scala index 380613d1c34f..b4a5712759dc 100644 --- a/tests/run-staging/quote-run-with-settings.scala +++ b/tests/run-staging/quote-run-with-settings.scala @@ -1,8 +1,8 @@ import java.nio.file.{Files, Paths} -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-run.scala b/tests/run-staging/quote-run.scala index 7368757ff7aa..4fb14a791040 100644 --- a/tests/run-staging/quote-run.scala +++ b/tests/run-staging/quote-run.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-staging/quote-show-blocks.scala b/tests/run-staging/quote-show-blocks.scala index c2f44ac832e8..204546ae62ed 100644 --- a/tests/run-staging/quote-show-blocks.scala +++ b/tests/run-staging/quote-show-blocks.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-simple-hole.scala b/tests/run-staging/quote-simple-hole.scala index f25af11d24a0..1f33ea7ced58 100644 --- a/tests/run-staging/quote-simple-hole.scala +++ b/tests/run-staging/quote-simple-hole.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-toExprOfTuple.scala b/tests/run-staging/quote-toExprOfTuple.scala index 5c19952f1516..ef128b0dd785 100644 --- a/tests/run-staging/quote-toExprOfTuple.scala +++ b/tests/run-staging/quote-toExprOfTuple.scala @@ -1,6 +1,6 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-two-captured-ref.scala b/tests/run-staging/quote-two-captured-ref.scala index 5f82b8fd71e4..cecb5d11ab19 100644 --- a/tests/run-staging/quote-two-captured-ref.scala +++ b/tests/run-staging/quote-two-captured-ref.scala @@ -1,5 +1,5 @@ -import quoted._ -import scala.quoted.staging._ +import quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-type-matcher.scala b/tests/run-staging/quote-type-matcher.scala index fb4434873486..e1d213d98019 100644 --- a/tests/run-staging/quote-type-matcher.scala +++ b/tests/run-staging/quote-type-matcher.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* import scala.reflect.ClassTag object Test { diff --git a/tests/run-staging/quote-type-tags.scala b/tests/run-staging/quote-type-tags.scala index 918f703c5133..27e3bbca3928 100644 --- a/tests/run-staging/quote-type-tags.scala +++ b/tests/run-staging/quote-type-tags.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-unrolled-foreach.scala b/tests/run-staging/quote-unrolled-foreach.scala index f532244b2e86..a286e72a3e37 100644 --- a/tests/run-staging/quote-unrolled-foreach.scala +++ b/tests/run-staging/quote-unrolled-foreach.scala @@ -1,6 +1,6 @@ import scala.annotation.tailrec -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) diff --git a/tests/run-staging/quote-valueof-list.scala b/tests/run-staging/quote-valueof-list.scala index 87403684b2d5..00d1774b169c 100644 --- a/tests/run-staging/quote-valueof-list.scala +++ b/tests/run-staging/quote-valueof-list.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/quote-valueof.scala b/tests/run-staging/quote-valueof.scala index 29bf7c1631ee..db6cd12e3015 100644 --- a/tests/run-staging/quote-valueof.scala +++ b/tests/run-staging/quote-valueof.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/quote-var.scala b/tests/run-staging/quote-var.scala index ebde4a7edf1c..9c6bbcc4bd5f 100644 --- a/tests/run-staging/quote-var.scala +++ b/tests/run-staging/quote-var.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { diff --git a/tests/run-staging/shonan-hmm-simple.scala b/tests/run-staging/shonan-hmm-simple.scala index e17c998ed65e..36f0ac218482 100644 --- a/tests/run-staging/shonan-hmm-simple.scala +++ b/tests/run-staging/shonan-hmm-simple.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* trait Ring[T]: val zero: T diff --git a/tests/run-staging/shonan-hmm/Blas.scala b/tests/run-staging/shonan-hmm/Blas.scala index 4c5f873c3888..bee4bf23daa8 100644 --- a/tests/run-staging/shonan-hmm/Blas.scala +++ b/tests/run-staging/shonan-hmm/Blas.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* class Blas1[Idx, T, Unt](tring: Ring[T], vec: VecOp[Idx, Unt]) { - import tring._ - import vec._ + import tring.* + import vec.* implicit class Blas1VecOps(v1: Vec[Idx, T]) { def `*.`(v2: Vec[Idx, T]): Vec[Idx, T] = v1.zipWith(v2, mul) @@ -16,8 +16,8 @@ class Blas1[Idx, T, Unt](tring: Ring[T], vec: VecOp[Idx, Unt]) { } class Blas2[Idx, T, Unt](tring: Ring[T], vec: VecROp[Idx, T, Unt]) extends Blas1[Idx, T, Unt](tring, vec) { - import tring._ - import vec._ + import tring.* + import vec.* implicit class Blas2VecOps(v1: Vec[Idx, T]) { def dot(v2: Vec[Idx, T]): T = reduce(add, zero, v1 `*.` v2) diff --git a/tests/run-staging/shonan-hmm/Complex.scala b/tests/run-staging/shonan-hmm/Complex.scala index cf71da66da1b..ad6d7cf535c4 100644 --- a/tests/run-staging/shonan-hmm/Complex.scala +++ b/tests/run-staging/shonan-hmm/Complex.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* case class Complex[T](re: T, im: T) diff --git a/tests/run-staging/shonan-hmm/Lifters.scala b/tests/run-staging/shonan-hmm/Lifters.scala index bfe71c6cd750..4a2de3715f12 100644 --- a/tests/run-staging/shonan-hmm/Lifters.scala +++ b/tests/run-staging/shonan-hmm/Lifters.scala @@ -1,8 +1,8 @@ -import UnrolledExpr._ +import UnrolledExpr.* import scala.reflect.ClassTag -import scala.quoted._ +import scala.quoted.* object Lifters { implicit def LiftedClassTag[T: Type: ClassTag] (using Quotes): Expr[ClassTag[T]] = { diff --git a/tests/run-staging/shonan-hmm/MVmult.scala b/tests/run-staging/shonan-hmm/MVmult.scala index 5a26c7c629b4..210c62a4d891 100644 --- a/tests/run-staging/shonan-hmm/MVmult.scala +++ b/tests/run-staging/shonan-hmm/MVmult.scala @@ -1,9 +1,9 @@ -import scala.quoted._ +import scala.quoted.* class MVmult[Idx, T, Unt](tring: Ring[T], vec: VecROp[Idx, T, Unt]) { private[this] val blas2 = new Blas2(tring, vec) - import blas2._ + import blas2.* def mvmult(vout: OVec[Idx, T, Unt], a: Vec[Idx, Vec[Idx, T]], v: Vec[Idx, T]): Unt = vout := a * v override def toString(): String = s"MVmult($tring, $vec)" } @@ -54,7 +54,7 @@ object MVmult { } def mvmult_ac(a: Array[Array[Int]])(using Quotes): Expr[(Array[Int], Array[Int]) => Unit] = { - import Lifters._ + import Lifters.* '{ val arr = ${Expr(a)} ${ @@ -65,7 +65,7 @@ object MVmult { } def mvmult_opt(a: Array[Array[Int]])(using Quotes): Expr[(Array[Int], Array[Int]) => Unit] = { - import Lifters._ + import Lifters.* '{ val arr = ${Expr(a)} ${ @@ -76,7 +76,7 @@ object MVmult { } def mvmult_roll(a: Array[Array[Int]])(using Quotes): Expr[(Array[Int], Array[Int]) => Unit] = { - import Lifters._ + import Lifters.* '{ val arr = ${Expr(a)} ${ @@ -99,7 +99,7 @@ object MVmult { } def initRows[T: Type](a: Array[Array[Int]])(cont: Array[Expr[Array[Int]]] => Expr[T])(using Quotes): Expr[T] = { - import Lifters._ + import Lifters.* def loop(i: Int, acc: List[Expr[Array[Int]]]): Expr[T] = { if (i >= a.length) cont(acc.toArray.reverse) else if (a(i).count(_ != 0) < VecRStaOptDynInt.threshold) { @@ -148,13 +148,13 @@ object MVmult { } def copy_row1(using Quotes): Array[Int] => (Expr[Int] => Expr[Int]) = v => { - import Lifters._ + import Lifters.* val arr = Expr(v) i => '{ ($arr).apply($i) } } def copy_row_let(using Quotes): Array[Int] => (Expr[Int] => Expr[Int]) = v => { - import Lifters._ + import Lifters.* val arr: Expr[Array[Int]] = ??? // FIXME used genlet v i => '{ ($arr).apply($i) } } diff --git a/tests/run-staging/shonan-hmm/PV.scala b/tests/run-staging/shonan-hmm/PV.scala index 46e56b7d4ab7..a0d9eb6ba0c5 100644 --- a/tests/run-staging/shonan-hmm/PV.scala +++ b/tests/run-staging/shonan-hmm/PV.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* sealed trait PV[T] diff --git a/tests/run-staging/shonan-hmm/Ring.scala b/tests/run-staging/shonan-hmm/Ring.scala index 4b88955d7d6e..c7b89fd6aa56 100644 --- a/tests/run-staging/shonan-hmm/Ring.scala +++ b/tests/run-staging/shonan-hmm/Ring.scala @@ -1,5 +1,5 @@ -import scala.quoted._ +import scala.quoted.* trait Ring[T] { def zero: T @@ -34,7 +34,7 @@ class RingIntExpr(using Quotes) extends Ring[Expr[Int]] { } case class RingComplex[U](u: Ring[U]) extends Ring[Complex[U]] { - import u._ + import u.* val zero = Complex(u.zero, u.zero) val one = Complex(u.one, u.zero) val add = (x, y) => Complex(x.re + y.re, x.im + y.im) @@ -47,8 +47,8 @@ case class RingPV[U: ToExpr](staRing: Ring[U], dynRing: Ring[Expr[U]])(using Quo type T = PV[U] val dyn = Dyns.dyn[U] - import staRing._ - import dynRing._ + import staRing.* + import dynRing.* val zero: T = Sta(staRing.zero) val one: T = Sta(staRing.one) diff --git a/tests/run-staging/shonan-hmm/Test.scala b/tests/run-staging/shonan-hmm/Test.scala index cb909487ddb8..b689ad146af3 100644 --- a/tests/run-staging/shonan-hmm/Test.scala +++ b/tests/run-staging/shonan-hmm/Test.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* // DYNAMIC @@ -11,14 +11,14 @@ object Test { { val intComplex = new RingComplex(RingInt) - import intComplex._ + import intComplex.* println(Complex(1, 2) * Complex(4, 2)) } { val intExprComplex = new RingComplex(new RingIntExpr) - import intExprComplex._ + import intExprComplex.* val res = Complex('{1}, '{2}) * Complex('{4}, '{2}) println(s"Complex(${res.re.show}, ${res.im.show})") @@ -26,7 +26,7 @@ object Test { // { // val intExprComplex = implicitly[Ring[Expr[Complex[Int]]]] - // import intExprComplex._ + // import intExprComplex.* // val res = '{Complex(1, 2)} * '{Complex(4, 2)} // println(res.show) diff --git a/tests/run-staging/shonan-hmm/UnrolledExpr.scala b/tests/run-staging/shonan-hmm/UnrolledExpr.scala index eb52ac72b8a0..f73b446aed93 100644 --- a/tests/run-staging/shonan-hmm/UnrolledExpr.scala +++ b/tests/run-staging/shonan-hmm/UnrolledExpr.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import Lifters._ +import scala.quoted.* +import Lifters.* object UnrolledExpr { @@ -19,7 +19,7 @@ object UnrolledExpr { } class UnrolledExpr[T: ToExpr, It <: Iterable[T]](xs: It) { - import UnrolledExpr._ + import UnrolledExpr.* def foreach[U](f: T => Expr[U])(using Quotes): Expr[Unit] = block(xs.map(f), '{}) diff --git a/tests/run-staging/shonan-hmm/Vec.scala b/tests/run-staging/shonan-hmm/Vec.scala index 68ad9f43f8b6..b1864f056ee8 100644 --- a/tests/run-staging/shonan-hmm/Vec.scala +++ b/tests/run-staging/shonan-hmm/Vec.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* case class Vec[Idx, T](size: Idx, get: Idx => T) { def apply(idx: Idx): T = get(idx) diff --git a/tests/run-staging/shonan-hmm/VecOp.scala b/tests/run-staging/shonan-hmm/VecOp.scala index 930330640f8c..eb56bc9ac748 100644 --- a/tests/run-staging/shonan-hmm/VecOp.scala +++ b/tests/run-staging/shonan-hmm/VecOp.scala @@ -1,4 +1,4 @@ -import scala.quoted._ +import scala.quoted.* trait VecOp[Idx, Unt] { def iter: Vec[Idx, Unt] => Unt diff --git a/tests/run-staging/shonan-hmm/VecROp.scala b/tests/run-staging/shonan-hmm/VecROp.scala index 1182df2479f4..44cac1693f84 100644 --- a/tests/run-staging/shonan-hmm/VecROp.scala +++ b/tests/run-staging/shonan-hmm/VecROp.scala @@ -1,12 +1,12 @@ -import scala.quoted._ +import scala.quoted.* trait VecROp[Idx, T, Unt] extends VecOp[Idx, Unt] { def reduce: ((T, T) => T, T, Vec[Idx, T]) => T } class StaticVecR[T](r: Ring[T]) extends VecSta with VecROp[Int, T, Unit] { - import r._ + import r.* def reduce: ((T, T) => T, T, Vec[Int, T]) => T = { (plus, zero, vec) => var sum = zero for (i <- 0 until vec.size) diff --git a/tests/run-staging/shonan-hmm/Vmults.scala b/tests/run-staging/shonan-hmm/Vmults.scala index 982104399ec2..a041b395747a 100644 --- a/tests/run-staging/shonan-hmm/Vmults.scala +++ b/tests/run-staging/shonan-hmm/Vmults.scala @@ -1,8 +1,8 @@ -import scala.quoted._ +import scala.quoted.* class Vmult[Idx, T, Unt](tring: Ring[T], vec: VecOp[Idx, Unt]) { private[this] val blas = new Blas1(tring, vec) - import blas._ + import blas.* def vmult(vout: OVec[Idx, T, Unt], v1: Vec[Idx, T], v2: Vec[Idx, T]): Unt = vout := v1 `*.` v2 override def toString(): String = s"Vmult($tring, $vec)" } diff --git a/tests/run-staging/staged-streams_1.scala b/tests/run-staging/staged-streams_1.scala index 218918776a4c..3018f85aaf21 100644 --- a/tests/run-staging/staged-streams_1.scala +++ b/tests/run-staging/staged-streams_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* import language.experimental.namedTypeArguments /** @@ -65,7 +65,7 @@ object Test { case AtMost1 case Many } - import Cardinality._ + import Cardinality.* trait StagedStream[A] case class Linear[A](producer: Producer[A]) extends StagedStream[A] diff --git a/tests/run-staging/staged-tuples/StagedTuple.scala b/tests/run-staging/staged-tuples/StagedTuple.scala index 1a1f10b47eea..bbc6471172aa 100644 --- a/tests/run-staging/staged-tuples/StagedTuple.scala +++ b/tests/run-staging/staged-tuples/StagedTuple.scala @@ -1,6 +1,6 @@ package scala.internal -import scala.quoted._ +import scala.quoted.* import scala.runtime.TupleXXL diff --git a/tests/run-staging/staged-tuples/Test.scala b/tests/run-staging/staged-tuples/Test.scala index eff7e9f848ed..034cd57858c2 100644 --- a/tests/run-staging/staged-tuples/Test.scala +++ b/tests/run-staging/staged-tuples/Test.scala @@ -1,5 +1,5 @@ import scala.quoted.staging.run -import scala.internal.StagedTuple._ +import scala.internal.StagedTuple.* object Test { diff --git a/tests/run-staging/tasty-extractors-constants-2/quoted_1.scala b/tests/run-staging/tasty-extractors-constants-2/quoted_1.scala index d14a0490d6f4..a881a524c52e 100644 --- a/tests/run-staging/tasty-extractors-constants-2/quoted_1.scala +++ b/tests/run-staging/tasty-extractors-constants-2/quoted_1.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Macros { diff --git a/tests/run-staging/unliftables.scala b/tests/run-staging/unliftables.scala index b0f6bd4e51ec..763f5b55aab8 100644 --- a/tests/run-staging/unliftables.scala +++ b/tests/run-staging/unliftables.scala @@ -1,5 +1,5 @@ -import scala.quoted._ -import scala.quoted.staging._ +import scala.quoted.* +import scala.quoted.staging.* object Test { given Compiler = Compiler.make(getClass.getClassLoader) def main(args: Array[String]): Unit = withQuotes { diff --git a/tests/run-with-compiler/intmaptest.scala b/tests/run-with-compiler/intmaptest.scala index c12cb03e979d..b9cefbcce0c9 100644 --- a/tests/run-with-compiler/intmaptest.scala +++ b/tests/run-with-compiler/intmaptest.scala @@ -34,7 +34,7 @@ object Generator: val nums: Generator[Integer] = range(NumLimit).map(Integer(_)) @main def Test = - import Generator._ + import Generator.* val map1 = dotty.tools.dotc.util.IntMap[Integer]() val map2 = scala.collection.mutable.HashMap[Integer, Integer]() diff --git a/tests/run-with-compiler/maptest.scala b/tests/run-with-compiler/maptest.scala index 9a4b42981d94..f22955b7ac50 100644 --- a/tests/run-with-compiler/maptest.scala +++ b/tests/run-with-compiler/maptest.scala @@ -34,7 +34,7 @@ object Generator: val nums: Generator[Integer] = range(NumLimit).map(Integer(_)) @main def Test = - import Generator._ + import Generator.* val map1 = dotty.tools.dotc.util.HashMap[Integer, Integer]() val map2 = scala.collection.mutable.HashMap[Integer, Integer]() diff --git a/tests/run-with-compiler/settest.scala b/tests/run-with-compiler/settest.scala index 3a725990b840..5a4066aac54f 100644 --- a/tests/run-with-compiler/settest.scala +++ b/tests/run-with-compiler/settest.scala @@ -34,7 +34,7 @@ object Generator: val nums: Generator[Integer] = range(NumLimit).map(Integer(_)) @main def Test = - import Generator._ + import Generator.* val set1 = dotty.tools.dotc.util.HashSet[Int]() val set2 = scala.collection.mutable.HashSet[Int]() diff --git a/tests/run/CollectionTests.scala b/tests/run/CollectionTests.scala index cba6725d676f..6ecc30f78aef 100644 --- a/tests/run/CollectionTests.scala +++ b/tests/run/CollectionTests.scala @@ -1,4 +1,4 @@ -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag /** A strawman architecture for new collections. It contains some @@ -522,7 +522,7 @@ object CollectionStrawMan5 { } object Test { - import CollectionStrawMan5._ + import CollectionStrawMan5.* def seqOps(xs: Seq[Int]) = { val x1 = xs.foldLeft("")(_ + _) diff --git a/tests/run/ConfManagement.scala b/tests/run/ConfManagement.scala index f73445b5af08..bccff0d7c822 100644 --- a/tests/run/ConfManagement.scala +++ b/tests/run/ConfManagement.scala @@ -26,7 +26,7 @@ object ConfManagement: end Conference end ConfManagement -import ConfManagement._ +import ConfManagement.* val Smith = Person("Smith") val Peters = Person("Peters") diff --git a/tests/run/LazyValsLongs.scala b/tests/run/LazyValsLongs.scala index 0a9a963c1c4a..d4f855cac06f 100644 --- a/tests/run/LazyValsLongs.scala +++ b/tests/run/LazyValsLongs.scala @@ -22,7 +22,7 @@ class I { object Test { def main(args: Array[String]): Unit = { val c = new I - import c._ + import c.* val l1 = List(A1, A2, A3, diff --git a/tests/run/Meter.scala b/tests/run/Meter.scala index 5fe82a87e964..3b92cbe773bf 100644 --- a/tests/run/Meter.scala +++ b/tests/run/Meter.scala @@ -46,8 +46,8 @@ package b { protected def proprint = Console.print("<<<") } } -import a._ -import _root_.b._ +import a.* +import _root_.b.* object Test extends App { { diff --git a/tests/run/MeterCaseClass.scala b/tests/run/MeterCaseClass.scala index 4bc29cf8161a..75790f08d5c6 100644 --- a/tests/run/MeterCaseClass.scala +++ b/tests/run/MeterCaseClass.scala @@ -43,8 +43,8 @@ package b { protected def proprint = Console.print("<<<") } } -import a._ -import _root_.b._ +import a.* +import _root_.b.* object Test extends App { { diff --git a/tests/run/Pouring2.scala b/tests/run/Pouring2.scala index d0d5241431da..bce2b961ab47 100644 --- a/tests/run/Pouring2.scala +++ b/tests/run/Pouring2.scala @@ -3,7 +3,7 @@ class Pouring(capacity: Vector[Int]) { type Content = Vector[Int] sealed trait Move { - import Move._ + import Move.* def apply(content: Content): Content = this match { case Empty(g) => content.updated(g, 0) case Fill(g) => content.updated(g, capacity(g)) diff --git a/tests/run/ReplacementMatching.scala b/tests/run/ReplacementMatching.scala index d8880568e897..846f1c0a0966 100644 --- a/tests/run/ReplacementMatching.scala +++ b/tests/run/ReplacementMatching.scala @@ -1,7 +1,7 @@ -import util.matching._ +import util.matching.* diff --git a/tests/run/Signals.scala b/tests/run/Signals.scala index 1246896e940b..bf5232bcd2d4 100644 --- a/tests/run/Signals.scala +++ b/tests/run/Signals.scala @@ -1,5 +1,5 @@ -import annotation.unchecked._ +import annotation.unchecked.* import compiletime.uninitialized package frp: @@ -38,7 +38,7 @@ package frp: end Var end frp -import frp._ +import frp.* class BankAccount: def balance: Signal[Int] = myBalance diff --git a/tests/run/Signals1.scala b/tests/run/Signals1.scala index cc83d4730152..78b7b12d8d10 100644 --- a/tests/run/Signals1.scala +++ b/tests/run/Signals1.scala @@ -1,5 +1,5 @@ -import annotation.unchecked._ +import annotation.unchecked.* package frp: trait Signal[+T]: @@ -50,7 +50,7 @@ package frp: end Signal end frp -import frp._ +import frp.* class BankAccount: def balance: Signal[Int] = myBalance diff --git a/tests/run/byname-implicits-17.scala b/tests/run/byname-implicits-17.scala index 676f7fe82c8d..cf93a32dfa80 100644 --- a/tests/run/byname-implicits-17.scala +++ b/tests/run/byname-implicits-17.scala @@ -70,7 +70,7 @@ object Show { } object Test extends App { - import ListInstances._ + import ListInstances.* val sl = Show[List[Int]] assert(sl.show(List(1, 2, 3)) == "Left((1, (Left((2, (Left((3, (Right(Left(())), ()), ()), ())") } diff --git a/tests/run/case-class-serializable.scala b/tests/run/case-class-serializable.scala index 10fc28a6fcab..abb68cdfa621 100644 --- a/tests/run/case-class-serializable.scala +++ b/tests/run/case-class-serializable.scala @@ -10,7 +10,7 @@ object Test { // From https://github.com/scala/scala/pull/5278 object SerDes { - import java.io._ + import java.io.* def assertNotSerializable(a: AnyRef): Unit = { try { diff --git a/tests/run/cochis-example.scala b/tests/run/cochis-example.scala index 446f52e59c3e..93ce9323d2f7 100644 --- a/tests/run/cochis-example.scala +++ b/tests/run/cochis-example.scala @@ -1,5 +1,5 @@ -import Predef.{assert, $conforms => _} +import Predef.{assert, $conforms as _} trait A { given id[X]: (X => X) = x => x def trans[X](x: X)(using f: X => X) = f(x) // (2) diff --git a/tests/run/cochis.scala b/tests/run/cochis.scala index 07037432965c..d0f782937afb 100644 --- a/tests/run/cochis.scala +++ b/tests/run/cochis.scala @@ -1,4 +1,4 @@ -import Predef.{$conforms => _, _} +import Predef.{$conforms as _, *} trait A { diff --git a/tests/run/collections.scala b/tests/run/collections.scala index 516d3e038601..ceb169b398af 100644 --- a/tests/run/collections.scala +++ b/tests/run/collections.scala @@ -1,4 +1,4 @@ -import scala.collection._ +import scala.collection.* import scala.language.postfixOps object Test extends App { diff --git a/tests/run/colltest.scala b/tests/run/colltest.scala index 22404f0e9ed5..9114b0bc6df0 100644 --- a/tests/run/colltest.scala +++ b/tests/run/colltest.scala @@ -1,4 +1,4 @@ -import collection.mutable._ +import collection.mutable.* class TestSet(s0: Set[Int], s1: Set[Int]) { val Iterations = 10 val Range = 100000 diff --git a/tests/run/colltest1.scala b/tests/run/colltest1.scala index 4248e3d99c96..4de99dbcd5dc 100644 --- a/tests/run/colltest1.scala +++ b/tests/run/colltest1.scala @@ -1,7 +1,7 @@ /* * filter: inliner warnings; re-run with */ -import scala.collection._ +import scala.collection.* import scala.language.postfixOps object Test extends App { diff --git a/tests/run/colltest5/CollectionStrawMan5_1.scala b/tests/run/colltest5/CollectionStrawMan5_1.scala index 2ab82377d363..e480b7e8c088 100644 --- a/tests/run/colltest5/CollectionStrawMan5_1.scala +++ b/tests/run/colltest5/CollectionStrawMan5_1.scala @@ -1,7 +1,7 @@ package colltest5 package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec diff --git a/tests/run/colltest5/CollectionTests_2.scala b/tests/run/colltest5/CollectionTests_2.scala index 1a0bf37acb00..9e2a55e8306a 100644 --- a/tests/run/colltest5/CollectionTests_2.scala +++ b/tests/run/colltest5/CollectionTests_2.scala @@ -1,9 +1,9 @@ -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag object Test { - import colltest5.strawman.collections._ - import CollectionStrawMan5._ + import colltest5.strawman.collections.* + import CollectionStrawMan5.* def seqOps(xs: Seq[Int]) = { val x1 = xs.foldLeft("")(_ + _) diff --git a/tests/run/colltest6/CollectionStrawMan6_1.scala b/tests/run/colltest6/CollectionStrawMan6_1.scala index 91f77f553cce..bed5c476b96d 100644 --- a/tests/run/colltest6/CollectionStrawMan6_1.scala +++ b/tests/run/colltest6/CollectionStrawMan6_1.scala @@ -1,14 +1,14 @@ package colltest6 package strawman.collections -import Predef.{augmentString => _, wrapString => _, _} +import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec import compiletime.uninitialized class LowPriority { - import CollectionStrawMan6._ + import CollectionStrawMan6.* /** Convert array to iterable via view. Lower priority than ArrayOps */ implicit def arrayToView[T](xs: Array[T]): ArrayView[T] = new ArrayView[T](xs) diff --git a/tests/run/colltest6/CollectionTests_2.scala b/tests/run/colltest6/CollectionTests_2.scala index 124a526b4f0f..e41392842cf5 100644 --- a/tests/run/colltest6/CollectionTests_2.scala +++ b/tests/run/colltest6/CollectionTests_2.scala @@ -1,9 +1,9 @@ -import Predef.{augmentString => _, wrapString => _, intArrayOps => _, booleanArrayOps => _, genericArrayOps => _, refArrayOps => _, wrapIntArray => _, wrapBooleanArray => _, wrapRefArray => _, genericWrapArray => _, _} +import Predef.{augmentString as _, wrapString as _, intArrayOps as _, booleanArrayOps as _, genericArrayOps as _, refArrayOps as _, wrapIntArray as _, wrapBooleanArray as _, wrapRefArray as _, genericWrapArray as _, *} import scala.reflect.ClassTag object Test { - import colltest6.strawman.collections._ - import CollectionStrawMan6._ + import colltest6.strawman.collections.* + import CollectionStrawMan6.* def seqOps(xs: Seq[Int]) = { val x1 = xs.foldLeft("")(_ + _) diff --git a/tests/run/config.scala b/tests/run/config.scala index 8476ab673fc4..7f4cf6f23c88 100644 --- a/tests/run/config.scala +++ b/tests/run/config.scala @@ -6,8 +6,8 @@ case class Config(name: String, age: Int) object Imperative { - import Configs._ - import Exceptions._ + import Configs.* + import Exceptions.* // Algebraic Effects @@ -62,8 +62,8 @@ object Exceptions { } object Test extends App { - import Configs._ - import Exceptions._ + import Configs.* + import Exceptions.* def readName: Configured[Possibly[Name]] = { val parts = config.name.split(" ") @@ -117,9 +117,9 @@ object OptionTest extends App { } object FancyStuff { - import Configs._ - import Exceptions._ - import Test._ + import Configs.* + import Exceptions.* + import Test.* type PC[T] = Possibly[Configured[T]] diff --git a/tests/run/curried-mirror.scala b/tests/run/curried-mirror.scala index 9655160ef89a..84c544c7318b 100644 --- a/tests/run/curried-mirror.scala +++ b/tests/run/curried-mirror.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* object Test extends App { case class Prod0(i: Int) diff --git a/tests/run/deadlock.scala b/tests/run/deadlock.scala index 2cc1d883e3ed..bc4a933dc238 100644 --- a/tests/run/deadlock.scala +++ b/tests/run/deadlock.scala @@ -1,6 +1,6 @@ // from https://github.com/rickynils/scalacheck/issues/290 -import scala.concurrent._ -import scala.concurrent.duration._ +import scala.concurrent.* +import scala.concurrent.duration.* import java.util.concurrent.Executors object Test { diff --git a/tests/run/defunctionalized.scala b/tests/run/defunctionalized.scala index aa236b8d22fb..6c1b749e40b8 100644 --- a/tests/run/defunctionalized.scala +++ b/tests/run/defunctionalized.scala @@ -18,7 +18,7 @@ def filter(f: Filter, elems: List[Int]): List[Int] = elems match val xs = List(1, 2, 3, 4, 5) -import Filter._ +import Filter.* @main def Test = println(filter(IsOdd , xs)) diff --git a/tests/run/derived-specificity.scala b/tests/run/derived-specificity.scala index 1dc0eda43da5..1518fe0e01fe 100644 --- a/tests/run/derived-specificity.scala +++ b/tests/run/derived-specificity.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* object Test extends App { case class Foo() derives Bar, Baz @@ -20,9 +20,9 @@ object Test extends App { } val bar = implicitly[Bar[Foo]] - assert(bar.id == "Bar.derived") + assert(bar.id == "Bar.derived") val baz = implicitly[Baz[Foo]] - assert(baz.id == "Baz.derived") + assert(baz.id == "Baz.derived") } diff --git a/tests/run/deriving.scala b/tests/run/deriving.scala index 87bd1e088388..b995241c58dd 100644 --- a/tests/run/deriving.scala +++ b/tests/run/deriving.scala @@ -8,7 +8,7 @@ sealed trait U // U MUST NOT have a companion here! case class C() extends U object Test extends App { - import deriving._ + import deriving.* case class AA[X >: Null <: AnyRef](x: X, y: X, z: String) diff --git a/tests/run/duration-coarsest.scala b/tests/run/duration-coarsest.scala index 21d35c9b2e3f..ab2a18e1099e 100644 --- a/tests/run/duration-coarsest.scala +++ b/tests/run/duration-coarsest.scala @@ -1,4 +1,4 @@ -import scala.concurrent.duration._ +import scala.concurrent.duration.* import scala.language.postfixOps object Test extends App { diff --git a/tests/run/elidable-noflags.scala b/tests/run/elidable-noflags.scala index 1b9c5118bb3d..ad955af65ecb 100644 --- a/tests/run/elidable-noflags.scala +++ b/tests/run/elidable-noflags.scala @@ -1,5 +1,5 @@ -import annotation._ -import elidable._ +import annotation.* +import elidable.* object Test { @elidable(FINEST) def f1() = println("Good for me, I was not elided.") diff --git a/tests/run/enum-Color.scala b/tests/run/enum-Color.scala index b00493dc00b9..3d968a251aa8 100644 --- a/tests/run/enum-Color.scala +++ b/tests/run/enum-Color.scala @@ -8,7 +8,7 @@ object Test { for (color <- Color.values) { println(s"$color: ${color.toString}") assert(Color.valueOf(color.toString) eq color) - import Color._ + import Color.* color match { case Red | Green | Blue => } diff --git a/tests/run/enum-HList.scala b/tests/run/enum-HList.scala index c019cb6cc78c..476b4a3284af 100644 --- a/tests/run/enum-HList.scala +++ b/tests/run/enum-HList.scala @@ -4,7 +4,7 @@ enum HLst { } object Test { - import HLst._ + import HLst.* def length(hl: HLst): Int = hl match { case HCons(_, tl) => 1 + length(tl) case HNil => 0 diff --git a/tests/run/enum-List1.scala b/tests/run/enum-List1.scala index f3e672e53571..121ee3b16974 100644 --- a/tests/run/enum-List1.scala +++ b/tests/run/enum-List1.scala @@ -3,7 +3,7 @@ enum List[T] { case Nil() } object Test { - import List._ + import List.* val xs = Cons(1, Cons(2, Cons(3, Nil()))) def main(args: Array[String]) = println(xs) } diff --git a/tests/run/enum-List2.scala b/tests/run/enum-List2.scala index 9ceb3d278f7e..e6cbaed3839b 100644 --- a/tests/run/enum-List2.scala +++ b/tests/run/enum-List2.scala @@ -3,7 +3,7 @@ enum List[+T] { case Nil } object Test { - import List._ + import List.* val xs = Cons(1, Cons(2, Cons(3, Nil))) def main(args: Array[String]) = println(xs) } diff --git a/tests/run/enum-List2a.scala b/tests/run/enum-List2a.scala index 9ceb3d278f7e..e6cbaed3839b 100644 --- a/tests/run/enum-List2a.scala +++ b/tests/run/enum-List2a.scala @@ -3,7 +3,7 @@ enum List[+T] { case Nil } object Test { - import List._ + import List.* val xs = Cons(1, Cons(2, Cons(3, Nil))) def main(args: Array[String]) = println(xs) } diff --git a/tests/run/enum-Option.scala b/tests/run/enum-Option.scala index 5762b4089317..b1248e788103 100644 --- a/tests/run/enum-Option.scala +++ b/tests/run/enum-Option.scala @@ -12,7 +12,7 @@ object Option { } object Test { - import Option._ + import Option.* def main(args: Array[String]) = { assert(Some(None).isDefined) Option("22") match { case Option.Some(x) => assert(x == "22") } diff --git a/tests/run/enum-Option1.scala b/tests/run/enum-Option1.scala index 407ece47a025..04181ec58a14 100644 --- a/tests/run/enum-Option1.scala +++ b/tests/run/enum-Option1.scala @@ -12,7 +12,7 @@ object Option1 { } object Test { - import Option1._ + import Option1.* def main(args: Array[String]) = { assert(Some1(None1).isDefined) Option1("22") match { case Option1.Some1(x) => assert(x == "22") } diff --git a/tests/run/enum-Tree.scala b/tests/run/enum-Tree.scala index 77f08c997bad..b2a0591046f8 100644 --- a/tests/run/enum-Tree.scala +++ b/tests/run/enum-Tree.scala @@ -11,7 +11,7 @@ enum Tree[T] { } object Test { - import Tree._ + import Tree.* def eval[T](e: Tree[T]): T = e match { case True => true diff --git a/tests/run/enum-nat.scala b/tests/run/enum-nat.scala index 47bddcc665cd..4367785ea754 100644 --- a/tests/run/enum-nat.scala +++ b/tests/run/enum-nat.scala @@ -1,5 +1,5 @@ -import Nat._ -import compiletime._ +import Nat.* +import compiletime.* enum Nat: case Zero diff --git a/tests/run/enum-values-order.scala b/tests/run/enum-values-order.scala index 400cdbc8aac5..dfe9c0d8f685 100644 --- a/tests/run/enum-values-order.scala +++ b/tests/run/enum-values-order.scala @@ -23,7 +23,7 @@ enum Color extends java.lang.Enum[Color]: val labels = Seq("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z") def testLatin1() = - import LatinAlphabet._ + import LatinAlphabet.* val ordered = Seq(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) assert(ordered sameElements LatinAlphabet.values) @@ -31,7 +31,7 @@ enum Color extends java.lang.Enum[Color]: assert(labels == ordered.map(_.productPrefix)) def testLatin2() = - import LatinAlphabet2._ + import LatinAlphabet2.* val ordered = Seq(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) assert(ordered sameElements LatinAlphabet2.values) @@ -39,7 +39,7 @@ enum Color extends java.lang.Enum[Color]: assert(labels == ordered.map(_.name)) def testLatin3() = - import LatinAlphabet3._ + import LatinAlphabet3.* val ordered = Seq(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) assert(ordered sameElements LatinAlphabet3.values) @@ -53,7 +53,7 @@ enum Color extends java.lang.Enum[Color]: end testLatin def testColor() = - import Color._ + import Color.* val ordered = Seq(Red, Green, Blue, Aqua, Grey, Black, White, Emerald, Brown) val ordinals = Seq(0, 1, 2, 3, 4, 5, 6, 7, 8) val labels = Seq("Red", "Green", "Blue", "Aqua", "Grey", "Black", "White", "Emerald", "Brown") diff --git a/tests/run/enum-values.scala b/tests/run/enum-values.scala index a7b838ba73cd..b6ac3d2f9bce 100644 --- a/tests/run/enum-values.scala +++ b/tests/run/enum-values.scala @@ -32,7 +32,7 @@ enum ClassOnly: // this should still generate the `ordinal` and `fromOrdinal` co case BranchProd(i: Int) @main def Test: Unit = - import Color._, Suits._, Tag._, Expr._, ListLike._, TypeCtorsK._, MixedParams._, ClassOnly._ + import Color._, Suits._, Tag._, Expr._, ListLike._, TypeCtorsK._, MixedParams._, ClassOnly.* type FromOrdinal[T] = { def fromOrdinal(ordinal: Int): T diff --git a/tests/run/enums-precise.scala b/tests/run/enums-precise.scala index 1ae98ca6664f..380c1e142ee5 100644 --- a/tests/run/enums-precise.scala +++ b/tests/run/enums-precise.scala @@ -8,8 +8,8 @@ enum Ast: case Ident(name: String) case Apply(fn: Ast, args: NonEmptyList[Ast]) -import NonEmptyList._ -import Ast._ +import NonEmptyList.* +import Ast.* // This example showcases the widening when inferring enum case types. // With scala 2 case class hierarchies, if One.apply(1) returns One[Int] and Many.apply(2, One(3)) returns Many[Int] diff --git a/tests/run/enums-serialization-compat.scala b/tests/run/enums-serialization-compat.scala index 940e726c05a0..736b82074af3 100644 --- a/tests/run/enums-serialization-compat.scala +++ b/tests/run/enums-serialization-compat.scala @@ -1,4 +1,4 @@ -import java.io._ +import java.io.* import scala.util.Using enum JColor extends java.lang.Enum[JColor]: diff --git a/tests/run/exports.scala b/tests/run/exports.scala index f68312ca54e2..02862f2d0a39 100644 --- a/tests/run/exports.scala +++ b/tests/run/exports.scala @@ -31,7 +31,7 @@ object Test extends App { Copier.config2 def test() = { - import Copier._ + import Copier.* print() scanIt() val x = config2 diff --git a/tests/run/extension-override.scala b/tests/run/extension-override.scala index 00246f611391..bd473547bf8f 100644 --- a/tests/run/extension-override.scala +++ b/tests/run/extension-override.scala @@ -7,6 +7,6 @@ object B extends A: override def len: Int = s.length + 1 @main def Test = - import B._ + import B.* assert("abc".len == 4) diff --git a/tests/run/extmethod-overload.scala b/tests/run/extmethod-overload.scala index 64cddbfa2e7d..c13a2a99aaa8 100644 --- a/tests/run/extmethod-overload.scala +++ b/tests/run/extmethod-overload.scala @@ -41,7 +41,7 @@ object Test extends App { // Test with imported extension methods object test2 { - import test1._ + import test1.* assert((1 |+| 2) == 3) assert((1 |+| "2") == 2) @@ -102,7 +102,7 @@ object Test extends App { def yy (y: Int) = x - y } - import D._ + import D.* assert((1 yy 2) == 3) // imported extension method takes precedence trait Rectangle { diff --git a/tests/run/extmethods2.scala b/tests/run/extmethods2.scala index 10b5640c4901..f876b00a9974 100644 --- a/tests/run/extmethods2.scala +++ b/tests/run/extmethods2.scala @@ -30,7 +30,7 @@ object Test extends App { } object B { - import A._ + import A.* val xs = List(1, 2, 3) assert(xs.second == 2) assert(xs.third == 3) diff --git a/tests/run/fully-abstract-interface.scala b/tests/run/fully-abstract-interface.scala index 86156586c85d..34fa305ad229 100644 --- a/tests/run/fully-abstract-interface.scala +++ b/tests/run/fully-abstract-interface.scala @@ -12,7 +12,7 @@ object Test { } def testInterface(arithmetic: Arithmetic): Unit = { - import arithmetic._ + import arithmetic.* val const1 = Constant(1) println("underlying rep: " + const1.getClass) println(const1.eval) diff --git a/tests/run/fully-abstract-nat-1.scala b/tests/run/fully-abstract-nat-1.scala index 2be9a62bb594..5c829c295484 100644 --- a/tests/run/fully-abstract-nat-1.scala +++ b/tests/run/fully-abstract-nat-1.scala @@ -9,7 +9,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero() val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat-2.scala b/tests/run/fully-abstract-nat-2.scala index 30e34ba9b8ac..82ffbe535e6b 100644 --- a/tests/run/fully-abstract-nat-2.scala +++ b/tests/run/fully-abstract-nat-2.scala @@ -11,7 +11,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero() val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat-3.scala b/tests/run/fully-abstract-nat-3.scala index d4b4a37d2810..78cfedafcea1 100644 --- a/tests/run/fully-abstract-nat-3.scala +++ b/tests/run/fully-abstract-nat-3.scala @@ -9,7 +9,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero() val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat-4.scala b/tests/run/fully-abstract-nat-4.scala index a354c0121357..8af339883f4f 100644 --- a/tests/run/fully-abstract-nat-4.scala +++ b/tests/run/fully-abstract-nat-4.scala @@ -9,7 +9,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero() val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat-5.scala b/tests/run/fully-abstract-nat-5.scala index cb6142ff9016..7c4b67dd2989 100644 --- a/tests/run/fully-abstract-nat-5.scala +++ b/tests/run/fully-abstract-nat-5.scala @@ -9,7 +9,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero() val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat-6.scala b/tests/run/fully-abstract-nat-6.scala index 14bff32961ba..4693026692a7 100644 --- a/tests/run/fully-abstract-nat-6.scala +++ b/tests/run/fully-abstract-nat-6.scala @@ -9,7 +9,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero() val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat-7.scala b/tests/run/fully-abstract-nat-7.scala index 50ffdaa69062..98a9649af5a6 100644 --- a/tests/run/fully-abstract-nat-7.scala +++ b/tests/run/fully-abstract-nat-7.scala @@ -9,7 +9,7 @@ object Test { } def test(numbers: Numbers) = { - import numbers._ + import numbers.* val zero: Nat = Zero val one: Nat = Succ(zero) diff --git a/tests/run/fully-abstract-nat.scala b/tests/run/fully-abstract-nat.scala index 16106902d3da..2073d03b7313 100644 --- a/tests/run/fully-abstract-nat.scala +++ b/tests/run/fully-abstract-nat.scala @@ -18,7 +18,7 @@ object Test { println() { - import UnboundedIntImplementation._ + import UnboundedIntImplementation.* val large = (BigInt(1) << 100).asInstanceOf[Succ] large match { case Zero() => println("test fail") @@ -30,7 +30,7 @@ object Test { } def testInterface(numbers: Numbers): Unit = { - import numbers._ + import numbers.* val zero = Zero() println("underlying rep: " + zero) diff --git a/tests/run/future-flatmap-exec-count.scala b/tests/run/future-flatmap-exec-count.scala index 0c6f69f853b3..a6c47ebfb876 100644 --- a/tests/run/future-flatmap-exec-count.scala +++ b/tests/run/future-flatmap-exec-count.scala @@ -1,4 +1,4 @@ -import scala.concurrent._ +import scala.concurrent.* import java.util.concurrent.atomic.AtomicInteger object Test { diff --git a/tests/run/generic/Color.scala b/tests/run/generic/Color.scala index 7db703a15280..9bec97b8dd00 100644 --- a/tests/run/generic/Color.scala +++ b/tests/run/generic/Color.scala @@ -1,6 +1,6 @@ package generic -import Shapes._ +import Shapes.* /** enum Color { * case Red diff --git a/tests/run/generic/List.scala b/tests/run/generic/List.scala index 9e3bcf13964c..f2849db7fe84 100644 --- a/tests/run/generic/List.scala +++ b/tests/run/generic/List.scala @@ -1,6 +1,6 @@ package generic -import Shapes._ +import Shapes.* /** enum List[T] { * case Cons(x: T, xs: List[T]) diff --git a/tests/run/generic/SearchResult.scala b/tests/run/generic/SearchResult.scala index 3dbfe9ed4fe2..b0f468c93baa 100644 --- a/tests/run/generic/SearchResult.scala +++ b/tests/run/generic/SearchResult.scala @@ -1,6 +1,6 @@ package generic -import Shapes._ +import Shapes.* /** enum SearchResult { * case Success(result: Color) diff --git a/tests/run/generic/Serialization.scala b/tests/run/generic/Serialization.scala index 2aaceb9c6d47..4912c96956b4 100644 --- a/tests/run/generic/Serialization.scala +++ b/tests/run/generic/Serialization.scala @@ -3,7 +3,7 @@ package generic import java.io.{DataInputStream,DataOutputStream} import scala.collection.IterableFactory import scala.collection.mutable.ArrayBuffer -import Shapes._ +import Shapes.* object Serialization { diff --git a/tests/run/generic/Test.scala b/tests/run/generic/Test.scala index 06fdc3b0dafd..ebf37938c998 100644 --- a/tests/run/generic/Test.scala +++ b/tests/run/generic/Test.scala @@ -1,12 +1,12 @@ -import generic._ -import Tree._ -import List._ -import java.io._ -import Shapes._ -import SearchResult._ +import generic.* +import Tree.* +import List.* +import java.io.* +import Shapes.* +import SearchResult.* object Test { - import Serialization._ + import Serialization.* private var lCount, tCount, sCount = 0 diff --git a/tests/run/generic/Tree.scala b/tests/run/generic/Tree.scala index dddee59beb7e..19eca23b32d7 100644 --- a/tests/run/generic/Tree.scala +++ b/tests/run/generic/Tree.scala @@ -1,6 +1,6 @@ package generic -import Shapes._ +import Shapes.* /** enum Tree[T] { * case True extends Tree[Boolean] diff --git a/tests/run/hmap-covariant.scala b/tests/run/hmap-covariant.scala index c4c426e81a1d..1d1bace3193a 100644 --- a/tests/run/hmap-covariant.scala +++ b/tests/run/hmap-covariant.scala @@ -69,7 +69,7 @@ object syntax { object Test { def main(args: Array[String]): Unit = { - import syntax.hmap._ + import syntax.hmap.* val map1 = TCons(HEntry[K = "name"]("foo"), diff --git a/tests/run/hmap.scala b/tests/run/hmap.scala index 099cd127a116..e91e660ae464 100644 --- a/tests/run/hmap.scala +++ b/tests/run/hmap.scala @@ -70,7 +70,7 @@ object syntax { object Test { def main(args: Array[String]): Unit = { - import syntax.hmap._ + import syntax.hmap.* val map1 = TCons(HEntry[K = "name"]("foo"), diff --git a/tests/run/i10082.scala b/tests/run/i10082.scala index 299083da3567..2ce4950a2de8 100644 --- a/tests/run/i10082.scala +++ b/tests/run/i10082.scala @@ -5,7 +5,7 @@ object Kotlin: def it[T](using ctx: Ctx[T]) = ctx.x -import Kotlin._ +import Kotlin.* @main def Test = val res = List(1).map(fun(it + 1)) diff --git a/tests/run/i10511.scala b/tests/run/i10511.scala index f1548ea7482a..2ba7e114fd4c 100644 --- a/tests/run/i10511.scala +++ b/tests/run/i10511.scala @@ -7,7 +7,7 @@ enum Bool { } -import Bool._ +import Bool.* type Not[B <: Bool] = B match { case True.type => False.type diff --git a/tests/run/i10724.scala b/tests/run/i10724.scala index 7e0791933a8d..40566c63d403 100644 --- a/tests/run/i10724.scala +++ b/tests/run/i10724.scala @@ -8,7 +8,7 @@ object Exporter { export Exportee._ } -import Exporter._ +import Exporter.* @main def Test = println(foo("a", "b", "c")) diff --git a/tests/run/i10884/Test_2.scala b/tests/run/i10884/Test_2.scala index 72e7fafa9674..84111522b2ca 100644 --- a/tests/run/i10884/Test_2.scala +++ b/tests/run/i10884/Test_2.scala @@ -1,7 +1,7 @@ object Exporter: export JavaExporter_1._ -import Exporter._ +import Exporter.* @main def Test = println(varargExample("a", "b", "c")) diff --git a/tests/run/i2360.scala b/tests/run/i2360.scala index d950d1c2d3dd..2b33b5295573 100644 --- a/tests/run/i2360.scala +++ b/tests/run/i2360.scala @@ -1,7 +1,7 @@ object Test { def main(args: Array[String]): Unit = { - import Foo._ + import Foo.* println(foo) } } diff --git a/tests/run/i2396c.scala b/tests/run/i2396c.scala index 65cd6e71d211..be10c9fba832 100644 --- a/tests/run/i2396c.scala +++ b/tests/run/i2396c.scala @@ -1,5 +1,5 @@ class Bees { - import Test._ + import Test.* def f: PartialFunction[Bee, Unit] = { case Test.Bee(_) => "" diff --git a/tests/run/i2939.scala b/tests/run/i2939.scala index f032dc06aaf1..9abdc6da33fc 100644 --- a/tests/run/i2939.scala +++ b/tests/run/i2939.scala @@ -1,4 +1,4 @@ -import scala.collection.mutable._ +import scala.collection.mutable.* class Tag(val name: String, val buffer: Buffer[Tag] = ArrayBuffer()) { def space(n: Int = 0): String = { diff --git a/tests/run/i4446.scala b/tests/run/i4446.scala index 080153c3598a..2eb6253105b2 100644 --- a/tests/run/i4446.scala +++ b/tests/run/i4446.scala @@ -4,7 +4,7 @@ class Foo { object Test { def serializeDeserialize[T <: AnyRef](obj: T): T = { - import java.io._ + import java.io.* val buffer = new ByteArrayOutputStream val out = new ObjectOutputStream(buffer) out.writeObject(obj) diff --git a/tests/run/i4754.scala b/tests/run/i4754.scala index 0907880e6499..f0f3fd36dde3 100644 --- a/tests/run/i4754.scala +++ b/tests/run/i4754.scala @@ -5,7 +5,7 @@ object Foo { } class Foo { - import Foo._ + import Foo.* inline def foo = x + Foo.x + y + Foo.y + z + Foo.z } diff --git a/tests/run/i4947c.scala b/tests/run/i4947c.scala index bd096f6b7202..064db6647f8a 100644 --- a/tests/run/i4947c.scala +++ b/tests/run/i4947c.scala @@ -12,7 +12,7 @@ object Foo { } object Test { - import Foo._ + import Foo.* def main(args: Array[String]): Unit = { track { printStack("main1") diff --git a/tests/run/i4961.scala b/tests/run/i4961.scala index c49056e88925..eae3cc50f331 100644 --- a/tests/run/i4961.scala +++ b/tests/run/i4961.scala @@ -12,8 +12,8 @@ enum Cat extends Animal { } object Test { - import Dog._ - import Cat._ + import Dog.* + import Cat.* def main(args: Array[String]): Unit = { val values = List( diff --git a/tests/run/i5455.scala b/tests/run/i5455.scala index 5e242e55a13f..4a159e049cd5 100644 --- a/tests/run/i5455.scala +++ b/tests/run/i5455.scala @@ -18,7 +18,7 @@ object Library { } object Test extends App { - import Library._ + import Library.* val x = Nat(3) val y = Nat(4) diff --git a/tests/run/i5527.scala b/tests/run/i5527.scala index bd3f4b37e4d3..d79e64182f98 100644 --- a/tests/run/i5527.scala +++ b/tests/run/i5527.scala @@ -22,7 +22,7 @@ object Library { } object Test extends App { - import Library._ + import Library.* //import Library.Set.setContravariant if this is imported the program will run correctly val F = implicitly[Contravariant[Set]] diff --git a/tests/run/i5823.scala b/tests/run/i5823.scala index 445eed10a89e..bb854ada3c12 100644 --- a/tests/run/i5823.scala +++ b/tests/run/i5823.scala @@ -13,7 +13,7 @@ object Foo { def foo(a: A|Null): Unit = { println("foo(A) called") } - + def foo(b: B|Null): Unit = { println("foo(B) called") } @@ -45,7 +45,7 @@ object Foo { object Test { def main(args: Array[String]): Unit = { - import Foo._ + import Foo.* foo(new A) foo(new B) foo(new C) diff --git a/tests/run/i7212/CompatVargs.scala b/tests/run/i7212/CompatVargs.scala index 1ad60229b8d8..337f40171c44 100644 --- a/tests/run/i7212/CompatVargs.scala +++ b/tests/run/i7212/CompatVargs.scala @@ -1,4 +1,4 @@ -import scala.annotation._ +import scala.annotation.* class CompatVargs { @varargs diff --git a/tests/run/i7843.scala b/tests/run/i7843.scala index 44ec1cf9b3d9..12bcbe4bf868 100644 --- a/tests/run/i7843.scala +++ b/tests/run/i7843.scala @@ -1,4 +1,4 @@ -import scala.concurrent._, duration._ +import scala.concurrent._, duration.* object Test { implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global diff --git a/tests/run/i7960.scala b/tests/run/i7960.scala index 93cf38d4d2af..423b6111d8b1 100644 --- a/tests/run/i7960.scala +++ b/tests/run/i7960.scala @@ -1,5 +1,5 @@ import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent.duration._ +import scala.concurrent.duration.* import scala.concurrent.{Await, Future} class A() { diff --git a/tests/run/i8033.scala b/tests/run/i8033.scala index b047ac552439..2452415752c9 100644 --- a/tests/run/i8033.scala +++ b/tests/run/i8033.scala @@ -21,7 +21,7 @@ object Test { } def roundTrip[A](a: A): A = { - import java.io._ + import java.io.* val aos = new ByteArrayOutputStream() val oos = new ObjectOutputStream(aos) diff --git a/tests/run/i9011.scala b/tests/run/i9011.scala index c75871a865bb..22ab9bc1e1a6 100644 --- a/tests/run/i9011.scala +++ b/tests/run/i9011.scala @@ -2,7 +2,7 @@ enum Opt[+T] derives Eq: case Sm[T](t: T) extends Opt[T] case Nn -import scala.deriving._ +import scala.deriving.* import scala.compiletime.{erasedValue, summonInline} trait Eq[T] { @@ -50,7 +50,7 @@ object Eq { } object Test extends App { - import Opt._ + import Opt.* val eqoi = summon[Eq[Opt[Int]]] assert(eqoi.eqv(Sm(23), Sm(23))) assert(eqoi.eqv(Nn, Nn)) diff --git a/tests/run/i9473.scala b/tests/run/i9473.scala index 4fa18cab0c29..384870ea42af 100644 --- a/tests/run/i9473.scala +++ b/tests/run/i9473.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* import scala.compiletime.{erasedValue, summonInline} inline def summonAll[T <: Tuple]: List[Eq[_]] = inline erasedValue[T] match { @@ -52,7 +52,7 @@ enum Tree[T] derives Eq { @main def Test = { - import Tree._ + import Tree.* val t1 = Branch(Leaf(1), Leaf(1)) assert(summon[Eq[Tree[Int]]].eqv(t1, t1)) diff --git a/tests/run/i9881.scala b/tests/run/i9881.scala index a5786aa4d322..a172bcf8e2ec 100644 --- a/tests/run/i9881.scala +++ b/tests/run/i9881.scala @@ -1,4 +1,4 @@ -import java.io._ +import java.io.* class Config(s: String) diff --git a/tests/run/implicit-functors.scala b/tests/run/implicit-functors.scala index a37c932923d7..5ff3e926ee49 100644 --- a/tests/run/implicit-functors.scala +++ b/tests/run/implicit-functors.scala @@ -3,7 +3,7 @@ object Utils { type Const[c] = [t] =>> c } -import Utils._ +import Utils.* class Instances[F[_[_]], T[_]] diff --git a/tests/run/implicit-functors2.scala b/tests/run/implicit-functors2.scala index 8acc4c25f546..74c99f30722e 100644 --- a/tests/run/implicit-functors2.scala +++ b/tests/run/implicit-functors2.scala @@ -3,7 +3,7 @@ object Utils { type Const[c] = [t] =>> c } -import Utils._ +import Utils.* abstract class ErasedInstances { type FT } class ErasedProductInstances(override val toString: String) extends ErasedInstances diff --git a/tests/run/implicitShortcut/Test_3.scala b/tests/run/implicitShortcut/Test_3.scala index 8e61c6db3758..7e4359e2cda3 100644 --- a/tests/run/implicitShortcut/Test_3.scala +++ b/tests/run/implicitShortcut/Test_3.scala @@ -1,4 +1,4 @@ -import implicitShortcut._ +import implicitShortcut.* object Test extends App { val d = new Derived diff --git a/tests/run/implied-for.scala b/tests/run/implied-for.scala index fea851847a0f..252bac528712 100644 --- a/tests/run/implied-for.scala +++ b/tests/run/implied-for.scala @@ -13,7 +13,7 @@ object A { } object Test extends App { - import A._ + import A.* import A.{t, given B, given D[_]} val x1: B = b diff --git a/tests/run/implied-priority.scala b/tests/run/implied-priority.scala index f66937007a3d..44cd7d56504c 100644 --- a/tests/run/implied-priority.scala +++ b/tests/run/implied-priority.scala @@ -112,7 +112,7 @@ object fallback4 { def test4 = { import Impl4.given - import fallback4._ + import fallback4.* assert(withFallback[String].str == "string") // t1 is applicable assert(withFallback[Int].str == "fallback") // No applicable instances, pick the default diff --git a/tests/run/inlineAddDeserializeLambda.scala b/tests/run/inlineAddDeserializeLambda.scala index 0b97b2583ef0..40961ff9779b 100644 --- a/tests/run/inlineAddDeserializeLambda.scala +++ b/tests/run/inlineAddDeserializeLambda.scala @@ -1,7 +1,7 @@ class C { inline final def f: Int => Int = (x: Int) => x + 1 } object Test extends App { - import java.io._ + import java.io.* def serialize(obj: AnyRef): Array[Byte] = { val buffer = new ByteArrayOutputStream diff --git a/tests/run/iterator-from.scala b/tests/run/iterator-from.scala index ca2910d13005..4e1649fff7e8 100644 --- a/tests/run/iterator-from.scala +++ b/tests/run/iterator-from.scala @@ -2,8 +2,8 @@ * filter: inliner warnings */ -import scala.util.{Random => R} -import scala.collection._ +import scala.util.{Random as R} +import scala.collection.* import scala.math.Ordered object Test extends App { diff --git a/tests/run/lambda-serialization-gc.scala b/tests/run/lambda-serialization-gc.scala index 4d156c421013..48e9f8315935 100644 --- a/tests/run/lambda-serialization-gc.scala +++ b/tests/run/lambda-serialization-gc.scala @@ -1,4 +1,4 @@ -import java.io._ +import java.io.* import java.net.URLClassLoader diff --git a/tests/run/lazy-impl.scala b/tests/run/lazy-impl.scala index 43333056973c..70d2c02da3c4 100644 --- a/tests/run/lazy-impl.scala +++ b/tests/run/lazy-impl.scala @@ -89,7 +89,7 @@ * * - lazy vals of primitive types are boxed */ -import sun.misc.Unsafe._ +import sun.misc.Unsafe.* class C { def init(name: String) = { diff --git a/tests/run/lst/Lst.scala b/tests/run/lst/Lst.scala index c986425d52d5..eecd471037d4 100644 --- a/tests/run/lst/Lst.scala +++ b/tests/run/lst/Lst.scala @@ -14,7 +14,7 @@ import compiletime.uninitialized * Otherwise: an Array[Any] containing the elements */ class Lst[+T](val elems: Any) extends AnyVal { self => - import Lst._ + import Lst.* inline def locally[T](body: => T): T = body diff --git a/tests/run/nats.scala b/tests/run/nats.scala index bb0b9c85b9a8..a43edb64e219 100644 --- a/tests/run/nats.scala +++ b/tests/run/nats.scala @@ -16,7 +16,7 @@ trait Plus[X <: Nat, Y <: Nat, R <: Nat] { } object Test { - import Nat._ + import Nat.* implicit def zPlus[Y <: Nat]: Plus[Z, Y, Y] = new { def add(x: Z, y: Y): Y = y } diff --git a/tests/run/no-init-enclosing-static-objects.scala b/tests/run/no-init-enclosing-static-objects.scala index 8c5dafd71507..2ea585e33394 100644 --- a/tests/run/no-init-enclosing-static-objects.scala +++ b/tests/run/no-init-enclosing-static-objects.scala @@ -33,7 +33,7 @@ object Test { } def testThroughImport(): Unit = { - import Enclosing1._ + import Enclosing1.* println(InnerObject.foo) println(new InnerClass(5).foo) } diff --git a/tests/run/nonlocal-return.scala b/tests/run/nonlocal-return.scala index f52d86429620..4a55dc266edf 100644 --- a/tests/run/nonlocal-return.scala +++ b/tests/run/nonlocal-return.scala @@ -1,4 +1,4 @@ -import scala.util.control.NonLocalReturns._ +import scala.util.control.NonLocalReturns.* object Test { def has(xs: List[Int], elem: Int) = diff --git a/tests/run/patmatch-classtag.scala b/tests/run/patmatch-classtag.scala index 99e1ee3f05ae..a501333481a7 100644 --- a/tests/run/patmatch-classtag.scala +++ b/tests/run/patmatch-classtag.scala @@ -28,7 +28,7 @@ object Impl extends API { object Test extends App { val api: API = Impl - import api._ + import api.* val x: Any = CaseDef("123") diff --git a/tests/run/planets.scala b/tests/run/planets.scala index 2c4f31b17ca3..d6ee4b5d00ef 100644 --- a/tests/run/planets.scala +++ b/tests/run/planets.scala @@ -14,7 +14,7 @@ enum Planet(mass: Double, radius: Double) { } object Test { def main(args: Array[String]) = { - import Planet._ + import Planet.* assert(valueOf("SATURN") == SATURN) val earthWeight = 100 val mass = earthWeight/EARTH.surfaceGravity diff --git a/tests/run/poly-kinded-derives.scala b/tests/run/poly-kinded-derives.scala index 61f19cc063b2..73ad7dc1957a 100644 --- a/tests/run/poly-kinded-derives.scala +++ b/tests/run/poly-kinded-derives.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* object Test extends App { { diff --git a/tests/run/priorityQueue.scala b/tests/run/priorityQueue.scala index 56f7ac3c8ee6..41b1c241c0f8 100644 --- a/tests/run/priorityQueue.scala +++ b/tests/run/priorityQueue.scala @@ -100,7 +100,7 @@ object Test { // } // def assertPriorityDestructive[A](pq: PriorityQueue[A])(implicit ord: Ordering[A]) { - // import ord._ + // import ord.* // var prev: A = null.asInstanceOf[A] // while (pq.nonEmpty) { // val curr = pq.dequeue diff --git a/tests/run/quoted-sematics-1.scala b/tests/run/quoted-sematics-1.scala index ed2d05224d73..852772ce9428 100644 --- a/tests/run/quoted-sematics-1.scala +++ b/tests/run/quoted-sematics-1.scala @@ -1,7 +1,7 @@ -import Term._ -import Pattern._ -import Type._ +import Term.* +import Pattern.* +import Type.* type Gamma = Set[EnvVar] type Delta = Set[EnvVar] diff --git a/tests/run/range.scala b/tests/run/range.scala index ed4aeacffc09..52f599e81964 100644 --- a/tests/run/range.scala +++ b/tests/run/range.scala @@ -30,7 +30,7 @@ object Test { } case class GR[T](val x: T)(implicit val num: Integral[T]) { - import num._ + import num.* def negated = GR[T](-x) diff --git a/tests/run/rescue.scala b/tests/run/rescue.scala index a2b2e33c2cde..a1e1f3200061 100644 --- a/tests/run/rescue.scala +++ b/tests/run/rescue.scala @@ -1,5 +1,5 @@ import scala.util.control.NonFatal -import scala.util.control.NonLocalReturns._ +import scala.util.control.NonLocalReturns.* object lib { extension [T](op: => T) inline def rescue (fallback: => T) = @@ -18,7 +18,7 @@ object lib { } } -import lib._ +import lib.* @main def Test = { assert((9 / 1 rescue 1) == 9) diff --git a/tests/run/returning.scala b/tests/run/returning.scala index 5879b9e58e5d..fd190de17ee1 100644 --- a/tests/run/returning.scala +++ b/tests/run/returning.scala @@ -27,7 +27,7 @@ object NonLocalReturns { object Test extends App { - import scala.util.control.NonLocalReturns._ + import scala.util.control.NonLocalReturns.* import scala.collection.mutable.ListBuffer def has(xs: List[Int], elem: Int) = diff --git a/tests/run/scala-tests-typeChecks.scala b/tests/run/scala-tests-typeChecks.scala index be71b3880028..3593477e8662 100644 --- a/tests/run/scala-tests-typeChecks.scala +++ b/tests/run/scala-tests-typeChecks.scala @@ -1,4 +1,4 @@ -import scala.compiletime.testing._ +import scala.compiletime.testing.* object Test { diff --git a/tests/run/serialization-new.scala b/tests/run/serialization-new.scala index 92f027591831..85706c27a04d 100644 --- a/tests/run/serialization-new.scala +++ b/tests/run/serialization-new.scala @@ -26,7 +26,7 @@ object Serialize { println() } } -import Serialize._ +import Serialize.* //############################################################################ // Test classes in package "scala" @@ -44,7 +44,7 @@ object Test1_scala { type WeekDay = Value val Monday, Tuesday, Wednesday, Thusday, Friday, Saturday, Sunday = Value } - import WeekDay._, BigDecimal._, RoundingMode._ + import WeekDay._, BigDecimal._, RoundingMode.* // in alphabetic order try { diff --git a/tests/run/serialize.scala b/tests/run/serialize.scala index 8e6ded17277c..0622807bee21 100644 --- a/tests/run/serialize.scala +++ b/tests/run/serialize.scala @@ -1,6 +1,6 @@ object Test { def serializeDeserialize[T <: AnyRef](obj: T): T = { - import java.io._ + import java.io.* val buffer = new ByteArrayOutputStream val out = new ObjectOutputStream(buffer) out.writeObject(obj) diff --git a/tests/run/singleton-ops-flags.scala b/tests/run/singleton-ops-flags.scala index 8e2cda6a38c7..08f26d1faea0 100644 --- a/tests/run/singleton-ops-flags.scala +++ b/tests/run/singleton-ops-flags.scala @@ -80,6 +80,6 @@ package example { } -import example.TastyFlags._ +import example.TastyFlags.* @main def Test = assert((Open | Given | Inline | Erased).debug == "Erased | Inline | Given | Open") diff --git a/tests/run/statics.scala b/tests/run/statics.scala index 85f467cabe8c..a7fb3a232f15 100644 --- a/tests/run/statics.scala +++ b/tests/run/statics.scala @@ -27,7 +27,7 @@ object Foo { } object Test { - import Foo._ + import Foo.* def main(args: Array[String]): Unit = { method + field + mutable + accessor } diff --git a/tests/run/string-context-implicits-with-conversion.scala b/tests/run/string-context-implicits-with-conversion.scala index 832c22af7241..adcbae38830c 100644 --- a/tests/run/string-context-implicits-with-conversion.scala +++ b/tests/run/string-context-implicits-with-conversion.scala @@ -14,7 +14,7 @@ object Lib { given Show[String] = x => s"Str($x)" } object Test { - import Lib._ + import Lib.* def main(args: Array[String]): Unit = { println(showMe"${1: Int} ${"abc": String}") println(showMe"${1} ${"abc"}") diff --git a/tests/run/sysprops.scala b/tests/run/sysprops.scala index bdad677221d3..79630d60886b 100644 --- a/tests/run/sysprops.scala +++ b/tests/run/sysprops.scala @@ -1,4 +1,4 @@ -import sys._ +import sys.* /** Basic sys.Prop test. */ object Test { diff --git a/tests/run/t1074.scala b/tests/run/t1074.scala index 21fc45df8bdd..1756c73dabab 100644 --- a/tests/run/t1074.scala +++ b/tests/run/t1074.scala @@ -1,4 +1,4 @@ -import scala.collection.immutable._ +import scala.collection.immutable.* object Test { def main(args : Array[String]) : Unit = { var words = "a" :: "b" :: "cd" :: "de" :: "fg" :: "ef" :: diff --git a/tests/run/t1829.scala b/tests/run/t1829.scala index b51055a5a29f..52ecdbc9df59 100644 --- a/tests/run/t1829.scala +++ b/tests/run/t1829.scala @@ -1,6 +1,6 @@ object Test{ def main(args : Array[String]): Unit = { - import scala.collection.immutable._ + import scala.collection.immutable.* assert(IntMap.empty == HashMap.empty); assert(HashMap.empty == IntMap.empty); assert(LongMap.empty == HashMap.empty); diff --git a/tests/run/t1987b/cce_test.scala b/tests/run/t1987b/cce_test.scala index e131df795617..ce3395b3a3de 100644 --- a/tests/run/t1987b/cce_test.scala +++ b/tests/run/t1987b/cce_test.scala @@ -4,7 +4,7 @@ package scales.xml object CCE_Test { def main(args: Array[String]): Unit = { // without the import it doesn't trigger the CCE - import scaley.funny._ + import scaley.funny.* val pull = null.asInstanceOf[Iterator[PullType]] val LogEntries = null.asInstanceOf[List[QName]] diff --git a/tests/run/t2526.scala b/tests/run/t2526.scala index f0e24f844833..2bb5775a1f5a 100644 --- a/tests/run/t2526.scala +++ b/tests/run/t2526.scala @@ -3,7 +3,7 @@ * still work correctly. */ object Test { - import collection._ + import collection.* def main(args: Array[String]): Unit = { val m = new mutable.HashMap[String, String] diff --git a/tests/run/t2594_tcpoly.scala b/tests/run/t2594_tcpoly.scala index 789833bc003f..3f1ec4c19127 100644 --- a/tests/run/t2594_tcpoly.scala +++ b/tests/run/t2594_tcpoly.scala @@ -1,5 +1,5 @@ -import scala.language.{ higherKinds } +import scala.language.higherKinds trait Monad[M[_]] { def foo[A](a: M[A]): M[A] diff --git a/tests/run/t2857.scala b/tests/run/t2857.scala index 37c342048333..7e432a5f193d 100644 --- a/tests/run/t2857.scala +++ b/tests/run/t2857.scala @@ -1,5 +1,5 @@ object Test extends App { - import collection.mutable._ + import collection.mutable.* val m = new HashMap[Int, Set[String]] with MultiMap[Int, String] m.addBinding(6, "Foo") m.removeBinding(6, "Foo") diff --git a/tests/run/t3088.scala b/tests/run/t3088.scala index ea820b1c9c78..baf8f42739bb 100644 --- a/tests/run/t3088.scala +++ b/tests/run/t3088.scala @@ -1,4 +1,4 @@ -import collection.mutable._ +import collection.mutable.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run/t3242b.scala b/tests/run/t3242b.scala index 22d22ac546bc..7f140e8158ee 100644 --- a/tests/run/t3242b.scala +++ b/tests/run/t3242b.scala @@ -1,4 +1,4 @@ -import scala.collection.immutable._ +import scala.collection.immutable.* object Test { diff --git a/tests/run/t3326.scala b/tests/run/t3326.scala index 0e419bebd4f4..3d7d83068f92 100644 --- a/tests/run/t3326.scala +++ b/tests/run/t3326.scala @@ -26,7 +26,7 @@ object Test { } def testCollectionSorted(): Unit = { - import collection._ + import collection.* val order = implicitly[Ordering[Int]].reverse var m1: SortedMap[Int, String] = SortedMap.empty[Int, String](order) var m2: SortedMap[Int, String] = SortedMap.empty[Int, String](order) @@ -47,7 +47,7 @@ object Test { } def testImmutableSorted(): Unit = { - import collection.immutable._ + import collection.immutable.* val order = implicitly[Ordering[Int]].reverse var m1: SortedMap[Int, String] = SortedMap.empty[Int, String](order) var m2: SortedMap[Int, String] = SortedMap.empty[Int, String](order) diff --git a/tests/run/t3493.scala b/tests/run/t3493.scala index c13da255121c..03091d7c28bc 100644 --- a/tests/run/t3493.scala +++ b/tests/run/t3493.scala @@ -5,7 +5,7 @@ object Test { def main(args: Array[String]): Unit = { - import scala.collection.immutable._ + import scala.collection.immutable.* val x = TreeSet("a", "b", "c", "d") val x2 = x + "e" assert(x2.toString == "TreeSet(a, b, c, d, e)") diff --git a/tests/run/t3508.scala b/tests/run/t3508.scala index 8278775d13ea..38bb9ddd397c 100644 --- a/tests/run/t3508.scala +++ b/tests/run/t3508.scala @@ -1,4 +1,4 @@ -import collection.immutable._ +import collection.immutable.* // ticket #3508 object Test { diff --git a/tests/run/t3603.scala b/tests/run/t3603.scala index ac5314b06448..a9c8fb5f56fd 100644 --- a/tests/run/t3603.scala +++ b/tests/run/t3603.scala @@ -1,6 +1,6 @@ object Test { def main(args: Array[String]): Unit = { - import collection.immutable._ + import collection.immutable.* val intmap = IntMap(1 -> 1, 2 -> 2) val intres = intmap.map { case (a, b) => (a, b.toString) } diff --git a/tests/run/t3719.scala b/tests/run/t3719.scala index 01dc2055452d..18a031b1fe2b 100644 --- a/tests/run/t3719.scala +++ b/tests/run/t3719.scala @@ -17,13 +17,13 @@ object Test extends App { Days.values.toList.sorted.map(x => x.toString) def nameOfMon(): String = { - import Days._ + import Days.* val d: Day = Mon d.toString } def nameOfTue(): String = { - import Days._ + import Days.* val d: Day = Tue d.toString } diff --git a/tests/run/t3984.scala b/tests/run/t3984.scala index fd4ffbc1adb0..b55280857bdd 100644 --- a/tests/run/t3984.scala +++ b/tests/run/t3984.scala @@ -1,6 +1,6 @@ object SetBug { - import scala.collection.immutable.{ Set => ImmutSet } - import scala.collection.mutable.{ Set => MutSet } + import scala.collection.immutable.Set as ImmutSet + import scala.collection.mutable.Set as MutSet case class IH (i: Int, h: Int) { override def hashCode: Int = h @@ -22,8 +22,8 @@ object SetBug { } object MapBug { - import scala.collection.immutable.{ Map => ImmutMap } - import scala.collection.mutable.{ Map => MutMap } + import scala.collection.immutable.Map as ImmutMap + import scala.collection.mutable.Map as MutMap case class IH (i: Int, h: Int) { override def hashCode: Int = h diff --git a/tests/run/t4027.scala b/tests/run/t4027.scala index 0cbd1cbbb838..0f6aa7ece53f 100644 --- a/tests/run/t4027.scala +++ b/tests/run/t4027.scala @@ -1,6 +1,6 @@ -import collection._ +import collection.* // Sorted maps have `filterKeys` and `mapValues` which return MapView. // Calling a transformation (map/filter) returns a View. diff --git a/tests/run/t4147.scala b/tests/run/t4147.scala index c638ab50a2b3..0be67554892e 100644 --- a/tests/run/t4147.scala +++ b/tests/run/t4147.scala @@ -1,7 +1,7 @@ -import scala.collection._ +import scala.collection.* diff --git a/tests/run/t4190.scala b/tests/run/t4190.scala index aa88b8708d7d..5f48638f3200 100644 --- a/tests/run/t4190.scala +++ b/tests/run/t4190.scala @@ -1,4 +1,4 @@ -import collection.mutable._ +import collection.mutable.* object Test extends App { val x: ArrayBuffer[String] = ArrayBuffer("a", "b", "c") diff --git a/tests/run/t4398.scala b/tests/run/t4398.scala index 5e152f727a9f..2b0a29ec5fe8 100644 --- a/tests/run/t4398.scala +++ b/tests/run/t4398.scala @@ -1,6 +1,6 @@ -import scala.language.{ postfixOps } +import scala.language.postfixOps object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run/t4535.scala b/tests/run/t4535.scala index f1cb7c4df7aa..bc8a5a3394c1 100644 --- a/tests/run/t4535.scala +++ b/tests/run/t4535.scala @@ -1,4 +1,4 @@ -import collection._ +import collection.* // #4535 object Test { diff --git a/tests/run/t4537/c.scala b/tests/run/t4537/c.scala index ee05d4bbfbc2..2af2b2b9471e 100644 --- a/tests/run/t4537/c.scala +++ b/tests/run/t4537/c.scala @@ -1,7 +1,7 @@ package b package c -import a._ +import a.* object Unambiguous { println(Settings.Y) diff --git a/tests/run/t4537/d.scala b/tests/run/t4537/d.scala index dd1d2045ed76..376153863c62 100644 --- a/tests/run/t4537/d.scala +++ b/tests/run/t4537/d.scala @@ -1,5 +1,5 @@ -import a._ -import b._ +import a.* +import b.* object Test extends App { println(Settings.Y) diff --git a/tests/run/t4809.scala b/tests/run/t4809.scala index f26d17c5b3df..e1d387c86a07 100644 --- a/tests/run/t4809.scala +++ b/tests/run/t4809.scala @@ -1,6 +1,6 @@ -import scala.util.control.Breaks._ +import scala.util.control.Breaks.* diff --git a/tests/run/t4813.scala b/tests/run/t4813.scala index e6e65ffa41d5..a6b2b1640806 100644 --- a/tests/run/t4813.scala +++ b/tests/run/t4813.scala @@ -1,5 +1,5 @@ -import collection.mutable._ -import reflect._ +import collection.mutable.* +import reflect.* object Test extends App { def runTest[T, U](col: T)(clone: T => U)(mod: T => Unit)(implicit ct: ClassTag[T]): Unit = { diff --git a/tests/run/t4930.scala b/tests/run/t4930.scala index 46705729a1d2..7df9b0acba6d 100644 --- a/tests/run/t4930.scala +++ b/tests/run/t4930.scala @@ -1,5 +1,5 @@ import collection.immutable.SortedMap -import scala.math.Ordering.Implicits._ +import scala.math.Ordering.Implicits.* object Test { implicit val ord: Ordering[Array[Byte]] = Ordering.by(x => x.toIterable: collection.Seq[Byte]) diff --git a/tests/run/t4954.scala b/tests/run/t4954.scala index 1b3c00a62601..3bf8a84069b4 100644 --- a/tests/run/t4954.scala +++ b/tests/run/t4954.scala @@ -1,4 +1,4 @@ -import collection._ +import collection.* object Test { diff --git a/tests/run/t5053.scala b/tests/run/t5053.scala index 6cd56788ad82..91a1fca1ac2c 100644 --- a/tests/run/t5053.scala +++ b/tests/run/t5053.scala @@ -1,4 +1,4 @@ -import scala.language.{ existentials } +import scala.language.existentials import collection.View object Test extends App { diff --git a/tests/run/t5588.scala b/tests/run/t5588.scala index 62bca8fd4913..090c147e4bb4 100644 --- a/tests/run/t5588.scala +++ b/tests/run/t5588.scala @@ -6,7 +6,7 @@ object Test { val Y = Value(Integer.MIN_VALUE) } - import MyEnum._ + import MyEnum.* def main(args: Array[String]): Unit = { println(Foo > Bar) println(X > Y) diff --git a/tests/run/t5590.scala b/tests/run/t5590.scala index aded59863e0e..a08cf4af7003 100644 --- a/tests/run/t5590.scala +++ b/tests/run/t5590.scala @@ -1,8 +1,8 @@ -import java.io._ -import collection._ +import java.io.* +import collection.* diff --git a/tests/run/t5604.scala b/tests/run/t5604.scala index eccad1639bde..0f048e942bbc 100644 --- a/tests/run/t5604.scala +++ b/tests/run/t5604.scala @@ -7,7 +7,7 @@ package foo { def buh(n: Double) = println("double") } class regular { - import regular._ + import regular.* duh(33L) duh(3.0d) diff --git a/tests/run/t5629.scala b/tests/run/t5629.scala index 867e92f344b4..c894a0ab269a 100644 --- a/tests/run/t5629.scala +++ b/tests/run/t5629.scala @@ -1,7 +1,7 @@ -import scala.{specialized => spec} +import scala.{specialized as spec} diff --git a/tests/run/t5974.scala b/tests/run/t5974.scala index 5b99e9f72155..1e12065d7cef 100644 --- a/tests/run/t5974.scala +++ b/tests/run/t5974.scala @@ -1,5 +1,5 @@ object Test extends App { - import scala.collection.JavaConverters._ + import scala.collection.JavaConverters.* def ser(a: AnyRef) = (new java.io.ObjectOutputStream(new java.io.ByteArrayOutputStream())).writeObject(a) diff --git a/tests/run/t5986.scala b/tests/run/t5986.scala index 4b56bfd69b33..acec0c5c7693 100644 --- a/tests/run/t5986.scala +++ b/tests/run/t5986.scala @@ -1,7 +1,7 @@ -import scala.collection._ +import scala.collection.* diff --git a/tests/run/t603.scala b/tests/run/t603.scala index 84a224a40a91..0c12e994f150 100644 --- a/tests/run/t603.scala +++ b/tests/run/t603.scala @@ -23,7 +23,7 @@ object forceDelay { } object Test { - import forceDelay._ + import forceDelay.* def main(args: Array[String]) = { val s: Susp[Int] = delay { Console.println("evaluating..."); 3 } diff --git a/tests/run/t6114.scala b/tests/run/t6114.scala index 8ad02d5bb2e5..22d4df6149b6 100644 --- a/tests/run/t6114.scala +++ b/tests/run/t6114.scala @@ -4,7 +4,7 @@ object Test extends App { list.add(1) list.add(2) list.add(3) - import scala.collection.JavaConverters._ + import scala.collection.JavaConverters.* val next = list.asScala ++ List(4,5,6) assert(next != list.asScala) @@ -18,7 +18,7 @@ object Test extends App { set.add(1) set.add(2) set.add(3) - import scala.collection.JavaConverters._ + import scala.collection.JavaConverters.* val next = set.asScala ++ Set(4,5,6) assert(next != set.asScala) @@ -32,7 +32,7 @@ object Test extends App { map.put(1,1) map.put(2,2) map.put(3,3) - import scala.collection.JavaConverters._ + import scala.collection.JavaConverters.* val next = map.asScala ++ Map(4->4,5->5,6->6) assert(next != map.asScala) @@ -47,7 +47,7 @@ object Test extends App { list.add(1) list.add(2) list.add(3) - import scala.collection.JavaConverters._ + import scala.collection.JavaConverters.* val next = list.asScala ++ List(4,5,6) assert(next != list.asScala) diff --git a/tests/run/t6406-regextract.scala b/tests/run/t6406-regextract.scala index 83679a516749..18cf28865aba 100644 --- a/tests/run/t6406-regextract.scala +++ b/tests/run/t6406-regextract.scala @@ -1,7 +1,7 @@ object Test extends App { - import util.matching._ - import Regex._ + import util.matching.* + import Regex.* val r = "(\\d+)".r val q = """(\d)""".r diff --git a/tests/run/t6488.scala b/tests/run/t6488.scala index 559164044242..4cdc2d2b34b5 100644 --- a/tests/run/t6488.scala +++ b/tests/run/t6488.scala @@ -1,10 +1,10 @@ -import scala.sys.process._ +import scala.sys.process.* import scala.util.Try import scala.util.Properties.{ javaHome, javaClassPath } import java.io.{ File, IOException } import java.util.concurrent.CountDownLatch -import java.util.concurrent.TimeUnit._ -import java.util.concurrent.atomic._ +import java.util.concurrent.TimeUnit.* +import java.util.concurrent.atomic.* object Test { /* diff --git a/tests/run/t7126.scala b/tests/run/t7126.scala index b785bcff69ee..aa14d32eff54 100644 --- a/tests/run/t7126.scala +++ b/tests/run/t7126.scala @@ -1,4 +1,4 @@ -import language._ +import language.* // Currently typer infers a Nothing as a CC[T] to be Nothing[T], and isn't // able to figure out that Nothing[Any] =:= Nothing. We've had a discussion diff --git a/tests/run/t7269.scala b/tests/run/t7269.scala index 5876e88eae7c..bfe66fa81ec5 100644 --- a/tests/run/t7269.scala +++ b/tests/run/t7269.scala @@ -1,4 +1,4 @@ -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.collection.mutable object Test extends App { diff --git a/tests/run/t8199.scala b/tests/run/t8199.scala index ffd847ef3787..e6168672d520 100644 --- a/tests/run/t8199.scala +++ b/tests/run/t8199.scala @@ -48,7 +48,7 @@ object Test extends App { } val c = new reallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongname - import c._ + import c.* check(obj0.getClass) check(obj01.getClass) diff --git a/tests/run/t8346.scala b/tests/run/t8346.scala index 5f3df841749d..0ac817dbc7ff 100644 --- a/tests/run/t8346.scala +++ b/tests/run/t8346.scala @@ -10,7 +10,7 @@ object Test extends App { (A.runtimeClass.getSimpleName, f) val inits: Seq[(String, Int => Set[Int])] = { - import collection.immutable.{Seq => _, _} + import collection.immutable.{Seq as _, *} Seq(sctor(BitSet(_)), sctor(HashSet(_)), sctor(ListSet(_)), diff --git a/tests/run/t8549b.scala b/tests/run/t8549b.scala index 06b196677514..8173db4ecb11 100644 --- a/tests/run/t8549b.scala +++ b/tests/run/t8549b.scala @@ -1,4 +1,4 @@ -import java.lang.reflect.Modifier._ +import java.lang.reflect.Modifier.* @SerialVersionUID(42) class C extends Serializable diff --git a/tests/run/tagless.scala b/tests/run/tagless.scala index c245308ea6e9..5333c4e30995 100644 --- a/tests/run/tagless.scala +++ b/tests/run/tagless.scala @@ -12,7 +12,7 @@ object Test extends App { } val fe: IExp = { - import IExp._ + import IExp.* Add(Lit(8), Neg(Add(Lit(1), Lit(2)))) } @@ -60,7 +60,7 @@ object Test extends App { object MultSyntax { def mul[T](l: T, r: T)(using e: Mult[T]): T = e.mul(l, r) } - import MultSyntax._ + import MultSyntax.* def tfm1[T: Exp : Mult] = add(lit(7), neg(mul(lit(1), lit(2)))) def tfm2[T: Exp : Mult] = mul(lit(7), tf1) @@ -81,7 +81,7 @@ object Test extends App { case Leaf(s: String) case Node(s: String, ts: Tree*) } - import Tree._ + import Tree.* given Exp[Tree] with Mult[Tree] with def lit(i: Int): Tree = Node("Lit", Leaf(i.toString)) @@ -110,7 +110,7 @@ object Test extends App { } } } - import CanThrow._ + import CanThrow.* type Maybe[T] = CanThrow ?=> T @@ -191,7 +191,7 @@ object Test extends App { enum NCtx { case Pos, Neg } given [T](using e: Exp[T]): Exp[NCtx => T] with - import NCtx._ + import NCtx.* def lit(i: Int) = { case Pos => e.lit(i) case Neg => e.neg(e.lit(i)) @@ -210,7 +210,7 @@ object Test extends App { println(pushNeg(pushNeg(pushNeg(tf1))): String) given [T](using e: Mult[T]): Mult[NCtx => T] with - import NCtx._ + import NCtx.* def mul(l: NCtx => T, r: NCtx => T): NCtx => T = { case Pos => e.mul(l(Pos), r(Pos)) case Neg => e.mul(l(Pos), r(Neg)) @@ -219,7 +219,7 @@ object Test extends App { println(pushNeg(tfm1[NCtx => String])) println(pushNeg(tfm2[NCtx => String])) - import IExp._ + import IExp.* // Going from type class encoding to ADT encoding given initialize: Exp[IExp] with diff --git a/tests/run/targetName.scala b/tests/run/targetName.scala index 7774922c7b12..47828b340418 100644 --- a/tests/run/targetName.scala +++ b/tests/run/targetName.scala @@ -4,7 +4,7 @@ object A: def f(x: => String): Int = x.length @targetName("f2") def f(x: => Int): Int = x -import A._ +import A.* trait T: def f(x: => String): Int diff --git a/tests/run/tcpoly_overriding.scala b/tests/run/tcpoly_overriding.scala index 32174ad8bfbe..2dca477ce4de 100644 --- a/tests/run/tcpoly_overriding.scala +++ b/tests/run/tcpoly_overriding.scala @@ -1,5 +1,5 @@ -import scala.language.{ higherKinds } +import scala.language.higherKinds abstract class A[t[x]] { def b: t[Int] diff --git a/tests/run/test-implicits.scala b/tests/run/test-implicits.scala index fbc8536c041b..580cf27f9b85 100644 --- a/tests/run/test-implicits.scala +++ b/tests/run/test-implicits.scala @@ -18,7 +18,7 @@ class C(x: String) { } object Test extends App { - import A.B._ + import A.B.* val c = new C("OK") val i = new c.Inner val s: String = i @@ -40,7 +40,7 @@ object TestPriority { implicit def Int2D(x: Int): D = new D(x) } - import impl._ + import impl.* val x: C = 2 val y: D = 2 diff --git a/tests/run/toplevel-implicits/Test_2.scala b/tests/run/toplevel-implicits/Test_2.scala index 65eb72288651..0dd5e00e32f1 100644 --- a/tests/run/toplevel-implicits/Test_2.scala +++ b/tests/run/toplevel-implicits/Test_2.scala @@ -1,5 +1,5 @@ object Test extends App { - import implicits._ + import implicits.* val c = new C val c2 = c.pair(c) diff --git a/tests/run/traitParams.scala b/tests/run/traitParams.scala index 82c176461c24..845ca6aa5062 100644 --- a/tests/run/traitParams.scala +++ b/tests/run/traitParams.scala @@ -16,7 +16,7 @@ trait U2(a: Any) extends T { a // used to crash } -import State._ +import State.* class C(x: Int) extends U with T(x, x * x + s) class C2(x: Int) extends T(x, x * x + s) with U diff --git a/tests/run/traits-initialization.scala b/tests/run/traits-initialization.scala index fdddc8f44468..41698729edea 100644 --- a/tests/run/traits-initialization.scala +++ b/tests/run/traits-initialization.scala @@ -2,7 +2,7 @@ object store { var str = "" } -import store._ +import store.* trait A { str += "a" diff --git a/tests/run/transparent-implicits.scala b/tests/run/transparent-implicits.scala index 6d46a61d28e4..ffb33f90c928 100644 --- a/tests/run/transparent-implicits.scala +++ b/tests/run/transparent-implicits.scala @@ -6,7 +6,7 @@ object impl { } object inlines { - import impl._ + import impl.* class C { implicit val x: X = new X() diff --git a/tests/run/transparent/Test_2.scala b/tests/run/transparent/Test_2.scala index 722e302c4b26..5852b7a261dc 100644 --- a/tests/run/transparent/Test_2.scala +++ b/tests/run/transparent/Test_2.scala @@ -1,6 +1,6 @@ object Test { - import p.transparents._ + import p.transparents.* def main(args: Array[String]): Unit = { println(f(10)) diff --git a/tests/run/transparentArrowAssoc.scala b/tests/run/transparentArrowAssoc.scala index 0a3b5c6d7e37..29b228eeef46 100644 --- a/tests/run/transparentArrowAssoc.scala +++ b/tests/run/transparentArrowAssoc.scala @@ -1,4 +1,4 @@ -import scala.collection.immutable._ +import scala.collection.immutable.* import scala.collection.mutable.{ Builder, ListBuffer } diff --git a/tests/run/transparentProtected.scala b/tests/run/transparentProtected.scala index 1a725ec27346..5aa9b2c46138 100644 --- a/tests/run/transparentProtected.scala +++ b/tests/run/transparentProtected.scala @@ -13,7 +13,7 @@ package Q { } object Test extends App { - import Q._ + import Q.* val d = new D val i = new d.Inner diff --git a/tests/run/triemap-hash.scala b/tests/run/triemap-hash.scala index 902b80a014d1..d8532ad97e23 100644 --- a/tests/run/triemap-hash.scala +++ b/tests/run/triemap-hash.scala @@ -13,7 +13,7 @@ object Test { } def hashing(): Unit = { - import collection._ + import collection.* val tm = new concurrent.TrieMap[String, String](Hashing.fromFunction(x => x.length + x(0).toInt), Equiv.universal) tm.put("a", "b") @@ -27,7 +27,7 @@ object Test { } def equality(): Unit = { - import collection._ + import collection.* val tm = new concurrent.TrieMap[String, String](Hashing.fromFunction(x => x(0).toInt), Equiv.fromFunction(_(0) == _(0))) tm.put("a", "b") diff --git a/tests/run/triple-quoted-expr.scala b/tests/run/triple-quoted-expr.scala index 6d91ac5888f0..7c923d7661f5 100644 --- a/tests/run/triple-quoted-expr.scala +++ b/tests/run/triple-quoted-expr.scala @@ -20,7 +20,7 @@ hi""" object Test { def main(args: Array[String]): Unit = { val x = new A - import x._ + import x.* List(f1, f2, f3) foreach println } } diff --git a/tests/run/try-catch-unify.scala b/tests/run/try-catch-unify.scala index 151e549e5fdf..bdbd485e2c78 100644 --- a/tests/run/try-catch-unify.scala +++ b/tests/run/try-catch-unify.scala @@ -1,6 +1,6 @@ -import util._ +import util.* -import control.Exception._ +import control.Exception.* object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run/tuples.scala b/tests/run/tuples.scala index beeb98092ec9..06db598b65da 100644 --- a/tests/run/tuples.scala +++ b/tests/run/tuples.scala @@ -1,4 +1,4 @@ -import Function._ +import Function.* object Test extends App { var xyz: (Int, String, Boolean) = compiletime.uninitialized diff --git a/tests/run/typable.scala b/tests/run/typable.scala index 7fe253023740..5e7182dcd338 100644 --- a/tests/run/typable.scala +++ b/tests/run/typable.scala @@ -1,4 +1,4 @@ -import scala.reflect._ +import scala.reflect.* object Test: def main(args: Array[String]): Unit = diff --git a/tests/run/type-test-nat.scala b/tests/run/type-test-nat.scala index a7f21ec33fce..cb9b729fb61b 100644 --- a/tests/run/type-test-nat.scala +++ b/tests/run/type-test-nat.scala @@ -7,7 +7,7 @@ object Test { } def app(peano: Peano): Unit = { - import peano._ + import peano.* def divOpt(m: Nat, n: Nat): Option[(Nat, Nat)] = { n match { case Zero => None diff --git a/tests/run/typeclass-derivation-doc-example.scala b/tests/run/typeclass-derivation-doc-example.scala index c85319b1ba88..bc00311478bd 100644 --- a/tests/run/typeclass-derivation-doc-example.scala +++ b/tests/run/typeclass-derivation-doc-example.scala @@ -1,4 +1,4 @@ -import scala.deriving._ +import scala.deriving.* import scala.compiletime.{erasedValue, summonInline} inline def summonAll[T <: Tuple]: List[Eq[_]] = inline erasedValue[T] match { @@ -51,7 +51,7 @@ enum Opt[+T] derives Eq { } object Test extends App { - import Opt._ + import Opt.* val eqoi = summon[Eq[Opt[Int]]] assert(eqoi.eqv(Sm(23), Sm(23))) assert(!eqoi.eqv(Sm(23), Sm(13))) diff --git a/tests/run/typeclass-derivation1.scala b/tests/run/typeclass-derivation1.scala index a6f8096c8ecb..f6c83c770af2 100644 --- a/tests/run/typeclass-derivation1.scala +++ b/tests/run/typeclass-derivation1.scala @@ -1,5 +1,5 @@ object Deriving { - import scala.compiletime._ + import scala.compiletime.* sealed trait Shape @@ -79,7 +79,7 @@ object Deriving { } object Test extends App { - import Deriving._ + import Deriving.* val eq = implicitly[Eq[Lst[Int]]] val xs = Lst.Cons(1, Lst.Cons(2, Lst.Cons(3, Lst.Nil))) val ys = Lst.Cons(1, Lst.Cons(2, Lst.Nil)) diff --git a/tests/run/typeclass-derivation2a.scala b/tests/run/typeclass-derivation2a.scala index 68d7cf4f13d0..b8c004b24cc0 100644 --- a/tests/run/typeclass-derivation2a.scala +++ b/tests/run/typeclass-derivation2a.scala @@ -7,7 +7,7 @@ object TypeLevel { /** @param caseLabels The case and element labels of the described ADT as encoded strings. */ class GenericClass(labelsStr: String) { - import GenericClass._ + import GenericClass.* /** A mirror of case with ordinal number `ordinal` and elements as given by `Product` */ def mirror(ordinal: Int, product: Product): Mirror = @@ -121,7 +121,7 @@ enum Lst[+T] { // derives Eq, Pickler, Show object Lst { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* val genericClass = new GenericClass("Cons\u0000hd\u0000tl\u0001Nil") import genericClass.mirror @@ -156,7 +156,7 @@ case class Pair[T](x: T, y: T) // derives Eq, Pickler, Show object Pair { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* val genericClass = new GenericClass("Pair\u0000x\u0000y") import genericClass.mirror @@ -184,7 +184,7 @@ case class Left[L](x: L) extends Either[L, Nothing] case class Right[R](x: R) extends Either[Nothing, R] object Either { - import TypeLevel._ + import TypeLevel.* val genericClass = new GenericClass("Left\u0000x\u0001Right\u0000x") import genericClass.mirror @@ -220,7 +220,7 @@ trait Eq[T] { object Eq { import scala.compiletime.{erasedValue, summonInline} - import TypeLevel._ + import TypeLevel.* inline def tryEql[T](x: T, y: T) = summonInline[Eq[T]].eql(x, y) @@ -269,7 +269,7 @@ trait Pickler[T] { object Pickler { import scala.compiletime.{erasedValue, constValue, summonInline} - import TypeLevel._ + import TypeLevel.* def nextInt(buf: mutable.ListBuffer[Int]): Int = try buf.head finally buf.trimStart(1) @@ -352,7 +352,7 @@ trait Show[T] { } object Show { import scala.compiletime.{erasedValue, summonInline} - import TypeLevel._ + import TypeLevel.* inline def tryShow[T](x: T): String = summonInline[Show[T]].show(x) @@ -395,7 +395,7 @@ object Show { // Tests object Test extends App { - import TypeLevel._ + import TypeLevel.* val eq = implicitly[Eq[Lst[Int]]] val xs = Lst.Cons(11, Lst.Cons(22, Lst.Cons(33, Lst.Nil))) val ys = Lst.Cons(11, Lst.Cons(22, Lst.Nil)) diff --git a/tests/run/typeclass-derivation2b.scala b/tests/run/typeclass-derivation2b.scala index 704e8cb2cc9b..cbf094d4426e 100644 --- a/tests/run/typeclass-derivation2b.scala +++ b/tests/run/typeclass-derivation2b.scala @@ -41,7 +41,7 @@ sealed trait Lst[+T] // derives Eq, Pickler, Show object Lst { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* class GenericLst[T] extends GenericSum[Lst[T]] { override type Shape = (Cons[T], Nil.type) @@ -92,7 +92,7 @@ trait Eq[T] { object Eq { import scala.compiletime.{erasedValue, summonInline} - import TypeLevel._ + import TypeLevel.* inline def tryEql[T](x: T, y: T) = summonInline[Eq[T]].eql(x, y) @@ -141,7 +141,7 @@ object Eq { } object Test extends App { - import TypeLevel._ + import TypeLevel.* val eq = implicitly[Eq[Lst[Int]]] val xs = Lst.Cons(11, Lst.Cons(22, Lst.Cons(33, Lst.Nil))) val ys = Lst.Cons(11, Lst.Cons(22, Lst.Nil)) @@ -165,7 +165,7 @@ case class Pair[T](x: T, y: T) // derives Eq, Pickler, Show object Pair { // common compiler-generated infrastructure - import TypeLevel._ + import TypeLevel.* val genericClass = new GenericClass("Pair\000x\000y") import genericClass.mirror @@ -193,7 +193,7 @@ case class Left[L](x: L) extends Either[L, Nothing] case class Right[R](x: R) extends Either[Nothing, R] object Either { - import TypeLevel._ + import TypeLevel.* val genericClass = new GenericClass("Left\000x\001Right\000x") import genericClass.mirror @@ -229,7 +229,7 @@ trait Eq[T] { object Eq { import scala.compiletime.erasedValue - import TypeLevel._ + import TypeLevel.* inline def tryEql[T](x: T, y: T) = summonFrom { case eq: Eq[T] => eq.eql(x, y) @@ -280,7 +280,7 @@ trait Pickler[T] { object Pickler { import scala.compiletime.{erasedValue, constValue} - import TypeLevel._ + import TypeLevel.* def nextInt(buf: mutable.ListBuffer[Int]): Int = try buf.head finally buf.trimStart(1) @@ -367,7 +367,7 @@ trait Show[T] { } object Show { import scala.compiletime.erasedValue - import TypeLevel._ + import TypeLevel.* inline def tryShow[T](x: T): String = summonFrom { case s: Show[T] => s.show(x) @@ -412,7 +412,7 @@ object Show { // Tests object Test extends App { - import TypeLevel._ + import TypeLevel.* val eq = implicitly[Eq[Lst[Int]]] val xs = Lst.Cons(11, Lst.Cons(22, Lst.Cons(33, Lst.Nil))) val ys = Lst.Cons(11, Lst.Cons(22, Lst.Nil)) diff --git a/tests/run/typeclass-derivation2d.scala b/tests/run/typeclass-derivation2d.scala index 2705da90f6d1..635f531114bc 100644 --- a/tests/run/typeclass-derivation2d.scala +++ b/tests/run/typeclass-derivation2d.scala @@ -69,7 +69,7 @@ object Deriving { def productElement[T](x: Any, idx: Int) = x.asInstanceOf[Product].productElement(idx).asInstanceOf[T] } -import Deriving._ +import Deriving.* sealed trait Lst[+T] // derives Eq, Pickler, Show diff --git a/tests/run/typeclass-derivation3.scala b/tests/run/typeclass-derivation3.scala index 675faab8da5d..693018b915f4 100644 --- a/tests/run/typeclass-derivation3.scala +++ b/tests/run/typeclass-derivation3.scala @@ -2,7 +2,7 @@ import scala.collection.mutable import scala.annotation.tailrec object datatypes { - import typeclasses._ + import typeclasses.* // An algebraic datatype enum Lst[+T] derives Eq, Pickler, Show { @@ -32,8 +32,8 @@ object typeclasses { object Eq { import scala.compiletime.{erasedValue, summonFrom} - import compiletime._ - import scala.deriving._ + import compiletime.* + import scala.deriving.* inline def tryEql[TT](x: TT, y: TT): Boolean = summonFrom { case eq: Eq[TT] => eq.eql(x, y) @@ -85,8 +85,8 @@ object typeclasses { object Pickler { import scala.compiletime.{erasedValue, constValue, summonFrom} - import compiletime._ - import deriving._ + import compiletime.* + import deriving.* def nextInt(buf: mutable.ListBuffer[Int]): Int = try buf.head finally buf.trimStart(1) @@ -185,8 +185,8 @@ object typeclasses { } object Show { import scala.compiletime.{erasedValue, summonInline} - import compiletime._ - import deriving._ + import compiletime.* + import deriving.* inline def tryShow[T](x: T): String = summonInline[Show[T]].show(x) @@ -236,8 +236,8 @@ object typeclasses { } } } -import datatypes._ -import typeclasses._ +import datatypes.* +import typeclasses.* // Tests object Test extends App { diff --git a/tests/run/typelevel-numeric.scala b/tests/run/typelevel-numeric.scala index 990b4b4a4b86..4b61bae9b772 100644 --- a/tests/run/typelevel-numeric.scala +++ b/tests/run/typelevel-numeric.scala @@ -8,7 +8,7 @@ abstract class MathLib[N : Numeric] { object MathLib { inline def apply[N](implicit n: Numeric[N]) = new MathLib[N] { - import n._ + import n.* def dotProduct(xs: Array[N], ys: Array[N]): N = { require(xs.length == ys.length) var i = 0 diff --git a/tests/run/typelevel-peano.scala b/tests/run/typelevel-peano.scala index 802f614fcfb7..069686f6d95c 100644 --- a/tests/run/typelevel-peano.scala +++ b/tests/run/typelevel-peano.scala @@ -1,5 +1,5 @@ -import compiletime._ +import compiletime.* object Test extends App { diff --git a/tests/run/varargs-extend-java-2/Test.scala b/tests/run/varargs-extend-java-2/Test.scala index d704fc9881b9..94fd48477c39 100644 --- a/tests/run/varargs-extend-java-2/Test.scala +++ b/tests/run/varargs-extend-java-2/Test.scala @@ -1,4 +1,4 @@ -import base._ +import base.* object Test extends App { class Concrete extends AbstractBase { diff --git a/tests/run/viewtest.scala b/tests/run/viewtest.scala index d3d0ae8daf89..887ad8c59e11 100755 --- a/tests/run/viewtest.scala +++ b/tests/run/viewtest.scala @@ -1,5 +1,5 @@ object Test extends App { - import collection._ + import collection.* val xs: View[(String, Int)] = List("x").view.zip(LazyList.from(0)) println(xs) diff --git a/tests/run/virtpatmat_stringinterp.scala b/tests/run/virtpatmat_stringinterp.scala index c6c951e6e5f0..203468702a11 100644 --- a/tests/run/virtpatmat_stringinterp.scala +++ b/tests/run/virtpatmat_stringinterp.scala @@ -1,5 +1,5 @@ -import scala.language.{ implicitConversions } +import scala.language.implicitConversions object Test extends App { case class Node(x: Int) diff --git a/tests/semanticdb/expect/Annotations.expect.scala b/tests/semanticdb/expect/Annotations.expect.scala index 88fd55279508..fb89c0e94abc 100644 --- a/tests/semanticdb/expect/Annotations.expect.scala +++ b/tests/semanticdb/expect/Annotations.expect.scala @@ -1,7 +1,7 @@ package annot -import com.javacp.annot._ -import scala.annotation.meta._ +import com.javacp.annot.* +import scala.annotation.meta.* import scala.language/*->scala::language.*/.experimental/*->scala::language.experimental.*/.macros/*->scala::language.experimental.macros.*/ @ClassAnnotation/*->com::javacp::annot::ClassAnnotation#*/ diff --git a/tests/semanticdb/expect/Annotations.scala b/tests/semanticdb/expect/Annotations.scala index c897aa819a58..176ced6487e8 100644 --- a/tests/semanticdb/expect/Annotations.scala +++ b/tests/semanticdb/expect/Annotations.scala @@ -1,7 +1,7 @@ package annot -import com.javacp.annot._ -import scala.annotation.meta._ +import com.javacp.annot.* +import scala.annotation.meta.* import scala.language.experimental.macros @ClassAnnotation diff --git a/tests/semanticdb/expect/Enums.expect.scala b/tests/semanticdb/expect/Enums.expect.scala index d74e49ccf98d..cc3630382ba7 100644 --- a/tests/semanticdb/expect/Enums.expect.scala +++ b/tests/semanticdb/expect/Enums.expect.scala @@ -1,5 +1,5 @@ object Enums/*<-_empty_::Enums.*/: - import <:_empty_::Enums.`<:<`.*/._ + import <:_empty_::Enums.`<:<`.*/.* enum Colour/*<-_empty_::Enums.Colour#*/: import Colour/*->_empty_::Enums.Colour.*/.Red/*->_empty_::Enums.Colour.Red.*/ diff --git a/tests/semanticdb/expect/Enums.scala b/tests/semanticdb/expect/Enums.scala index 3d666fb618a9..be7e2d6ce5cb 100644 --- a/tests/semanticdb/expect/Enums.scala +++ b/tests/semanticdb/expect/Enums.scala @@ -1,5 +1,5 @@ object Enums: - import <:<._ + import <:<.* enum Colour: import Colour.Red diff --git a/tests/semanticdb/expect/ImplicitConversion.expect.scala b/tests/semanticdb/expect/ImplicitConversion.expect.scala index d9e6612680bb..e5309ca26467 100644 --- a/tests/semanticdb/expect/ImplicitConversion.expect.scala +++ b/tests/semanticdb/expect/ImplicitConversion.expect.scala @@ -3,7 +3,7 @@ package example import scala.language/*->scala::language.*/.implicitConversions/*->scala::language.implicitConversions.*/ class ImplicitConversion/*<-example::ImplicitConversion#*/ { - import ImplicitConversion/*->example::ImplicitConversion.*/._ + import ImplicitConversion/*->example::ImplicitConversion.*/.* implicit def string2Number/*<-example::ImplicitConversion#string2Number().*/( string/*<-example::ImplicitConversion#string2Number().(string)*/: String/*->scala::Predef.String#*/ ): Int/*->scala::Int#*/ = 42 diff --git a/tests/semanticdb/expect/ImplicitConversion.scala b/tests/semanticdb/expect/ImplicitConversion.scala index fea8daa18bcd..c6219d0ee440 100644 --- a/tests/semanticdb/expect/ImplicitConversion.scala +++ b/tests/semanticdb/expect/ImplicitConversion.scala @@ -3,7 +3,7 @@ package example import scala.language.implicitConversions class ImplicitConversion { - import ImplicitConversion._ + import ImplicitConversion.* implicit def string2Number( string: String ): Int = 42 diff --git a/tests/semanticdb/expect/InstrumentTyper.expect.scala b/tests/semanticdb/expect/InstrumentTyper.expect.scala index cad500b7c234..fdce47af0a20 100644 --- a/tests/semanticdb/expect/InstrumentTyper.expect.scala +++ b/tests/semanticdb/expect/InstrumentTyper.expect.scala @@ -3,7 +3,7 @@ package example import scala.annotation.meta.param/*->scala::annotation::meta::param#*/ import scala.language/*->scala::language.*/.existentials/*->scala::language.existentials.*/ import scala.language/*->scala::language.*/.higherKinds/*->scala::language.higherKinds.*/ -import types.Test/*->types::Test.*/._ +import types.Test/*->types::Test.*/.* class InstrumentTyper/*<-example::InstrumentTyper#*/ { self/*<-local0*/: AnyRef/*->scala::AnyRef#*/ => def all/*<-example::InstrumentTyper#all().*/ = List/*->scala::package.List.*//*->scala::collection::IterableFactory#apply().*/( diff --git a/tests/semanticdb/expect/InstrumentTyper.scala b/tests/semanticdb/expect/InstrumentTyper.scala index 2c2ede6f85da..eb63e6553800 100644 --- a/tests/semanticdb/expect/InstrumentTyper.scala +++ b/tests/semanticdb/expect/InstrumentTyper.scala @@ -3,7 +3,7 @@ package example import scala.annotation.meta.param import scala.language.existentials import scala.language.higherKinds -import types.Test._ +import types.Test.* class InstrumentTyper { self: AnyRef => def all = List( diff --git a/tests/semanticdb/expect/Prefixes.expect.scala b/tests/semanticdb/expect/Prefixes.expect.scala index 0873e23555a7..185e2d3530d8 100644 --- a/tests/semanticdb/expect/Prefixes.expect.scala +++ b/tests/semanticdb/expect/Prefixes.expect.scala @@ -23,11 +23,11 @@ object Test/*<-prefixes::Test.*/ { val c/*<-prefixes::Test.c.*/: C/*->prefixes::C#*/ = ???/*->scala::Predef.`???`().*/ def m2/*<-prefixes::Test.m2().*/: c/*->prefixes::Test.c.*/.T/*->prefixes::C#T#*/ = ???/*->scala::Predef.`???`().*/ def k2/*<-prefixes::Test.k2().*/: c/*->prefixes::Test.c.*/.N/*->prefixes::C#N.*/.U/*->prefixes::C#N.U#*/ = ???/*->scala::Predef.`???`().*/ - import c/*->prefixes::Test.c.*/.N/*->prefixes::C#N.*/._ + import c/*->prefixes::Test.c.*/.N/*->prefixes::C#N.*/.* def k3/*<-prefixes::Test.k3().*/: U = ???/*->scala::Predef.`???`().*/ def n2/*<-prefixes::Test.n2().*/: M/*->prefixes::M.*/.T/*->prefixes::M.T#*/ = ???/*->scala::Predef.`???`().*/ - import M/*->prefixes::M.*/._ + import M/*->prefixes::M.*/.* def n3/*<-prefixes::Test.n3().*/: T/*->prefixes::M.T#*/ = ???/*->scala::Predef.`???`().*/ } diff --git a/tests/semanticdb/expect/Prefixes.scala b/tests/semanticdb/expect/Prefixes.scala index 11891cb325ec..4148068d8f44 100644 --- a/tests/semanticdb/expect/Prefixes.scala +++ b/tests/semanticdb/expect/Prefixes.scala @@ -23,11 +23,11 @@ object Test { val c: C = ??? def m2: c.T = ??? def k2: c.N.U = ??? - import c.N._ + import c.N.* def k3: U = ??? def n2: M.T = ??? - import M._ + import M.* def n3: T = ??? } diff --git a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/CustomReflectSelectableTestScala3.scala b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/CustomReflectSelectableTestScala3.scala index 716d5b9c5c4a..744a59bebc9d 100644 --- a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/CustomReflectSelectableTestScala3.scala +++ b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/CustomReflectSelectableTestScala3.scala @@ -1,10 +1,10 @@ package org.scalajs.testsuite.compiler -import org.junit.Assert._ +import org.junit.Assert.* import org.junit.Test class CustomReflectSelectableTestScala3 { - import CustomReflectSelectableTestScala3._ + import CustomReflectSelectableTestScala3.* @Test def selectField(): Unit = { val obj: reflect.Selectable { val x: Int } = new CustomReflectSelectable(42) diff --git a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/EnumTestScala3.scala b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/EnumTestScala3.scala index 01bdb6ccc954..263a3b4774a3 100644 --- a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/EnumTestScala3.scala +++ b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/EnumTestScala3.scala @@ -1,13 +1,13 @@ package org.scalajs.testsuite.compiler -import org.junit.Assert._ +import org.junit.Assert.* import org.junit.Test class EnumTestScala3: - import EnumTestScala3._ + import EnumTestScala3.* @Test def testColor1(): Unit = - import EnumTestScala3.{Color1 => Color} + import EnumTestScala3.{Color1 as Color} def code(c: Color): Character = c match case Color.Red => 'R' @@ -35,7 +35,7 @@ class EnumTestScala3: end testColor1 @Test def testColor2(): Unit = // copied from `color1` - import EnumTestScala3.{Color2 => Color} + import EnumTestScala3.{Color2 as Color} def code(c: Color): Character = c match case Color.Red => 'R' @@ -63,7 +63,7 @@ class EnumTestScala3: end testColor2 @Test def testCurrency1(): Unit = - import EnumTestScala3.{Currency1 => Currency} + import EnumTestScala3.{Currency1 as Currency} def code(c: Currency): String = c match case Currency.Dollar => "USD" @@ -95,7 +95,7 @@ class EnumTestScala3: end testCurrency1 @Test def testCurrency2(): Unit = // copied from `testCurrency1` - import EnumTestScala3.{Currency2 => Currency} + import EnumTestScala3.{Currency2 as Currency} def code(c: Currency): String = c match case Currency.Dollar => "USD" diff --git a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/ReflectiveCallTestScala3.scala b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/ReflectiveCallTestScala3.scala index 904f69cfdfea..9648af61e31a 100644 --- a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/ReflectiveCallTestScala3.scala +++ b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/ReflectiveCallTestScala3.scala @@ -7,7 +7,7 @@ package org.scalajs.testsuite.compiler import scala.reflect.Selectable.reflectiveSelectable -import org.junit.Assert._ +import org.junit.Assert.* import org.junit.Test object ReflectiveCallTestScala3 { @@ -128,7 +128,7 @@ object ReflectiveCallTestScala3 { } class ReflectiveCallTestScala3 { - import ReflectiveCallTestScala3._ + import ReflectiveCallTestScala3.* @Test def testBasic1(): Unit = basic(new Foo1) @Test def testCurrying1(): Unit = currying(new Foo1) diff --git a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/RegressionTestScala3.scala b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/RegressionTestScala3.scala index b5c307f110f7..24c80e18bddb 100644 --- a/tests/sjs-junit/test/org/scalajs/testsuite/compiler/RegressionTestScala3.scala +++ b/tests/sjs-junit/test/org/scalajs/testsuite/compiler/RegressionTestScala3.scala @@ -1,12 +1,12 @@ package org.scalajs.testsuite.compiler -import org.junit.Assert._ +import org.junit.Assert.* import org.junit.Test import scala.scalajs.js class RegressionTestScala3 { - import RegressionTestScala3._ + import RegressionTestScala3.* @Test def testRegressionDoubleDefinitionOfOuterPointerIssue10177(): Unit = { assertEquals(6, new OuterClassIssue10177().foo(5)) diff --git a/tests/sjs-junit/test/org/scalajs/testsuite/jsinterop/TopLevelNativeJSMembersTestScala3.scala b/tests/sjs-junit/test/org/scalajs/testsuite/jsinterop/TopLevelNativeJSMembersTestScala3.scala index 084ba0c18a74..7ea63d31d397 100644 --- a/tests/sjs-junit/test/org/scalajs/testsuite/jsinterop/TopLevelNativeJSMembersTestScala3.scala +++ b/tests/sjs-junit/test/org/scalajs/testsuite/jsinterop/TopLevelNativeJSMembersTestScala3.scala @@ -1,10 +1,10 @@ package org.scalajs.testsuite.jsinterop -import org.junit.Assert._ +import org.junit.Assert.* import org.junit.Test import scala.scalajs.js -import scala.scalajs.js.annotation._ +import scala.scalajs.js.annotation.* @js.native @JSGlobal("interoperabilityTestGlobalValDefConstant") diff --git a/tests/untried/neg/caseinherit.scala b/tests/untried/neg/caseinherit.scala index 188b7d14f9d6..dd6332a42b21 100644 --- a/tests/untried/neg/caseinherit.scala +++ b/tests/untried/neg/caseinherit.scala @@ -3,7 +3,7 @@ package foo { case class B(y: Int) extends A(y) case object Bippy extends A(55) } -import foo._ +import foo.* package bar { class Blameless(x: Int) diff --git a/tests/untried/neg/compile-time-only-a.scala b/tests/untried/neg/compile-time-only-a.scala index 130a3c539f0e..801ee7efa33f 100644 --- a/tests/untried/neg/compile-time-only-a.scala +++ b/tests/untried/neg/compile-time-only-a.scala @@ -41,7 +41,7 @@ object Test extends App { new C4(2) C4(2) - import pkg._ + import pkg.* 2.ext C5(2) diff --git a/tests/untried/neg/cyclics-import.scala b/tests/untried/neg/cyclics-import.scala index 7b510b58e25d..aac58776aa0f 100644 --- a/tests/untried/neg/cyclics-import.scala +++ b/tests/untried/neg/cyclics-import.scala @@ -1,4 +1,4 @@ -import User.UserStatus._ +import User.UserStatus.* class User { var id: Int = 0 diff --git a/tests/untried/neg/forgot-interpolator.scala b/tests/untried/neg/forgot-interpolator.scala index a53054d89014..1bc0eb22d760 100644 --- a/tests/untried/neg/forgot-interpolator.scala +++ b/tests/untried/neg/forgot-interpolator.scala @@ -53,7 +53,7 @@ package test { def jj = "shadowed $j" // no warn } } - import annotation._ + import annotation.* @implicitNotFound("No Z in ${A}") // no warn class Z[A] } diff --git a/tests/untried/neg/imp2.scala b/tests/untried/neg/imp2.scala index 9937262188d7..27c0a46eb2fd 100644 --- a/tests/untried/neg/imp2.scala +++ b/tests/untried/neg/imp2.scala @@ -13,7 +13,7 @@ object B extends C { object Test { val a: C = A; val b: C = B; - import a._ - import b._ + import a.* + import b.* val x = f } diff --git a/tests/untried/neg/implicit-shadow.scala b/tests/untried/neg/implicit-shadow.scala index b03d0edbd886..ea93649e9ab0 100644 --- a/tests/untried/neg/implicit-shadow.scala +++ b/tests/untried/neg/implicit-shadow.scala @@ -1,5 +1,5 @@ object Test { - import B._, C._ + import B._, C.* 1.isEmpty } diff --git a/tests/untried/neg/import-precedence.scala b/tests/untried/neg/import-precedence.scala index 0401635e3264..5ccdf78bb209 100644 --- a/tests/untried/neg/import-precedence.scala +++ b/tests/untried/neg/import-precedence.scala @@ -14,13 +14,13 @@ package uniq1 { package p1 { import uniq1.X package p2 { - import uniq1.uniq2._ + import uniq1.uniq2.* object Y { def f = X } } } package p2 { - import uniq1.uniq2._ + import uniq1.uniq2.* package p2 { import uniq1.X object Y { def f = X } @@ -29,12 +29,12 @@ package p2 { package p3 { import uniq1.X - import uniq1.uniq2._ + import uniq1.uniq2.* object Y { def f = X } } package p4 { - import uniq1.uniq2._ + import uniq1.uniq2.* import uniq1.X object Y { def f = X } } @@ -48,16 +48,16 @@ package p5 { } package p6 { - import uniq1._ + import uniq1.* package p5 { - import uniq1.uniq2._ + import uniq1.uniq2.* object Y { def f = X } } } package p7 { - import uniq1._ - import uniq1.uniq2._ + import uniq1.* + import uniq1.uniq2.* object Y { def f = X } } diff --git a/tests/untried/neg/migration28.scala b/tests/untried/neg/migration28.scala index facc9b36d2f2..7d57382d156d 100644 --- a/tests/untried/neg/migration28.scala +++ b/tests/untried/neg/migration28.scala @@ -1,5 +1,5 @@ object Test { - import scala.collection.mutable._ + import scala.collection.mutable.* List(1,2,3,4,5).scanRight(0)(_+_) diff --git a/tests/untried/neg/name-lookup-stable.scala b/tests/untried/neg/name-lookup-stable.scala index 0d862f06e136..0e122e2144d7 100644 --- a/tests/untried/neg/name-lookup-stable.scala +++ b/tests/untried/neg/name-lookup-stable.scala @@ -10,7 +10,7 @@ class A { def PrimaryKey: Any = ??? { - import ColumnOption._ + import ColumnOption.* (null: Any) match { case PrimaryKey => } diff --git a/tests/untried/neg/nested-annotation.scala b/tests/untried/neg/nested-annotation.scala index 35c0cd3b75ce..16ef1f53b13d 100644 --- a/tests/untried/neg/nested-annotation.scala +++ b/tests/untried/neg/nested-annotation.scala @@ -1,4 +1,4 @@ -import annotation._ +import annotation.* class ComplexAnnotation(val value: Annotation) extends ClassfileAnnotation diff --git a/tests/untried/neg/noMember1.scala b/tests/untried/neg/noMember1.scala index 0aee7bff7f9f..1f781bbe450d 100644 --- a/tests/untried/neg/noMember1.scala +++ b/tests/untried/neg/noMember1.scala @@ -1,3 +1,3 @@ -import scala.collection.mutable.MultiMap._ +import scala.collection.mutable.MultiMap.* class A diff --git a/tests/untried/neg/nopredefs.scala b/tests/untried/neg/nopredefs.scala index 1128b189342a..7b3fec25186c 100644 --- a/tests/untried/neg/nopredefs.scala +++ b/tests/untried/neg/nopredefs.scala @@ -1,4 +1,4 @@ -import Predef.{Set => _, _} +import Predef.{Set as _, *} object Test { val x = Map(1 -> 2) diff --git a/tests/untried/neg/object-not-a-value.scala b/tests/untried/neg/object-not-a-value.scala index 207b271df22c..effa93027bb5 100644 --- a/tests/untried/neg/object-not-a-value.scala +++ b/tests/untried/neg/object-not-a-value.scala @@ -1,5 +1,5 @@ object Test { - import java.util._ + import java.util.* def main(args: Array[String]): Unit = { List(1) map (_ + 1) diff --git a/tests/untried/neg/predef-masking.scala b/tests/untried/neg/predef-masking.scala index 67b69aa1699b..5dc4549eb422 100644 --- a/tests/untried/neg/predef-masking.scala +++ b/tests/untried/neg/predef-masking.scala @@ -1,5 +1,5 @@ // Testing predef masking -import Predef.{ any2stringadd => _, _ } +import Predef.{ any2stringadd as _, * } object StringPlusConfusion { // Would love to do something about this error message, but by the diff --git a/tests/untried/neg/protected-constructors.scala b/tests/untried/neg/protected-constructors.scala index 2838caf09c83..83638a01ebe3 100644 --- a/tests/untried/neg/protected-constructors.scala +++ b/tests/untried/neg/protected-constructors.scala @@ -7,7 +7,7 @@ package dingus { } package hungus { - import dingus._ + import dingus.* object P { class Bar1 extends Foo1("abc") diff --git a/tests/untried/neg/saferJavaConversions.scala b/tests/untried/neg/saferJavaConversions.scala index f0611204e6b5..ee2422074d01 100644 --- a/tests/untried/neg/saferJavaConversions.scala +++ b/tests/untried/neg/saferJavaConversions.scala @@ -3,17 +3,17 @@ case class Foo(s: String) object Test { def f1 = { - import scala.collection.JavaConversions._ + import scala.collection.JavaConversions.* val map: Map[Foo, String] = Map(Foo("a") -> "a", Foo("b") -> "b") val v = map.get("a") // should be a type error, actually returns null } def f2 = { - import scala.collection.convert.wrapAsScala._ + import scala.collection.convert.wrapAsScala.* val map: Map[Foo, String] = Map(Foo("a") -> "a", Foo("b") -> "b") val v = map.get("a") // now this is a type error } def f3 = { - import scala.collection.convert.wrapAsJava._ + import scala.collection.convert.wrapAsJava.* val map: Map[Foo, String] = Map(Foo("a") -> "a", Foo("b") -> "b") val v = map.get("a") } diff --git a/tests/untried/neg/sealed-java-enums.scala b/tests/untried/neg/sealed-java-enums.scala index 2daf93f3088d..33d6ea495907 100644 --- a/tests/untried/neg/sealed-java-enums.scala +++ b/tests/untried/neg/sealed-java-enums.scala @@ -1,5 +1,5 @@ import java.lang.Thread.State -import java.lang.Thread.State._ +import java.lang.Thread.State.* object Test { def f(state: State) = state match { diff --git a/tests/untried/neg/suggest-similar.scala b/tests/untried/neg/suggest-similar.scala index ff327478fe10..d684ba3134fb 100644 --- a/tests/untried/neg/suggest-similar.scala +++ b/tests/untried/neg/suggest-similar.scala @@ -2,7 +2,7 @@ class Dingus object Dingus { var flippity = 1 } -import Dingus._ +import Dingus.* class A { flippitx = 123 diff --git a/tests/untried/neg/t1038.scala b/tests/untried/neg/t1038.scala index 367022965b99..56ff9d1484f3 100644 --- a/tests/untried/neg/t1038.scala +++ b/tests/untried/neg/t1038.scala @@ -2,7 +2,7 @@ class X(x : Int) object Y { val a = new X - import a._ + import a.* implicit val b : Int = 1 implicit val c = 2 } diff --git a/tests/untried/neg/t1845.scala b/tests/untried/neg/t1845.scala index 4d3966484ded..8153cb3bf576 100644 --- a/tests/untried/neg/t1845.scala +++ b/tests/untried/neg/t1845.scala @@ -3,7 +3,7 @@ trait TokenParsers { val lexical: Tokens } class MyTokenParsers extends TokenParsers { - import lexical._ + import lexical.* val lexical = new Tokens diff --git a/tests/untried/neg/t2031.scala b/tests/untried/neg/t2031.scala index fde7a603fa60..90e94ecd70e6 100644 --- a/tests/untried/neg/t2031.scala +++ b/tests/untried/neg/t2031.scala @@ -1,4 +1,4 @@ -import scala.collection.immutable._ +import scala.collection.immutable.* object Test extends App { val res0 = TreeSet(1, 2, 3) diff --git a/tests/untried/neg/t2206.scala b/tests/untried/neg/t2206.scala index 529f5030b5f2..c4abb9d11742 100644 --- a/tests/untried/neg/t2206.scala +++ b/tests/untried/neg/t2206.scala @@ -5,7 +5,7 @@ object o { def f(): Unit = { } } - import Implicits._ + import Implicits.* val a = new A a.f() diff --git a/tests/untried/neg/t2405.scala b/tests/untried/neg/t2405.scala index c005e7a54313..8463f9bf9a2b 100644 --- a/tests/untried/neg/t2405.scala +++ b/tests/untried/neg/t2405.scala @@ -3,7 +3,7 @@ object A { implicit val x: Int = 1 } // Expecting shadowing #1 object Test2 { { - import A.{x => y} + import A.{x as y} def y: Int = 0 implicitly[Int] } diff --git a/tests/untried/neg/t2442/t2442.scala b/tests/untried/neg/t2442/t2442.scala index 305c9d624f82..6ec46cf43d03 100644 --- a/tests/untried/neg/t2442/t2442.scala +++ b/tests/untried/neg/t2442/t2442.scala @@ -1,5 +1,5 @@ class Test { - import MyEnum._ + import MyEnum.* def f(e: MyEnum) = e match { case ONE => println("one") @@ -7,7 +7,7 @@ class Test { // missing case --> exhaustivity warning! } - import MySecondEnum._ + import MySecondEnum.* def g(e: MySecondEnum) = e match { case RED => println("red") // missing case --> exhaustivity warning! diff --git a/tests/untried/neg/t2641.scala b/tests/untried/neg/t2641.scala index bc048e039ecf..c46ff0f6eff8 100644 --- a/tests/untried/neg/t2641.scala +++ b/tests/untried/neg/t2641.scala @@ -1,5 +1,5 @@ -import scala.collection._ -import scala.collection.generic._ +import scala.collection.* +import scala.collection.generic.* import scala.collection.mutable.Builder diff --git a/tests/untried/neg/t3160ambiguous.scala b/tests/untried/neg/t3160ambiguous.scala index 57745e60d8c6..6b4b5415988f 100644 --- a/tests/untried/neg/t3160ambiguous.scala +++ b/tests/untried/neg/t3160ambiguous.scala @@ -2,14 +2,14 @@ object Bippy { private class List[+T] } class Bippy { - import Bippy._ - import scala.collection.immutable._ + import Bippy.* + import scala.collection.immutable.* def f(x: List[Any]): String = ??? // ambiguous, because Bippy.List is accessible } class Other { - import Bippy._ - import scala.collection.immutable._ + import Bippy.* + import scala.collection.immutable.* def f(x: List[Any]): String = ??? // unambiguous, because Bippy.List is inaccessible } diff --git a/tests/untried/neg/t3403.scala b/tests/untried/neg/t3403.scala index 7cf0c3e0f7fc..815348d28729 100644 --- a/tests/untried/neg/t3403.scala +++ b/tests/untried/neg/t3403.scala @@ -1,2 +1,2 @@ -import scala.beans.{BeanProperty => bp} +import scala.beans.{BeanProperty as bp} class Foo { @bp var bar: Int = 1 } diff --git a/tests/untried/neg/t3453.scala b/tests/untried/neg/t3453.scala index af778189408f..dab38bcd72f6 100644 --- a/tests/untried/neg/t3453.scala +++ b/tests/untried/neg/t3453.scala @@ -24,7 +24,7 @@ object O { } class T2a { - import O._ + import O.* def x: B = { val aToB = 3 diff --git a/tests/untried/neg/t3836.scala b/tests/untried/neg/t3836.scala index a68f6e172f94..57b8d86e0e14 100644 --- a/tests/untried/neg/t3836.scala +++ b/tests/untried/neg/t3836.scala @@ -10,8 +10,8 @@ package object baz { } package baz { - import java.io._ - import foo.bar._ + import java.io.* + import foo.bar.* object Test { def f = new IOException // genuinely different @@ -19,8 +19,8 @@ package baz { } package baz2 { - import bar._ - import baz._ + import bar.* + import baz.* object Test2 { def f: Bippy[Int] = ??? diff --git a/tests/untried/neg/t3871b.scala b/tests/untried/neg/t3871b.scala index b490b7789ade..8475145bbb0e 100644 --- a/tests/untried/neg/t3871b.scala +++ b/tests/untried/neg/t3871b.scala @@ -22,7 +22,7 @@ if one of the following applies: object E { val e = new E - import e._ + import e.* def n(a: A, b: B, c: C) = { b.protE // 1c c.protE // 1c @@ -53,7 +53,7 @@ class E { A.this.protT } - import A._ + import A.* // 0a protO // 3 @@ -115,7 +115,7 @@ class E { class Other { val e = new E - import e._ + import e.* def n(a: A, b: B, c: C) = { b.prot // not allowed c.prot // not allowed diff --git a/tests/untried/neg/t4079/t4079_1.scala b/tests/untried/neg/t4079/t4079_1.scala index cbae8647888b..0ec25fbfe0e9 100644 --- a/tests/untried/neg/t4079/t4079_1.scala +++ b/tests/untried/neg/t4079/t4079_1.scala @@ -28,6 +28,6 @@ object Functors { } object Main { - import Functors._ + import Functors.* val cf = Cat.compose[List,Option].Functor } diff --git a/tests/untried/neg/t4831.scala b/tests/untried/neg/t4831.scala index 82346ec57dc0..b3cc6d63f0a3 100644 --- a/tests/untried/neg/t4831.scala +++ b/tests/untried/neg/t4831.scala @@ -3,7 +3,7 @@ object O { val b = 1 } -import O.{a => b} +import O.{a as b} import O.b object test { diff --git a/tests/untried/neg/t5376.scala b/tests/untried/neg/t5376.scala index 99e5cf1a1340..8f36952276fa 100644 --- a/tests/untried/neg/t5376.scala +++ b/tests/untried/neg/t5376.scala @@ -5,8 +5,8 @@ object Test { // Import two implicits with the same name in the same scope. def m1 = { - import O1._ - import O2._ + import O1.* + import O2.* // Implicit usage compiles. "a": Int @@ -15,8 +15,8 @@ object Test { // Import one implicit and one non-implicit method with the // same name in the same scope. def m2 = { - import O1._ - import O3._ + import O1.* + import O3.* // Implicit usage compiles. "a": Int diff --git a/tests/untried/neg/t5580b.scala b/tests/untried/neg/t5580b.scala index 2161da45849c..3ea4689f153a 100644 --- a/tests/untried/neg/t5580b.scala +++ b/tests/untried/neg/t5580b.scala @@ -1,5 +1,5 @@ import scala.collection.mutable.WeakHashMap -import scala.collection.JavaConversions._ +import scala.collection.JavaConversions.* class bar { } diff --git a/tests/untried/neg/t5821.scala b/tests/untried/neg/t5821.scala index 4af0a2bf7f26..b3dd672940a7 100644 --- a/tests/untried/neg/t5821.scala +++ b/tests/untried/neg/t5821.scala @@ -1,4 +1,4 @@ -import SthImportant._ +import SthImportant.* class Bar diff --git a/tests/untried/neg/t6083.scala b/tests/untried/neg/t6083.scala index 1de18e65279e..4a54baf4eff1 100644 --- a/tests/untried/neg/t6083.scala +++ b/tests/untried/neg/t6083.scala @@ -1,7 +1,7 @@ object conv { implicit def i2s(i: Int): String = "" } -import conv._ +import conv.* class annot(value: String) extends annotation.ClassfileAnnotation @annot(101) class C diff --git a/tests/untried/neg/t6375.scala b/tests/untried/neg/t6375.scala index 21634df6882d..1ac49d6373f5 100644 --- a/tests/untried/neg/t6375.scala +++ b/tests/untried/neg/t6375.scala @@ -1,4 +1,4 @@ -import scala.annotation.meta._ +import scala.annotation.meta.* class Bippy extends scala.annotation.StaticAnnotation diff --git a/tests/untried/neg/t639.scala b/tests/untried/neg/t639.scala index eaeed944a4c9..c64750333aa7 100644 --- a/tests/untried/neg/t639.scala +++ b/tests/untried/neg/t639.scala @@ -1,6 +1,6 @@ package foo123 -import a._ +import a.* @B class C diff --git a/tests/untried/neg/t6436.scala b/tests/untried/neg/t6436.scala index 2c4050253885..ccb69fc02fd2 100644 --- a/tests/untried/neg/t6436.scala +++ b/tests/untried/neg/t6436.scala @@ -4,6 +4,6 @@ object quasiquotes { } object Test extends App { - import quasiquotes._ + import quasiquotes.* println(q"a") } diff --git a/tests/untried/neg/t6436b.scala b/tests/untried/neg/t6436b.scala index 8023329e9051..5f8edf6683a5 100644 --- a/tests/untried/neg/t6436b.scala +++ b/tests/untried/neg/t6436b.scala @@ -4,6 +4,6 @@ object quasiquotes { } object Test extends App { - import quasiquotes._ + import quasiquotes.* println(StringContext("a").q()) } diff --git a/tests/untried/neg/t6535.scala b/tests/untried/neg/t6535.scala index 30a750311c16..096a93a0bcea 100644 --- a/tests/untried/neg/t6535.scala +++ b/tests/untried/neg/t6535.scala @@ -1,5 +1,5 @@ object As { - import Bs.B._ + import Bs.B.* object A extends scala.AnyRef // needed for the cycle; @@ -8,7 +8,7 @@ object As { } object Bs { - import As.A._ + import As.A.* object B extends scala.AnyRef // scala.Immutable, ... diff --git a/tests/untried/neg/t6963a.scala b/tests/untried/neg/t6963a.scala index 6808e541bb9d..6c574cd20d49 100644 --- a/tests/untried/neg/t6963a.scala +++ b/tests/untried/neg/t6963a.scala @@ -1,5 +1,5 @@ object Test { - import scala.collection.mutable._ + import scala.collection.mutable.* List(1,2,3,4,5).scanRight(0)(_+_) } diff --git a/tests/untried/neg/t7285.scala b/tests/untried/neg/t7285.scala index 14121d92b1b3..3ca02d145a65 100644 --- a/tests/untried/neg/t7285.scala +++ b/tests/untried/neg/t7285.scala @@ -46,7 +46,7 @@ object Test4 { case object Up extends Base } - import Test4.Base._ + import Test4.Base.* (d1: Base, d2: Base) => (d1, d2) match { case (Up, Up) | (Down, Down) => false diff --git a/tests/untried/neg/t7494-after-terminal/ThePlugin.scala b/tests/untried/neg/t7494-after-terminal/ThePlugin.scala index e8de8132ec42..d35694adc709 100644 --- a/tests/untried/neg/t7494-after-terminal/ThePlugin.scala +++ b/tests/untried/neg/t7494-after-terminal/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "afterterminal" val description = "Declares one plugin that wants to be after the terminal phase" diff --git a/tests/untried/neg/t7494-before-parser/ThePlugin.scala b/tests/untried/neg/t7494-before-parser/ThePlugin.scala index bb335c9c9dcd..47693998a9d8 100644 --- a/tests/untried/neg/t7494-before-parser/ThePlugin.scala +++ b/tests/untried/neg/t7494-before-parser/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "beforeparser" val description = "Declares one plugin that wants to be before the parser phase" diff --git a/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala b/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala index cb9e86e90675..db83e4553421 100644 --- a/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala +++ b/tests/untried/neg/t7494-multi-right-after/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "multi-rafter" val description = "" diff --git a/tests/untried/neg/t7494-right-after-before/ThePlugin.scala b/tests/untried/neg/t7494-right-after-before/ThePlugin.scala index 967c1fb30705..f0d3425eb873 100644 --- a/tests/untried/neg/t7494-right-after-before/ThePlugin.scala +++ b/tests/untried/neg/t7494-right-after-before/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "rafter-before-1" val description = "" diff --git a/tests/untried/neg/t7494-right-after-terminal/ThePlugin.scala b/tests/untried/neg/t7494-right-after-terminal/ThePlugin.scala index 7c4d084582de..52ceff6311ae 100644 --- a/tests/untried/neg/t7494-right-after-terminal/ThePlugin.scala +++ b/tests/untried/neg/t7494-right-after-terminal/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "rightafterterminal" val description = "Declares one plugin that wants to be right after the terminal phase" diff --git a/tests/untried/neg/t7622-cyclic-dependency/ThePlugin.scala b/tests/untried/neg/t7622-cyclic-dependency/ThePlugin.scala index 8074966bb628..7c71f1ca3b50 100644 --- a/tests/untried/neg/t7622-cyclic-dependency/ThePlugin.scala +++ b/tests/untried/neg/t7622-cyclic-dependency/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "cyclicdependency" val description = "Declares two phases that have a cyclic dependency" diff --git a/tests/untried/neg/t7622-missing-dependency/ThePlugin.scala b/tests/untried/neg/t7622-missing-dependency/ThePlugin.scala index 0fcbc6309ad6..6432cb5fdb6f 100644 --- a/tests/untried/neg/t7622-missing-dependency/ThePlugin.scala +++ b/tests/untried/neg/t7622-missing-dependency/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "myplugin" val description = "Declares one plugin with a missing requirement" diff --git a/tests/untried/neg/t7622-multi-followers/ThePlugin.scala b/tests/untried/neg/t7622-multi-followers/ThePlugin.scala index 36ee84f94a3f..2b5d528fcf8b 100644 --- a/tests/untried/neg/t7622-multi-followers/ThePlugin.scala +++ b/tests/untried/neg/t7622-multi-followers/ThePlugin.scala @@ -7,7 +7,7 @@ import nsc.plugins.Plugin import nsc.plugins.PluginComponent class ThePlugin(val global: Global) extends Plugin { - import global._ + import global.* val name = "multi" val description = "Declares two phases that both follow parser" diff --git a/tests/untried/neg/t7715.scala b/tests/untried/neg/t7715.scala index 637ab8df6d81..d030a629b3ff 100644 --- a/tests/untried/neg/t7715.scala +++ b/tests/untried/neg/t7715.scala @@ -1,6 +1,6 @@ import PartialFunction.cond -import util._ +import util.* object Test extends App { val days = (1 to 12).toList diff --git a/tests/untried/neg/t8072.scala b/tests/untried/neg/t8072.scala index dddb8c5f207a..7d3bf015a1e9 100644 --- a/tests/untried/neg/t8072.scala +++ b/tests/untried/neg/t8072.scala @@ -1,5 +1,5 @@ class NoIfParSeq { - import collection.parallel._ + import collection.parallel.* val x = List(1,2) val y = x.ifParSeq[Int](throw new Exception).otherwise(0) // Shouldn't compile val z = x.toParArray diff --git a/tests/untried/neg/t8229.scala b/tests/untried/neg/t8229.scala index 91966311e2d0..64c0ae3b91ca 100644 --- a/tests/untried/neg/t8229.scala +++ b/tests/untried/neg/t8229.scala @@ -1,4 +1,4 @@ -import Predef.{any2stringadd => _, _} +import Predef.{any2stringadd as _, *} object Test { val o = new Object() diff --git a/tests/untried/neg/t8300-overloading.scala b/tests/untried/neg/t8300-overloading.scala index 0f4eee7b4211..7ee5d0855475 100644 --- a/tests/untried/neg/t8300-overloading.scala +++ b/tests/untried/neg/t8300-overloading.scala @@ -9,7 +9,7 @@ trait Universe { object Test extends App { val u: Universe = ??? - import u._ + import u.* def foo(name: Name) = ??? def foo(name: TermName) = ??? diff --git a/tests/untried/neg/test-implicits.scala b/tests/untried/neg/test-implicits.scala index 5cb09804c74e..4e0028e3823a 100644 --- a/tests/untried/neg/test-implicits.scala +++ b/tests/untried/neg/test-implicits.scala @@ -14,8 +14,8 @@ object Sub extends Super { } object Test { - import Super._ - import Sub._ + import Super.* + import Sub.* val p = new Pos def f(x: Int): Int = x f(p + 1) @@ -67,7 +67,7 @@ class Test3 { val a = 0 { - import X._ + import X.* a } } diff --git a/tests/untried/neg/viewtest.scala b/tests/untried/neg/viewtest.scala index 5e7d624d2307..2c40da6c8a0e 100644 --- a/tests/untried/neg/viewtest.scala +++ b/tests/untried/neg/viewtest.scala @@ -84,7 +84,7 @@ case class Str(elem: String) extends Ordered[Str] { } object Test { - import O._ + import O.* private def toCharList(s: String): List[Char] = if (s.length() == 0) List() diff --git a/tests/untried/neg/warn-unused-imports.scala b/tests/untried/neg/warn-unused-imports.scala index b7a2f1c414ea..4b1c1183dcba 100644 --- a/tests/untried/neg/warn-unused-imports.scala +++ b/tests/untried/neg/warn-unused-imports.scala @@ -97,7 +97,7 @@ trait Nested { { import p1._ // warn trait Warn { // warn about unused local trait for good measure - import p2._ + import p2.* println(new A) println("abc".bippy) } diff --git a/tests/untried/pos/t595.scala b/tests/untried/pos/t595.scala index 44124c90c912..008b6d2ad6d2 100644 --- a/tests/untried/pos/t595.scala +++ b/tests/untried/pos/t595.scala @@ -1,5 +1,5 @@ package lampion.scala; -import _root_.scala.collection._ +import _root_.scala.collection.* class Foo extends mutable.HashMap diff --git a/tests/untried/pos/t8170b.scala b/tests/untried/pos/t8170b.scala index e3d1d33d9b58..1d3addac1e71 100644 --- a/tests/untried/pos/t8170b.scala +++ b/tests/untried/pos/t8170b.scala @@ -1,4 +1,4 @@ -import language._ +import language.* object ScalaZeee { trait HFold[M[_], U] { @@ -15,7 +15,7 @@ object ScalaZeee { } object TypelevelUsage { - import ScalaZeee._ + import ScalaZeee.* type T = GenericCons[Some, String, KNil.type] val klist1: T = ??? type T2 = klist1.Folded[Option, Int, HFold[Option, Int]] diff --git a/tests/untried/pos/viewtest2.scala b/tests/untried/pos/viewtest2.scala index 6dd0389c8e3e..fb51d24936e4 100644 --- a/tests/untried/pos/viewtest2.scala +++ b/tests/untried/pos/viewtest2.scala @@ -83,7 +83,7 @@ case class Str(elem: String) extends Ordered[Str] { } object Test { - import O._ + import O.* private def toCharList(s: String): List[Char] = if (s.length() == 0) List()