diff --git a/.scalafix.conf b/.scalafix.conf index 53fd4b5f589e..b084cb6cba83 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -1,3 +1,3 @@ rules = [OrganizeImports] OrganizeImports.removeUnused = false -OrganizeImports.targetDialect = Scala2 +OrganizeImports.targetDialect = Scala3 diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala b/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala index f2f5865843c8..06ee72f78088 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala @@ -2,8 +2,8 @@ package dotty.tools package backend package jvm -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.report import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala index 0b6dcb7df3c1..62ed65f8ee3c 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala @@ -4,18 +4,18 @@ package jvm import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Constants._ -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Constants.* +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Decorators.em -import dotty.tools.dotc.core.Flags.{Label => LabelFlag, _} -import dotty.tools.dotc.core.Phases._ +import dotty.tools.dotc.core.Flags.{Label as LabelFlag, *} +import dotty.tools.dotc.core.Phases.* import dotty.tools.dotc.core.StdNames.nme import dotty.tools.dotc.core.StdNames.str -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.report import dotty.tools.dotc.transform.Erasure -import dotty.tools.dotc.util.Spans._ +import dotty.tools.dotc.util.Spans.* import scala.annotation.switch import scala.annotation.tailrec diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala b/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala index d24680941535..c06de52916ad 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala @@ -6,21 +6,21 @@ import dotty.tools.backend.jvm.DottyBackendInterface.symExtensions import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.Trees import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Constants._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Constants.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds import dotty.tools.dotc.core.NameKinds.ExpandedName import dotty.tools.dotc.core.Names.Name -import dotty.tools.dotc.core.Phases._ +import dotty.tools.dotc.core.Phases.* import dotty.tools.dotc.core.Signature -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.TypeErasure import dotty.tools.dotc.core.Types -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.report import dotty.tools.dotc.transform.ElimErasedValueType import dotty.tools.dotc.transform.GenericSignatures diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala index ffdb76bfcb24..cfbc07e7c402 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala @@ -6,16 +6,16 @@ import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.TreeTypeMap import dotty.tools.dotc.ast.Trees.SyntheticUnit import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.NameKinds._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.NameKinds.* import dotty.tools.dotc.core.Names.TermName -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.report -import dotty.tools.dotc.util.Spans._ +import dotty.tools.dotc.util.Spans.* import scala.annotation.tailrec import scala.collection.immutable diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala b/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala index 9d6d1f6a1664..380874207ab2 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala @@ -5,7 +5,7 @@ package jvm import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.StdNames.nme -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import scala.collection.immutable import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala b/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala index 6ef9feb3a8ce..8c66080d5e65 100644 --- a/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala +++ b/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala @@ -2,13 +2,13 @@ package dotty.tools package backend package jvm -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Phases +import dotty.tools.dotc.core.Phases.* import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.core.Phases._ import dotty.tools.dotc.core.StdNames -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import scala.annotation.threadUnsafe import scala.collection.mutable diff --git a/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala b/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala index da1fbd593949..1494ac7d491f 100644 --- a/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala +++ b/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala @@ -3,7 +3,7 @@ package dotty.tools.backend.jvm import dotty.tools.dotc.report import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.language.unsafeNulls import scala.tools.asm import scala.tools.asm.Handle diff --git a/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala b/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala index 1702ec146637..21f54cfb4fd7 100644 --- a/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala +++ b/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala @@ -1,6 +1,6 @@ package dotty.tools.backend.jvm -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Decorators.em import dotty.tools.io.AbstractFile import dotty.tools.io.JarArchive @@ -15,7 +15,7 @@ import java.nio.ByteBuffer import java.nio.channels.ClosedByInterruptException import java.nio.channels.FileChannel import java.nio.charset.StandardCharsets.UTF_8 -import java.nio.file._ +import java.nio.file.* import java.nio.file.attribute.FileAttribute import java.util import java.util.concurrent.ConcurrentHashMap @@ -24,7 +24,7 @@ import java.util.zip.Deflater import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream import scala.language.unsafeNulls -import scala.util.chaining._ +import scala.util.chaining.* import BTypes.InternalName diff --git a/compiler/src/dotty/tools/backend/jvm/CodeGen.scala b/compiler/src/dotty/tools/backend/jvm/CodeGen.scala index 1e001b2d99ab..0d5b55c6ddb4 100644 --- a/compiler/src/dotty/tools/backend/jvm/CodeGen.scala +++ b/compiler/src/dotty/tools/backend/jvm/CodeGen.scala @@ -4,8 +4,8 @@ import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.Trees.PackageDef import dotty.tools.dotc.ast.Trees.ValDef import dotty.tools.dotc.ast.tpd +import dotty.tools.dotc.core.* import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.core._ import dotty.tools.dotc.core.tasty.TastyUnpickler import dotty.tools.dotc.interfaces import dotty.tools.dotc.report @@ -20,16 +20,16 @@ import java.io.DataOutputStream import java.nio.channels.ClosedByInterruptException import java.util.Optional import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.language.unsafeNulls import scala.tools.asm -import scala.tools.asm.tree._ +import scala.tools.asm.tree.* -import Contexts._ -import Phases._ -import Symbols._ +import Contexts.* +import Phases.* +import Symbols.* import StdNames.nme -import tpd._ +import tpd.* class CodeGen(val int: DottyBackendInterface, val primitives: DottyPrimitives)( val bTypes: BTypesFromSymbols[int.type]) { self => diff --git a/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala b/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala index e9739e6481c2..725c6f7fc99d 100644 --- a/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala +++ b/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala @@ -1,10 +1,10 @@ package dotty.tools.backend.jvm import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Flags.Trait -import dotty.tools.dotc.core.Phases._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Phases.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase /** Collect all super calls to trait members. diff --git a/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala b/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala index 714c93ceaa2b..6f718ae4f4dc 100644 --- a/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala +++ b/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala @@ -4,7 +4,7 @@ package jvm import dotty.tools.dotc.core.StdNames -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.transform.Erasure import scala.tools.asm.Handle diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index 2b5f2f5472fe..f43612146af7 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -1,22 +1,22 @@ package dotty.tools.backend.jvm import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.report import dotty.tools.dotc.util.ReadOnlyMap import dotty.tools.io.AbstractFile -import java.io.{File => _} +import java.io.File as _ import scala.language.unsafeNulls import scala.reflect.ClassTag -import Contexts._ -import Types._ -import Symbols._ -import Phases._ +import Contexts.* +import Types.* +import Symbols.* +import Phases.* import Decorators.em -import tpd._ +import tpd.* import StdNames.nme import NameKinds.{LazyBitMapName, LazyLocalName} import Names.Name diff --git a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala index aa49388d0dba..887164937c2b 100644 --- a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala +++ b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala @@ -1,17 +1,17 @@ package dotty.tools.backend.jvm import dotty.tools.dotc.CompilationUnit +import dotty.tools.dotc.core.* import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.core._ import dotty.tools.dotc.interfaces.CompilerCallback import dotty.tools.dotc.report -import dotty.tools.io._ +import dotty.tools.io.* import scala.collection.mutable import scala.compiletime.uninitialized -import Contexts._ -import Symbols._ +import Contexts.* +import Symbols.* class GenBCode extends Phase { self => diff --git a/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala b/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala index 527f0cdfff15..de5f5f327c47 100644 --- a/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala +++ b/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala @@ -1,14 +1,14 @@ package dotty.tools.backend.jvm -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Decorators.em import dotty.tools.dotc.core.Phases import dotty.tools.dotc.profile.ThreadPoolFactory import dotty.tools.io.AbstractFile import java.nio.channels.ClosedByInterruptException +import java.util.concurrent.* import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy -import java.util.concurrent._ import scala.collection.mutable.ListBuffer import scala.compiletime.uninitialized import scala.concurrent.Await diff --git a/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala b/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala index 6be94fbc76cf..221f9a0f6cdb 100644 --- a/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala +++ b/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala @@ -1,13 +1,13 @@ package dotty.tools.backend.jvm -import scala.annotation._ +import scala.annotation.* import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.language.unsafeNulls import scala.tools.asm.ClassReader import scala.tools.asm.Handle import scala.tools.asm.Type -import scala.tools.asm.tree._ +import scala.tools.asm.tree.* import scala.util.control.NoStackTrace import scala.util.control.NonFatal diff --git a/compiler/src/dotty/tools/backend/jvm/PostProcessor.scala b/compiler/src/dotty/tools/backend/jvm/PostProcessor.scala index 7d5b156d8d4d..71f9cb4bab3e 100644 --- a/compiler/src/dotty/tools/backend/jvm/PostProcessor.scala +++ b/compiler/src/dotty/tools/backend/jvm/PostProcessor.scala @@ -1,6 +1,6 @@ package dotty.tools.backend.jvm -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Decorators.em import dotty.tools.dotc.util.NoSourcePosition import dotty.tools.dotc.util.SourcePosition diff --git a/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala b/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala index ac3e73a5b035..702476b071ae 100644 --- a/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala +++ b/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala @@ -4,11 +4,11 @@ import dotty.tools.dotc.core.Contexts.Context import dotty.tools.dotc.core.Phases import dotty.tools.dotc.report import dotty.tools.dotc.reporting.Message -import dotty.tools.dotc.util._ +import dotty.tools.dotc.util.* import dotty.tools.io.AbstractFile -import java.util.{Collection => JCollection} -import java.util.{Map => JMap} +import java.util.Collection as JCollection +import java.util.Map as JMap import scala.collection.mutable.Clearable import scala.collection.mutable.HashSet import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala b/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala index 7d7478f36a26..fac7c7d33602 100644 --- a/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala +++ b/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala @@ -4,11 +4,11 @@ package backend.jvm import scala.annotation.threadUnsafe import dotc.ast.Trees.Select -import dotc.ast.tpd._ -import dotc.core._ -import Contexts._ +import dotc.ast.tpd.* +import dotc.core.* +import Contexts.* import Names.TermName -import StdNames._ +import StdNames.* import Types.{JavaArrayType, UnspecifiedErrorType, Type} import Symbols.{Symbol, NoSymbol} import Decorators.em diff --git a/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala b/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala index 937163eda328..36e81955898e 100644 --- a/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala +++ b/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala @@ -1,9 +1,9 @@ package dotty.tools.backend.sjs -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* -import Contexts._ -import Phases._ +import Contexts.* +import Phases.* /** Generates Scala.js IR files for the compilation unit. */ class GenSJSIR extends Phase { diff --git a/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala b/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala index 48aa625ca830..55a4866b138b 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala @@ -3,41 +3,41 @@ package dotty.tools.backend.sjs import dotty.tools.FatalError import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* import dotty.tools.dotc.report import dotty.tools.dotc.transform.Erasure import dotty.tools.dotc.transform.ValueClasses -import dotty.tools.dotc.transform.sjs.JSSymUtils._ +import dotty.tools.dotc.transform.sjs.JSSymUtils.* import dotty.tools.dotc.util.SourcePosition import org.scalajs.ir import org.scalajs.ir.ClassKind +import org.scalajs.ir.Names as jsNames import org.scalajs.ir.Names.ClassName import org.scalajs.ir.Names.MethodName import org.scalajs.ir.Names.SimpleMethodName import org.scalajs.ir.OriginalName import org.scalajs.ir.OriginalName.NoOriginalName import org.scalajs.ir.Position +import org.scalajs.ir.Trees as js import org.scalajs.ir.Trees.OptimizerHints -import org.scalajs.ir.{Names => jsNames} -import org.scalajs.ir.{Trees => js} -import org.scalajs.ir.{Types => jstpe} +import org.scalajs.ir.Types as jstpe import scala.annotation.switch import scala.collection.mutable import scala.language.unsafeNulls import scala.reflect.NameTransformer -import Contexts._ -import Decorators._ -import Flags._ -import Names._ +import Contexts.* +import Decorators.* +import Flags.* +import Names.* import NameKinds.DefaultGetterName -import Types._ -import Symbols._ -import Phases._ -import StdNames._ +import Types.* +import Symbols.* +import Phases.* +import StdNames.* import TypeErasure.ErasedValueType -import JSEncoding._ +import JSEncoding.* import ScopedVar.withScopedVars /** Main codegen for Scala.js IR. diff --git a/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala b/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala index c8371a149ceb..e2977c78fbd8 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala @@ -1,17 +1,17 @@ package dotty.tools.backend.sjs import dotty.tools.dotc.config.SJSPlatform -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* import scala.annotation.threadUnsafe import scala.compiletime.uninitialized import scala.language.unsafeNulls -import Names._ -import Types._ -import Contexts._ -import Symbols._ -import StdNames._ +import Names.* +import Types.* +import Contexts.* +import Symbols.* +import StdNames.* object JSDefinitions { /** The Scala.js-specific definitions for the current context. */ diff --git a/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala b/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala index cf6bce4ef4d5..6ee4e97e31f4 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala @@ -1,8 +1,8 @@ package dotty.tools.backend.sjs import dotty.tools.backend.jvm.DottyBackendInterface.symExtensions -import dotty.tools.dotc.core._ -import dotty.tools.dotc.transform.sjs.JSSymUtils._ +import dotty.tools.dotc.core.* +import dotty.tools.dotc.transform.sjs.JSSymUtils.* import org.scalajs.ir import org.scalajs.ir.Names.ClassName import org.scalajs.ir.Names.FieldName @@ -12,20 +12,20 @@ import org.scalajs.ir.Names.MethodName import org.scalajs.ir.Names.SimpleMethodName import org.scalajs.ir.OriginalName import org.scalajs.ir.OriginalName.NoOriginalName +import org.scalajs.ir.Trees as js +import org.scalajs.ir.Types as jstpe import org.scalajs.ir.UTF8String -import org.scalajs.ir.{Trees => js} -import org.scalajs.ir.{Types => jstpe} import scala.collection.mutable import scala.language.unsafeNulls -import Contexts._ -import Flags._ -import Types._ -import Symbols._ -import NameOps._ -import Names._ -import StdNames._ +import Contexts.* +import Flags.* +import Types.* +import Symbols.* +import NameOps.* +import Names.* +import StdNames.* import JSDefinitions.jsdefn /** Encoding of symbol names for JavaScript diff --git a/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala b/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala index dd0eaf02b71d..d15b2f0a8883 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala @@ -1,36 +1,36 @@ package dotty.tools.backend.sjs -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* import dotty.tools.dotc.report -import dotty.tools.dotc.transform.sjs.JSExportUtils._ -import dotty.tools.dotc.transform.sjs.JSSymUtils._ +import dotty.tools.dotc.transform.sjs.JSExportUtils.* +import dotty.tools.dotc.transform.sjs.JSSymUtils.* import dotty.tools.dotc.util.SourcePosition import dotty.tools.dotc.util.SrcPos +import org.scalajs.ir.Names as jsNames import org.scalajs.ir.Names.DefaultModuleID import org.scalajs.ir.OriginalName.NoOriginalName import org.scalajs.ir.Position import org.scalajs.ir.Position.NoPosition +import org.scalajs.ir.Trees as js import org.scalajs.ir.Trees.OptimizerHints -import org.scalajs.ir.{Names => jsNames} -import org.scalajs.ir.{Trees => js} -import org.scalajs.ir.{Types => jstpe} +import org.scalajs.ir.Types as jstpe import scala.annotation.tailrec import scala.collection.mutable import scala.language.unsafeNulls -import Contexts._ -import Decorators._ -import Denotations._ -import Flags._ -import Names._ +import Contexts.* +import Decorators.* +import Denotations.* +import Flags.* +import Names.* import NameKinds.DefaultGetterName -import NameOps._ -import Phases._ -import Symbols._ -import Types._ +import NameOps.* +import Phases.* +import Symbols.* +import Types.* import TypeErasure.ErasedValueType -import JSEncoding._ +import JSEncoding.* final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) { import jsCodeGen.* diff --git a/compiler/src/dotty/tools/backend/sjs/JSPositions.scala b/compiler/src/dotty/tools/backend/sjs/JSPositions.scala index 1d01e4bd9014..061a6d414fb9 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSPositions.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSPositions.scala @@ -1,6 +1,6 @@ package dotty.tools.backend.sjs -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* import dotty.tools.dotc.report import dotty.tools.dotc.util.SourceFile import dotty.tools.dotc.util.SourcePosition @@ -11,7 +11,7 @@ import java.net.URI import java.net.URISyntaxException import scala.language.unsafeNulls -import Contexts._ +import Contexts.* import Decorators.em /** Conversion utilities from dotty Positions to IR Positions. */ diff --git a/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala b/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala index 4e394cf57ffd..30d3cc828e14 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala @@ -1,15 +1,15 @@ package dotty.tools.backend.sjs import dotty.tools.backend.jvm.DottyPrimitives -import dotty.tools.dotc.ast.tpd._ -import dotty.tools.dotc.core._ +import dotty.tools.dotc.ast.tpd.* +import dotty.tools.dotc.core.* import dotty.tools.dotc.report import dotty.tools.dotc.util.ReadOnlyMap import Names.TermName -import Types._ -import Contexts._ -import Symbols._ +import Types.* +import Contexts.* +import Symbols.* import Decorators.em object JSPrimitives { diff --git a/compiler/src/dotty/tools/dotc/Bench.scala b/compiler/src/dotty/tools/dotc/Bench.scala index 0d1190e6ec93..d3e129c1ef62 100644 --- a/compiler/src/dotty/tools/dotc/Bench.scala +++ b/compiler/src/dotty/tools/dotc/Bench.scala @@ -4,7 +4,7 @@ package dotc import scala.annotation.internal.sharable import scala.compiletime.uninitialized -import core.Contexts._ +import core.Contexts.* import reporting.Reporter import io.AbstractFile diff --git a/compiler/src/dotty/tools/dotc/CompilationUnit.scala b/compiler/src/dotty/tools/dotc/CompilationUnit.scala index 53e33346d007..ba6cbf676094 100644 --- a/compiler/src/dotty/tools/dotc/CompilationUnit.scala +++ b/compiler/src/dotty/tools/dotc/CompilationUnit.scala @@ -4,10 +4,10 @@ package dotc import scala.annotation.internal.sharable import scala.util.control.NoStackTrace -import core._ -import Contexts._ +import core.* +import Contexts.* import SymDenotations.ClassDenotation -import Symbols._ +import Symbols.* import Comments.Comment import util.{FreshNameCreator, SourceFile, NoSource} import util.Spans.Span @@ -15,7 +15,7 @@ import ast.{tpd, untpd} import tpd.{Tree, TreeTraverser} import ast.Trees.{Import, Ident} import typer.Nullables -import core.Decorators._ +import core.Decorators.* import config.{SourceVersion, Feature} import StdNames.nme import transform.MacroAnnotations diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index 51a82f8999ac..575cf28c73da 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -3,12 +3,12 @@ package dotc import dotty.tools.backend -import core._ -import Contexts._ +import core.* +import Contexts.* import typer.{TyperPhase, RefChecks} import parsing.Parser import Phases.Phase -import transform._ +import transform.* import backend.jvm.{CollectSuperCalls, GenBCode} import localopt.StringInterpolatorOpt diff --git a/compiler/src/dotty/tools/dotc/Driver.scala b/compiler/src/dotty/tools/dotc/Driver.scala index 0a56bf56a397..14da2803d02c 100644 --- a/compiler/src/dotty/tools/dotc/Driver.scala +++ b/compiler/src/dotty/tools/dotc/Driver.scala @@ -8,10 +8,10 @@ import scala.util.control.NonFatal import config.CompilerCommand import core.Comments.{ContextDoc, ContextDocstrings} -import core.Contexts._ +import core.Contexts.* import core.{MacroClassLoader, TypeError} -import reporting._ -import core.Decorators._ +import reporting.* +import core.Decorators.* import config.Feature import fromtasty.{TASTYCompiler, TastyFileUtil} diff --git a/compiler/src/dotty/tools/dotc/Resident.scala b/compiler/src/dotty/tools/dotc/Resident.scala index 6cfc8505cbbc..5c47d381aced 100644 --- a/compiler/src/dotty/tools/dotc/Resident.scala +++ b/compiler/src/dotty/tools/dotc/Resident.scala @@ -4,7 +4,7 @@ package dotc import java.io.EOFException import scala.annotation.tailrec -import core.Contexts._ +import core.Contexts.* import reporting.Reporter /** A compiler which stays resident between runs. This is more of a PoC than diff --git a/compiler/src/dotty/tools/dotc/Run.scala b/compiler/src/dotty/tools/dotc/Run.scala index 878edc4ae6cf..aa094435d5d4 100644 --- a/compiler/src/dotty/tools/dotc/Run.scala +++ b/compiler/src/dotty/tools/dotc/Run.scala @@ -11,20 +11,20 @@ import scala.compiletime.uninitialized import scala.io.Codec import scala.util.control.NonFatal -import core._ -import Contexts._ -import Periods._ -import Symbols._ -import Scopes._ +import core.* +import Contexts.* +import Periods.* +import Symbols.* +import Scopes.* import Names.Name import Denotations.Denotation import typer.Typer import typer.ImportInfo.withRootImports -import Decorators._ +import Decorators.* import io.AbstractFile import Phases.{unfusedPhases, Phase} import sbt.interfaces.ProgressCallback -import util._ +import util.* import reporting.{Suppression, Action, Profile, ActiveProfile, NoProfile} import reporting.Diagnostic import reporting.Diagnostic.Warning diff --git a/compiler/src/dotty/tools/dotc/ScalacCommand.scala b/compiler/src/dotty/tools/dotc/ScalacCommand.scala index 2e0d9a08f25d..5f7f80a262d8 100644 --- a/compiler/src/dotty/tools/dotc/ScalacCommand.scala +++ b/compiler/src/dotty/tools/dotc/ScalacCommand.scala @@ -1,6 +1,6 @@ package dotty.tools.dotc -import config.Properties._ +import config.Properties.* import config.CompilerCommand object ScalacCommand extends CompilerCommand: diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index bed4e6764ad8..55e180fe5777 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -5,27 +5,27 @@ package ast import scala.annotation.internal.sharable import scala.annotation.threadUnsafe -import core._ -import util.Spans._ -import Types._ -import Contexts._ -import Constants._ -import Names._ -import NameOps._ -import Flags._ -import Symbols._ -import StdNames._ -import Trees._ -import ContextOps._ -import Decorators._ +import core.* +import util.Spans.* +import Types.* +import Contexts.* +import Constants.* +import Names.* +import NameOps.* +import Flags.* +import Symbols.* +import StdNames.* +import Trees.* +import ContextOps.* +import Decorators.* import Annotations.Annotation import NameKinds.{UniqueName, ContextBoundParamName, ContextFunctionParamName, DefaultGetterName, WildcardParamName} import typer.{Namer, Checking} import util.{Property, SourceFile, SourcePosition, Chars} import config.Feature.{sourceVersion, migrateTo3, enabled} -import config.SourceVersion._ +import config.SourceVersion.* import collection.mutable.ListBuffer -import reporting._ +import reporting.* import annotation.constructorOnly import printing.Formatting.hl import config.Printers diff --git a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala index a2aceea2c6ab..da3e5d0b4f87 100644 --- a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala +++ b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala @@ -4,19 +4,19 @@ package ast import scala.annotation.internal.sharable -import core._ -import util.Spans._ -import Types._ -import Contexts._ -import Constants._ -import Names._ -import Flags._ -import Symbols._ -import StdNames._ -import Trees._ -import Decorators._ +import core.* +import util.Spans.* +import Types.* +import Contexts.* +import Constants.* +import Names.* +import Flags.* +import Symbols.* +import StdNames.* +import Trees.* +import Decorators.* import util.{Property, SourceFile} -import typer.ErrorReporting._ +import typer.ErrorReporting.* import transform.SyntheticMembers.ExtendsSingletonMirror /** Helper methods to desugar enums */ diff --git a/compiler/src/dotty/tools/dotc/ast/MainProxies.scala b/compiler/src/dotty/tools/dotc/ast/MainProxies.scala index e1733b4790ba..799b501c9581 100644 --- a/compiler/src/dotty/tools/dotc/ast/MainProxies.scala +++ b/compiler/src/dotty/tools/dotc/ast/MainProxies.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package ast -import core._ -import Symbols._ -import Types._ -import Contexts._ -import Decorators._ -import util.Spans._ -import Flags._ -import Constants._ +import core.* +import Symbols.* +import Types.* +import Contexts.* +import Decorators.* +import util.Spans.* +import Flags.* +import Constants.* import StdNames.{nme, tpnme} -import ast.Trees._ +import ast.Trees.* import Names.Name import Comments.Comment import NameKinds.DefaultGetterName diff --git a/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala b/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala index a7b4feb80c98..2034f0919f7c 100644 --- a/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala +++ b/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala @@ -5,9 +5,9 @@ import dotty.tools.dotc.core.Types.AnnotatedType import dotty.tools.dotc.core.Types.ImportType import dotty.tools.dotc.core.Types.Type -import core.Contexts._ -import core.Decorators._ -import util.Spans._ +import core.Contexts.* +import core.Decorators.* +import util.Spans.* import Trees.{MemberDef, DefTree, WithLazyFields} /** Utility functions to go from typed to untyped ASTs */ diff --git a/compiler/src/dotty/tools/dotc/ast/Positioned.scala b/compiler/src/dotty/tools/dotc/ast/Positioned.scala index 82c2d1bc7654..47d104e0acec 100644 --- a/compiler/src/dotty/tools/dotc/ast/Positioned.scala +++ b/compiler/src/dotty/tools/dotc/ast/Positioned.scala @@ -4,11 +4,11 @@ package ast import scala.compiletime.uninitialized -import util.Spans._ +import util.Spans.* import util.{SourceFile, SourcePosition, SrcPos} -import core.Contexts._ -import core.Decorators._ -import core.NameOps._ +import core.Contexts.* +import core.Decorators.* +import core.NameOps.* import core.Flags.{JavaDefined, ExtensionMethod} import core.StdNames.nme import ast.Trees.mods diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index 1045b39a2fce..4955c48be068 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -5,18 +5,18 @@ package ast import scala.annotation.tailrec import scala.collection.mutable -import core._ -import Flags._ -import Trees._ -import Types._ -import Contexts._ -import Names._ -import StdNames._ -import NameOps._ -import Symbols._ +import core.* +import Flags.* +import Trees.* +import Types.* +import Contexts.* +import Names.* +import StdNames.* +import NameOps.* +import Symbols.* import typer.ConstFold import reporting.trace -import Decorators._ +import Decorators.* import Constants.Constant trait TreeInfo[T <: Untyped] { self: Trees.Instance[T] => diff --git a/compiler/src/dotty/tools/dotc/ast/TreeMapWithImplicits.scala b/compiler/src/dotty/tools/dotc/ast/TreeMapWithImplicits.scala index df14082c7adf..5603a422a77b 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeMapWithImplicits.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeMapWithImplicits.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package ast -import Trees._ -import core.Contexts._ +import Trees.* +import core.Contexts.* import core.ContextOps.enter -import core.Flags._ -import core.Symbols._ +import core.Flags.* +import core.Symbols.* import core.TypeError /** A TreeMap that maintains the necessary infrastructure to support diff --git a/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala index 5588e6e6268b..fc6a15c6af97 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package ast -import core._ -import Types._ -import Contexts._ -import Flags._ -import Symbols._ -import Annotations._ -import Trees._ -import Symbols._ +import core.* +import Types.* +import Contexts.* +import Flags.* +import Symbols.* +import Annotations.* +import Trees.* +import Symbols.* import Constants.Constant -import Decorators._ +import Decorators.* /** A map that applies three functions and a substitution together to a tree and diff --git a/compiler/src/dotty/tools/dotc/ast/Trees.scala b/compiler/src/dotty/tools/dotc/ast/Trees.scala index 421c27228d9a..59fd49bf0d31 100644 --- a/compiler/src/dotty/tools/dotc/ast/Trees.scala +++ b/compiler/src/dotty/tools/dotc/ast/Trees.scala @@ -2,20 +2,20 @@ package dotty.tools package dotc package ast -import core._ -import Types._ -import Names._ -import NameOps._ -import Flags._ -import util.Spans._ -import Contexts._ -import Constants._ +import core.* +import Types.* +import Names.* +import NameOps.* +import Flags.* +import util.Spans.* +import Contexts.* +import Constants.* import typer.{ ConstFold, ProtoTypes } -import SymDenotations._ -import Symbols._ -import Denotations._ -import StdNames._ -import Comments._ +import SymDenotations.* +import Symbols.* +import Denotations.* +import StdNames.* +import Comments.* import collection.mutable.ListBuffer import printing.Printer import printing.Texts.Text @@ -26,8 +26,8 @@ import annotation.internal.sharable import annotation.unchecked.uncheckedVariance import annotation.constructorOnly import compiletime.uninitialized -import Decorators._ -import staging.StagingLevel._ +import Decorators.* +import staging.StagingLevel.* object Trees { diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index 0bbe7bfac831..9e742dd7276b 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -10,22 +10,22 @@ import scala.collection.mutable.ListBuffer import scala.compiletime.uninitialized import typer.ProtoTypes -import core._ +import core.* import Scopes.newScope -import util.Spans._ -import Types._ -import Contexts._ -import Constants._ -import Names._ -import Flags._ -import NameOps._ -import Symbols._ -import StdNames._ -import Annotations._ -import Trees._ -import Symbols._ -import Decorators._ -import DenotTransformers._ +import util.Spans.* +import Types.* +import Contexts.* +import Constants.* +import Names.* +import Flags.* +import NameOps.* +import Symbols.* +import StdNames.* +import Annotations.* +import Trees.* +import Symbols.* +import Decorators.* +import DenotTransformers.* import collection.{immutable, mutable} import util.{Property, SourceFile} import NameKinds.{TempResultName, OuterSelectName} diff --git a/compiler/src/dotty/tools/dotc/ast/untpd.scala b/compiler/src/dotty/tools/dotc/ast/untpd.scala index 51d6f61a6c3c..41b075729191 100644 --- a/compiler/src/dotty/tools/dotc/ast/untpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/untpd.scala @@ -4,20 +4,20 @@ package ast import dotty.tools.dotc.typer.ProtoTypes -import core._ -import Types._ -import Contexts._ -import Constants._ -import Names._ -import Flags._ -import Symbols._ -import StdNames._ -import Trees._ +import core.* +import Types.* +import Contexts.* +import Constants.* +import Names.* +import Flags.* +import Symbols.* +import StdNames.* +import Trees.* import util.{Property, SourceFile, NoSource} import util.Spans.Span import annotation.constructorOnly import annotation.internal.sharable -import Decorators._ +import Decorators.* object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo { diff --git a/compiler/src/dotty/tools/dotc/cc/CaptureAnnotation.scala b/compiler/src/dotty/tools/dotc/cc/CaptureAnnotation.scala index 2182e513a2d7..5cf1dab20400 100644 --- a/compiler/src/dotty/tools/dotc/cc/CaptureAnnotation.scala +++ b/compiler/src/dotty/tools/dotc/cc/CaptureAnnotation.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package cc -import core._ -import Types._ -import Symbols._ -import Contexts._ -import Annotations._ -import ast.Trees._ +import core.* +import Types.* +import Symbols.* +import Contexts.* +import Annotations.* +import ast.Trees.* import ast.{tpd, untpd} -import Decorators._ +import Decorators.* import config.Printers.capt import printing.Printer import printing.Texts.Text diff --git a/compiler/src/dotty/tools/dotc/cc/CaptureOps.scala b/compiler/src/dotty/tools/dotc/cc/CaptureOps.scala index 83fe42bbb52a..fe4604f1bb47 100644 --- a/compiler/src/dotty/tools/dotc/cc/CaptureOps.scala +++ b/compiler/src/dotty/tools/dotc/cc/CaptureOps.scala @@ -2,20 +2,20 @@ package dotty.tools package dotc package cc -import core._ -import Types._ -import Symbols._ -import Contexts._ -import Annotations._ -import Flags._ +import core.* +import Types.* +import Symbols.* +import Contexts.* +import Annotations.* +import Flags.* import Names.TermName import ast.{tpd, untpd} -import Decorators._ -import NameOps._ +import Decorators.* +import NameOps.* import config.SourceVersion import config.Printers.capt import util.Property.Key -import tpd._ +import tpd.* import StdNames.nme import config.Feature import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala b/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala index 1cab07a39736..2e491b97bc52 100644 --- a/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala +++ b/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala @@ -4,12 +4,12 @@ package cc import scala.collection.mutable -import core._ -import Types._ -import Symbols._ -import Flags._ -import Contexts._ -import Decorators._ +import core.* +import Types.* +import Symbols.* +import Flags.* +import Contexts.* +import Decorators.* import config.Printers.{capt, captDebug} import Annotations.Annotation import annotation.threadUnsafe @@ -17,7 +17,7 @@ import annotation.constructorOnly import annotation.internal.sharable import reporting.trace import printing.{Showable, Printer} -import printing.Texts._ +import printing.Texts.* import util.{SimpleIdentitySet, Property} import typer.ErrorReporting.Addenda import util.common.alwaysTrue diff --git a/compiler/src/dotty/tools/dotc/cc/CapturingType.scala b/compiler/src/dotty/tools/dotc/cc/CapturingType.scala index e73f04f76e6f..4220065d35d7 100644 --- a/compiler/src/dotty/tools/dotc/cc/CapturingType.scala +++ b/compiler/src/dotty/tools/dotc/cc/CapturingType.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package cc -import core._ -import Types._ -import Symbols._ -import Contexts._ +import core.* +import Types.* +import Symbols.* +import Contexts.* import Decorators.i /** A (possibly boxed) capturing type. This is internally represented as an annotated type with a @retains diff --git a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala index 669c712bc78d..c7fe8dec420b 100644 --- a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala +++ b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala @@ -4,29 +4,29 @@ package cc import scala.collection.mutable -import core._ -import Phases._ -import DenotTransformers._ -import SymDenotations._ -import Contexts._ -import Names._ -import Flags._ -import Symbols._ -import Decorators._ -import Types._ -import StdNames._ -import Denotations._ +import core.* +import Phases.* +import DenotTransformers.* +import SymDenotations.* +import Contexts.* +import Names.* +import Flags.* +import Symbols.* +import Decorators.* +import Types.* +import StdNames.* +import Denotations.* import config.Printers.{capt, recheckr, noPrinter} import config.{Config, Feature} import ast.{tpd, untpd, Trees} -import Trees._ +import Trees.* import typer.RefChecks.{checkAllOverrides, checkSelfAgainstParents, OverridingPairsChecker} import typer.Checking.{checkBounds, checkAppliedTypesIn} import typer.ErrorReporting.{Addenda, err} import typer.ProtoTypes.{AnySelectionProto, LhsProto} import util.{SimpleIdentitySet, EqHashMap, EqHashSet, SrcPos, Property} import transform.{Recheck, PreRecheck, CapturedVars} -import Recheck._ +import Recheck.* import CaptureSet.{withCaptureSetsExplained, IdempotentCaptRefMap, CompareResult} import StdNames.nme import NameKinds.{DefaultGetterName, WildcardParamName} diff --git a/compiler/src/dotty/tools/dotc/cc/RetainingType.scala b/compiler/src/dotty/tools/dotc/cc/RetainingType.scala index fffc2cc5f47b..ab58d1f99975 100644 --- a/compiler/src/dotty/tools/dotc/cc/RetainingType.scala +++ b/compiler/src/dotty/tools/dotc/cc/RetainingType.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package cc -import core._ -import Types._ -import Symbols._ -import Contexts._ -import ast.tpd._ +import core.* +import Types.* +import Symbols.* +import Contexts.* +import ast.tpd.* import Annotations.Annotation import Decorators.i diff --git a/compiler/src/dotty/tools/dotc/cc/Setup.scala b/compiler/src/dotty/tools/dotc/cc/Setup.scala index e3e2bd07c8ec..bf9ae29e0734 100644 --- a/compiler/src/dotty/tools/dotc/cc/Setup.scala +++ b/compiler/src/dotty/tools/dotc/cc/Setup.scala @@ -2,24 +2,24 @@ package dotty.tools package dotc package cc -import core._ -import Phases._ -import DenotTransformers._ -import SymDenotations._ -import Contexts._ -import Names._ -import Flags._ -import Symbols._ -import Decorators._ -import Types._ -import StdNames._ +import core.* +import Phases.* +import DenotTransformers.* +import SymDenotations.* +import Contexts.* +import Names.* +import Flags.* +import Symbols.* +import Decorators.* +import Types.* +import StdNames.* import Annotations.Annotation import config.Feature import config.Printers.{capt, captDebug} import ast.tpd -import tpd._ +import tpd.* import transform.{PreRecheck, Recheck} -import Recheck._ +import Recheck.* import CaptureSet.{IdentityCaptRefMap, IdempotentCaptRefMap} import Synthetics.isExcluded import util.Property diff --git a/compiler/src/dotty/tools/dotc/cc/Synthetics.scala b/compiler/src/dotty/tools/dotc/cc/Synthetics.scala index 96d4eabb9bc7..c189e710315f 100644 --- a/compiler/src/dotty/tools/dotc/cc/Synthetics.scala +++ b/compiler/src/dotty/tools/dotc/cc/Synthetics.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package cc -import core._ -import Symbols._ -import SymDenotations._ -import Contexts._ -import Flags._ -import Types._ -import Decorators._ +import core.* +import Symbols.* +import SymDenotations.* +import Contexts.* +import Flags.* +import Types.* +import Decorators.* import StdNames.nme import Names.Name import NameKinds.DefaultGetterName diff --git a/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala b/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala index e667c3be0953..9283043a9940 100644 --- a/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala +++ b/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala @@ -3,12 +3,12 @@ */ package dotty.tools.dotc.classpath -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.io.AbstractFile import dotty.tools.io.ClassPath import dotty.tools.io.VirtualDirectory -import FileUtils._ +import FileUtils.* /** * Provides factory methods for classpath. When creating classpath instances for a given path, diff --git a/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala b/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala index f21a15fef46b..21d976d39cef 100644 --- a/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala +++ b/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala @@ -12,17 +12,17 @@ import dotty.tools.io.EfficientClassPath import dotty.tools.io.JDK9Reflectors import dotty.tools.io.PlainFile -import java.io.{File => JFile} +import java.io.File as JFile import java.net.URI import java.net.URL import java.nio.file.FileSystems import java.nio.file.Files import scala.collection.immutable.ArraySeq -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.language.unsafeNulls import scala.util.control.NonFatal -import FileUtils._ +import FileUtils.* import PlainFile.toPlainFile /** diff --git a/compiler/src/dotty/tools/dotc/classpath/FileUtils.scala b/compiler/src/dotty/tools/dotc/classpath/FileUtils.scala index 093d2a402505..b403ee48ed09 100644 --- a/compiler/src/dotty/tools/dotc/classpath/FileUtils.scala +++ b/compiler/src/dotty/tools/dotc/classpath/FileUtils.scala @@ -6,8 +6,8 @@ package dotc.classpath import dotty.tools.io.AbstractFile +import java.io.File as JFile import java.io.FileFilter -import java.io.{File => JFile} import java.net.URL import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala b/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala index 718e6f876fcb..ddf9a3c8fe73 100644 --- a/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala +++ b/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala @@ -9,7 +9,7 @@ import java.net.URI import java.net.URL import scala.language.unsafeNulls -import FileUtils._ +import FileUtils.* case class VirtualDirectoryClassPath(dir: VirtualDirectory) extends ClassPath with DirectoryLookup[ClassFileEntryImpl] with NoSourcePaths { type F = AbstractFile diff --git a/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala b/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala index cdea2edb1a50..3a4b607fb094 100644 --- a/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala +++ b/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala @@ -4,7 +4,7 @@ package dotty.tools.dotc package classpath -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.io.AbstractFile import dotty.tools.io.ClassPath import dotty.tools.io.ClassRepresentation @@ -19,7 +19,7 @@ import java.nio.file.attribute.FileTime import scala.annotation.tailrec import scala.language.unsafeNulls -import FileUtils._ +import FileUtils.* /** * A trait providing an optional cache for classpath entries obtained from zip and jar files. diff --git a/compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala b/compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala index aad243fa2044..d9d97f72e8be 100644 --- a/compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala +++ b/compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala @@ -12,7 +12,7 @@ import java.io.File import java.net.URL import scala.language.unsafeNulls -import FileUtils._ +import FileUtils.* /** * A trait allowing to look for classpath entries of given type in zip and jar files. diff --git a/compiler/src/dotty/tools/dotc/config/CliCommand.scala b/compiler/src/dotty/tools/dotc/config/CliCommand.scala index 37a290126f95..9dfc5d8cc69d 100644 --- a/compiler/src/dotty/tools/dotc/config/CliCommand.scala +++ b/compiler/src/dotty/tools/dotc/config/CliCommand.scala @@ -5,8 +5,8 @@ import scala.PartialFunction.cond import scala.language.unsafeNulls import scala.util.chaining.given -import Settings._ -import core.Contexts._ +import Settings.* +import core.Contexts.* import printing.Highlighting trait CliCommand: diff --git a/compiler/src/dotty/tools/dotc/config/CommandLineParser.scala b/compiler/src/dotty/tools/dotc/config/CommandLineParser.scala index 5a8aa6334879..13e27ee04601 100644 --- a/compiler/src/dotty/tools/dotc/config/CommandLineParser.scala +++ b/compiler/src/dotty/tools/dotc/config/CommandLineParser.scala @@ -5,7 +5,7 @@ import java.nio.file.Files import java.nio.file.Paths import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* /** Split a line of text using shell conventions. */ diff --git a/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala b/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala index 644896c30e3b..2ffe900fbdbf 100644 --- a/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala +++ b/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc package config -import Settings._ -import core.Contexts._ +import Settings.* +import core.Contexts.* abstract class CompilerCommand extends CliCommand: type ConcreteSettings = ScalaSettings diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 8f2c74b8bf84..ffd68515720a 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package config -import core._ -import Contexts._ -import Symbols._ -import Names._ +import core.* +import Contexts.* +import Symbols.* +import Names.* import StdNames.nme -import Decorators._ +import Decorators.* import util.{SrcPos, NoSourcePosition} -import SourceVersion._ +import SourceVersion.* import reporting.Message import NameKinds.QualifiedName diff --git a/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala b/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala index 2ba42caa43e0..8603b16f1457 100644 --- a/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala +++ b/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package config -import io._ +import io.* import classpath.AggregateClassPath -import core._ -import Symbols._ -import Types._ -import Contexts._ -import StdNames._ -import Flags._ +import core.* +import Symbols.* +import Types.* +import Contexts.* +import StdNames.* +import Flags.* import transform.ExplicitOuter class JavaPlatform extends Platform { diff --git a/compiler/src/dotty/tools/dotc/config/MigrationVersion.scala b/compiler/src/dotty/tools/dotc/config/MigrationVersion.scala index ffc8c232c5e7..4dd9d065395b 100644 --- a/compiler/src/dotty/tools/dotc/config/MigrationVersion.scala +++ b/compiler/src/dotty/tools/dotc/config/MigrationVersion.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package config -import SourceVersion._ -import Feature._ +import SourceVersion.* +import Feature.* import core.Contexts.Context class MigrationVersion( diff --git a/compiler/src/dotty/tools/dotc/config/OutputDirs.scala b/compiler/src/dotty/tools/dotc/config/OutputDirs.scala index 0411c5604768..ba121d06e35a 100644 --- a/compiler/src/dotty/tools/dotc/config/OutputDirs.scala +++ b/compiler/src/dotty/tools/dotc/config/OutputDirs.scala @@ -4,7 +4,7 @@ package config import scala.language.unsafeNulls -import io._ +import io.* /** A class for holding mappings from source directories to * their output location. This functionality can be accessed diff --git a/compiler/src/dotty/tools/dotc/config/PathResolver.scala b/compiler/src/dotty/tools/dotc/config/PathResolver.scala index 67cf251690b8..4fb120d2fd92 100644 --- a/compiler/src/dotty/tools/dotc/config/PathResolver.scala +++ b/compiler/src/dotty/tools/dotc/config/PathResolver.scala @@ -11,8 +11,8 @@ import io.{ClassPath, Directory, Path} import classpath.{AggregateClassPath, ClassPathFactory, JrtClassPath} import ClassPath.split import PartialFunction.condOpt -import core.Contexts._ -import Settings._ +import core.Contexts.* +import Settings.* object PathResolver { diff --git a/compiler/src/dotty/tools/dotc/config/Platform.scala b/compiler/src/dotty/tools/dotc/config/Platform.scala index 71414263f225..a80ed11ad010 100644 --- a/compiler/src/dotty/tools/dotc/config/Platform.scala +++ b/compiler/src/dotty/tools/dotc/config/Platform.scala @@ -3,8 +3,8 @@ package dotc package config import io.{ClassPath, AbstractFile} -import core.Contexts._ -import core.Symbols._ +import core.Contexts.* +import core.Symbols.* import core.SymbolLoader import core.StdNames.nme import core.Flags.Module diff --git a/compiler/src/dotty/tools/dotc/config/Properties.scala b/compiler/src/dotty/tools/dotc/config/Properties.scala index 58259f1beea0..39e6bfa3ff13 100644 --- a/compiler/src/dotty/tools/dotc/config/Properties.scala +++ b/compiler/src/dotty/tools/dotc/config/Properties.scala @@ -4,7 +4,7 @@ package config import java.io.IOException import java.nio.charset.StandardCharsets -import java.util.jar.Attributes.{ Name => AttributeName } +import java.util.jar.Attributes.Name as AttributeName import scala.annotation.internal.sharable import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala b/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala index 3fc882c73b6e..6d856961a9a3 100644 --- a/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala +++ b/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc.config import dotty.tools.backend.sjs.JSDefinitions -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* -import Contexts._ -import Symbols._ +import Contexts.* +import Symbols.* object SJSPlatform { /** The `SJSPlatform` for the current context. */ diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 6fc643022afa..3ffbd73f0465 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -5,7 +5,7 @@ import dotty.tools.dotc.config.PathResolver.Defaults import dotty.tools.dotc.config.Settings.Setting import dotty.tools.dotc.config.Settings.SettingGroup import dotty.tools.dotc.config.SourceVersion -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.rewrites.Rewrites import dotty.tools.io.AbstractFile import dotty.tools.io.Directory @@ -15,7 +15,7 @@ import dotty.tools.io.PlainDirectory import java.util.zip.Deflater import scala.language.unsafeNulls -import scala.util.chaining._ +import scala.util.chaining.* import Setting.ChoiceWithHelp diff --git a/compiler/src/dotty/tools/dotc/config/Settings.scala b/compiler/src/dotty/tools/dotc/config/Settings.scala index 06935b8282e7..97fb756f7966 100644 --- a/compiler/src/dotty/tools/dotc/config/Settings.scala +++ b/compiler/src/dotty/tools/dotc/config/Settings.scala @@ -11,7 +11,7 @@ import scala.language.unsafeNulls import scala.util.Failure import scala.util.Success -import core.Contexts._ +import core.Contexts.* import annotation.tailrec import collection.mutable.ArrayBuffer import reflect.ClassTag diff --git a/compiler/src/dotty/tools/dotc/config/SourceVersion.scala b/compiler/src/dotty/tools/dotc/config/SourceVersion.scala index b58e804b1fbc..7a464d331930 100644 --- a/compiler/src/dotty/tools/dotc/config/SourceVersion.scala +++ b/compiler/src/dotty/tools/dotc/config/SourceVersion.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package config -import core.Decorators._ +import core.Decorators.* import util.Property enum SourceVersion: diff --git a/compiler/src/dotty/tools/dotc/core/Annotations.scala b/compiler/src/dotty/tools/dotc/core/Annotations.scala index 3665068c57cd..70c442bf9358 100644 --- a/compiler/src/dotty/tools/dotc/core/Annotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Annotations.scala @@ -4,13 +4,13 @@ package core import scala.annotation.internal.sharable -import Symbols._ -import Types._ -import Contexts._ -import Constants._ -import Phases._ +import Symbols.* +import Types.* +import Contexts.* +import Constants.* +import Phases.* import ast.tpd -import tpd._ +import tpd.* import util.Spans.Span import printing.{Showable, Printer} import printing.Texts.Text diff --git a/compiler/src/dotty/tools/dotc/core/Atoms.scala b/compiler/src/dotty/tools/dotc/core/Atoms.scala index bcaaf6794107..a68a07947965 100644 --- a/compiler/src/dotty/tools/dotc/core/Atoms.scala +++ b/compiler/src/dotty/tools/dotc/core/Atoms.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package core -import Types._ +import Types.* /** Indicates the singleton types that a type must or may consist of. * @param lo The lower bound: singleton types in this set are guaranteed diff --git a/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala b/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala index 7302071f52e5..7cf912441def 100644 --- a/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala +++ b/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package core -import Contexts._ -import Types._ -import Symbols._ -import Names._ -import Flags._ +import Contexts.* +import Types.* +import Symbols.* +import Names.* +import Flags.* import Denotations.SingleDenotation -import Decorators._ +import Decorators.* import collection.mutable import config.SourceVersion.future import config.Feature.sourceVersion diff --git a/compiler/src/dotty/tools/dotc/core/Comments.scala b/compiler/src/dotty/tools/dotc/core/Comments.scala index af0a36331326..fd3009574f6b 100644 --- a/compiler/src/dotty/tools/dotc/core/Comments.scala +++ b/compiler/src/dotty/tools/dotc/core/Comments.scala @@ -5,11 +5,11 @@ package core import scala.language.unsafeNulls import ast.{ untpd, tpd } -import Symbols._ -import Contexts._ +import Symbols.* +import Contexts.* import util.{SourceFile, ReadOnlyMap} -import util.Spans._ -import util.CommentParsing._ +import util.Spans.* +import util.CommentParsing.* import util.Property.Key import parsing.Parsers.Parser import reporting.ProperDefinitionNotFound diff --git a/compiler/src/dotty/tools/dotc/core/Constants.scala b/compiler/src/dotty/tools/dotc/core/Constants.scala index 76367f880995..313272a684bd 100644 --- a/compiler/src/dotty/tools/dotc/core/Constants.scala +++ b/compiler/src/dotty/tools/dotc/core/Constants.scala @@ -2,9 +2,9 @@ package dotty.tools package dotc package core -import Types._ -import Symbols._ -import Contexts._ +import Types.* +import Symbols.* +import Contexts.* import printing.Printer import printing.Texts.Text diff --git a/compiler/src/dotty/tools/dotc/core/Constraint.scala b/compiler/src/dotty/tools/dotc/core/Constraint.scala index d1efa2590620..5fa98ee873ba 100644 --- a/compiler/src/dotty/tools/dotc/core/Constraint.scala +++ b/compiler/src/dotty/tools/dotc/core/Constraint.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package core -import Types._ -import Contexts._ +import Types.* +import Contexts.* import printing.Showable import util.{SimpleIdentitySet, SimpleIdentityMap} diff --git a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala index 15902eea4579..da94226b34af 100644 --- a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala +++ b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package core -import Types._ -import Contexts._ -import Symbols._ -import Decorators._ -import Flags._ +import Types.* +import Contexts.* +import Symbols.* +import Decorators.* +import Flags.* import config.Config import config.Printers.typr import typer.ProtoTypes.{newTypeVar, representedParamRef} -import UnificationDirection._ +import UnificationDirection.* import NameKinds.AvoidNameKind import util.SimpleIdentitySet import NullOpsDecorator.stripNull diff --git a/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala b/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala index b7053446f2a0..92782f9cd225 100644 --- a/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala +++ b/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala @@ -3,7 +3,7 @@ package core import scala.compiletime.uninitialized -import Contexts._ +import Contexts.* import config.Printers.{default, typr} trait ConstraintRunInfo { self: Run => diff --git a/compiler/src/dotty/tools/dotc/core/ContextOps.scala b/compiler/src/dotty/tools/dotc/core/ContextOps.scala index 921dc4ffcd7b..dd1662a511ca 100644 --- a/compiler/src/dotty/tools/dotc/core/ContextOps.scala +++ b/compiler/src/dotty/tools/dotc/core/ContextOps.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package core -import Contexts._ -import Symbols._ -import Types._ -import Flags._ -import Denotations._ -import SymDenotations._ +import Contexts.* +import Symbols.* +import Types.* +import Flags.* +import Denotations.* +import SymDenotations.* import Names.Name import StdNames.nme import ast.untpd diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index 1a63d4459681..a9fbd94010a6 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -12,27 +12,27 @@ import scala.annotation.internal.sharable import scala.io.Codec import interfaces.CompilerCallback -import Decorators._ -import Periods._ -import Names._ -import Phases._ -import Types._ -import Symbols._ -import Scopes._ -import Uniques._ -import ast.Trees._ +import Decorators.* +import Periods.* +import Names.* +import Phases.* +import Types.* +import Symbols.* +import Scopes.* +import Uniques.* +import ast.Trees.* import ast.untpd import util.{NoSource, SimpleIdentityMap, SourceFile, HashSet, ReusableInstance} import typer.{Implicits, ImportInfo, SearchHistory, SearchRoot, TypeAssigner, Typer, Nullables} import inlines.Inliner -import Nullables._ +import Nullables.* import Implicits.ContextualImplicits -import config.Settings._ +import config.Settings.* import config.Config -import reporting._ +import reporting.* import io.{AbstractFile, NoAbstractFile, PlainFile, Path} import collection.mutable -import printing._ +import printing.* import config.{JavaPlatform, SJSPlatform, Platform, ScalaSettings} import classfile.ReusableDataReader import StdNames.nme @@ -40,7 +40,7 @@ import compiletime.uninitialized import DenotTransformers.DenotTransformer import util.Property.Key import util.Store -import plugins._ +import plugins.* object Contexts { diff --git a/compiler/src/dotty/tools/dotc/core/Decorators.scala b/compiler/src/dotty/tools/dotc/core/Decorators.scala index a2e870a65ef6..82896dacec3f 100644 --- a/compiler/src/dotty/tools/dotc/core/Decorators.scala +++ b/compiler/src/dotty/tools/dotc/core/Decorators.scala @@ -6,13 +6,13 @@ import scala.annotation.tailrec import scala.collection.mutable.ListBuffer import scala.util.control.NonFatal -import Contexts._ -import Names._ -import Phases._ -import Symbols._ +import Contexts.* +import Names.* +import Phases.* +import Symbols.* import printing.{ Printer, Showable } -import printing.Formatting._ -import printing.Texts._ +import printing.Formatting.* +import printing.Texts.* import transform.MegaPhase import reporting.{Message, NoExplanation} diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala index 40673c66a5a8..cdcb22e39927 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -3,23 +3,23 @@ package dotc package core import scala.annotation.tailrec -import scala.annotation.{threadUnsafe => tu} +import scala.annotation.threadUnsafe as tu import scala.collection.mutable import scala.compiletime.uninitialized -import Types._ -import Contexts._ -import Symbols._ -import SymDenotations._ -import StdNames._ -import Names._ -import Phases._ -import Flags._ -import Scopes._ -import Decorators._ -import NameOps._ -import Periods._ -import NullOpsDecorator._ +import Types.* +import Contexts.* +import Symbols.* +import SymDenotations.* +import StdNames.* +import Names.* +import Phases.* +import Flags.* +import Scopes.* +import Decorators.* +import NameOps.* +import Periods.* +import NullOpsDecorator.* import unpickleScala2.Scala2Unpickler.ensureConstructor import collection.mutable import Denotations.{SingleDenotation, staticRef} diff --git a/compiler/src/dotty/tools/dotc/core/DenotTransformers.scala b/compiler/src/dotty/tools/dotc/core/DenotTransformers.scala index 6690cae3a142..59982fb99b5f 100644 --- a/compiler/src/dotty/tools/dotc/core/DenotTransformers.scala +++ b/compiler/src/dotty/tools/dotc/core/DenotTransformers.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package core -import Periods._ -import SymDenotations._ -import Contexts._ -import Types._ -import Symbols._ -import Denotations._ -import Phases._ +import Periods.* +import SymDenotations.* +import Contexts.* +import Types.* +import Symbols.* +import Denotations.* +import Phases.* object DenotTransformers { diff --git a/compiler/src/dotty/tools/dotc/core/Denotations.scala b/compiler/src/dotty/tools/dotc/core/Denotations.scala index e5166b749e83..28c58e1bd6cd 100644 --- a/compiler/src/dotty/tools/dotc/core/Denotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Denotations.scala @@ -5,24 +5,24 @@ package core import scala.compiletime.uninitialized import SymDenotations.{ SymDenotation, ClassDenotation, NoDenotation, LazyType, stillValid, acceptStale, traceInvalid } -import Contexts._ -import Names._ -import NameKinds._ -import StdNames._ +import Contexts.* +import Names.* +import NameKinds.* +import StdNames.* import Symbols.NoSymbol -import Symbols._ -import Types._ -import Periods._ -import Flags._ -import DenotTransformers._ -import Decorators._ -import Signature.MatchDegree._ -import printing.Texts._ +import Symbols.* +import Types.* +import Periods.* +import Flags.* +import DenotTransformers.* +import Decorators.* +import Signature.MatchDegree.* +import printing.Texts.* import printing.Printer import io.AbstractFile import config.Config import config.Printers.overload -import util.common._ +import util.common.* import typer.ProtoTypes.NoViewsAllowed import collection.mutable.ListBuffer diff --git a/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala b/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala index 3906c4a7c36a..9c32058ae816 100644 --- a/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala +++ b/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala @@ -6,14 +6,14 @@ import scala.annotation.internal.sharable import scala.annotation.tailrec import scala.collection.mutable -import Contexts._ -import Decorators._ -import Symbols._ -import Types._ +import Contexts.* +import Decorators.* +import Symbols.* +import Types.* import NameKinds.UniqueName import config.Printers.{gadts, gadtsConstr} import util.{SimpleIdentitySet, SimpleIdentityMap} -import printing._ +import printing.* object GadtConstraint: @sharable val empty: GadtConstraint = diff --git a/compiler/src/dotty/tools/dotc/core/Hashable.scala b/compiler/src/dotty/tools/dotc/core/Hashable.scala index 247e9f01edc2..1db399735e80 100644 --- a/compiler/src/dotty/tools/dotc/core/Hashable.scala +++ b/compiler/src/dotty/tools/dotc/core/Hashable.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package core -import scala.util.hashing.{ MurmurHash3 => hashing } +import scala.util.hashing.MurmurHash3 as hashing -import Types._ +import Types.* import annotation.tailrec object Hashable { diff --git a/compiler/src/dotty/tools/dotc/core/JavaNullInterop.scala b/compiler/src/dotty/tools/dotc/core/JavaNullInterop.scala index 60fc4a4274e0..6244923cfb52 100644 --- a/compiler/src/dotty/tools/dotc/core/JavaNullInterop.scala +++ b/compiler/src/dotty/tools/dotc/core/JavaNullInterop.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package core -import Contexts._ +import Contexts.* import Flags.JavaDefined import StdNames.nme -import Symbols._ -import Types._ +import Symbols.* +import Types.* /** This module defines methods to interpret types of Java symbols, which are implicitly nullable in Java, * as Scala types, which are explicitly nullable. diff --git a/compiler/src/dotty/tools/dotc/core/MacroClassLoader.scala b/compiler/src/dotty/tools/dotc/core/MacroClassLoader.scala index e9661c657754..1fb4676df12b 100644 --- a/compiler/src/dotty/tools/dotc/core/MacroClassLoader.scala +++ b/compiler/src/dotty/tools/dotc/core/MacroClassLoader.scala @@ -1,6 +1,6 @@ package dotty.tools.dotc.core -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.reporting.trace import dotty.tools.dotc.util.Property import dotty.tools.io.ClassPath diff --git a/compiler/src/dotty/tools/dotc/core/MatchTypeTrace.scala b/compiler/src/dotty/tools/dotc/core/MatchTypeTrace.scala index 9f0259cc5800..b5b689f42622 100644 --- a/compiler/src/dotty/tools/dotc/core/MatchTypeTrace.scala +++ b/compiler/src/dotty/tools/dotc/core/MatchTypeTrace.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package core -import Types._ -import Contexts._ -import Symbols._ -import Decorators._ +import Types.* +import Contexts.* +import Symbols.* +import Decorators.* import util.Property import Names.Name diff --git a/compiler/src/dotty/tools/dotc/core/NameKinds.scala b/compiler/src/dotty/tools/dotc/core/NameKinds.scala index 79b6f7bc0c02..bae15eb8e230 100644 --- a/compiler/src/dotty/tools/dotc/core/NameKinds.scala +++ b/compiler/src/dotty/tools/dotc/core/NameKinds.scala @@ -4,12 +4,12 @@ package core import scala.annotation.internal.sharable -import Names._ -import NameOps._ -import StdNames._ -import NameTags._ -import Contexts._ -import Decorators._ +import Names.* +import NameOps.* +import StdNames.* +import NameTags.* +import Contexts.* +import Decorators.* /** Defines possible kinds of NameInfo of a derived name */ object NameKinds { diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index 093f7fc7f560..dd019dae3332 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -7,17 +7,17 @@ import java.security.MessageDigest import scala.io.Codec import Int.MaxValue -import Names._ -import StdNames._ -import Contexts._ -import Symbols._ -import Flags._ -import NameKinds._ -import Types._ +import Names.* +import StdNames.* +import Contexts.* +import Symbols.* +import Flags.* +import NameKinds.* +import Types.* import util.Chars.{isOperatorPart, digit2int} -import Decorators._ -import Definitions._ -import nme._ +import Decorators.* +import Definitions.* +import nme.* object NameOps { diff --git a/compiler/src/dotty/tools/dotc/core/NamerOps.scala b/compiler/src/dotty/tools/dotc/core/NamerOps.scala index ab7613fff6c5..109a225cdfed 100644 --- a/compiler/src/dotty/tools/dotc/core/NamerOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NamerOps.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package core -import Contexts._ -import Symbols._ -import Types._ -import Flags._ -import Scopes._ -import Decorators._ -import Names._ -import NameOps._ +import Contexts.* +import Symbols.* +import Types.* +import Flags.* +import Scopes.* +import Decorators.* +import Names.* +import NameOps.* import SymDenotations.{LazyType, SymDenotation} import StdNames.nme import TypeApplications.EtaExpansion diff --git a/compiler/src/dotty/tools/dotc/core/NullOpsDecorator.scala b/compiler/src/dotty/tools/dotc/core/NullOpsDecorator.scala index 769d32dd0151..4f22f9d31e36 100644 --- a/compiler/src/dotty/tools/dotc/core/NullOpsDecorator.scala +++ b/compiler/src/dotty/tools/dotc/core/NullOpsDecorator.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc package core -import Contexts._ -import Types._ +import Contexts.* +import Types.* /** Defines operations on nullable types and tree. */ object NullOpsDecorator: diff --git a/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala b/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala index ca10332d7db3..a4a5a195d3dd 100644 --- a/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala +++ b/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala @@ -4,15 +4,15 @@ package core import scala.compiletime.uninitialized -import Types._ -import Contexts._ -import Symbols._ -import Decorators._ -import TypeApplications._ +import Types.* +import Contexts.* +import Symbols.* +import Decorators.* +import TypeApplications.* import util.{SimpleIdentitySet, SimpleIdentityMap} import collection.mutable import printing.Printer -import printing.Texts._ +import printing.Texts.* import config.Config import config.Printers.constr import reflect.ClassTag diff --git a/compiler/src/dotty/tools/dotc/core/ParamInfo.scala b/compiler/src/dotty/tools/dotc/core/ParamInfo.scala index e88d6540e64b..e499f718365a 100644 --- a/compiler/src/dotty/tools/dotc/core/ParamInfo.scala +++ b/compiler/src/dotty/tools/dotc/core/ParamInfo.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.core import Names.Name -import Contexts._ +import Contexts.* import Types.Type import Variances.{Variance, varianceToInt} diff --git a/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala b/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala index b0dd15c8f2b7..685c374bcbab 100644 --- a/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala +++ b/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala @@ -4,13 +4,13 @@ package core import dotty.tools.dotc.reporting.trace -import Decorators._ -import Symbols._ -import Types._ -import Flags._ +import Decorators.* +import Symbols.* +import Types.* +import Flags.* import Contexts.ctx import config.Feature.migrateTo3 -import config.Printers._ +import config.Printers.* trait PatternTypeConstrainer { self: TypeComparer => diff --git a/compiler/src/dotty/tools/dotc/core/Periods.scala b/compiler/src/dotty/tools/dotc/core/Periods.scala index ee877fb538d4..019c5932b3c9 100644 --- a/compiler/src/dotty/tools/dotc/core/Periods.scala +++ b/compiler/src/dotty/tools/dotc/core/Periods.scala @@ -1,6 +1,6 @@ package dotty.tools.dotc.core -import Contexts._ +import Contexts.* import Phases.unfusedPhases object Periods { diff --git a/compiler/src/dotty/tools/dotc/core/Phases.scala b/compiler/src/dotty/tools/dotc/core/Phases.scala index 4957b292552e..d92cf9c8657b 100644 --- a/compiler/src/dotty/tools/dotc/core/Phases.scala +++ b/compiler/src/dotty/tools/dotc/core/Phases.scala @@ -3,21 +3,21 @@ package dotc package core import dotty.tools.backend.jvm.GenBCode -import dotty.tools.dotc.transform.MegaPhase._ -import dotty.tools.dotc.transform._ +import dotty.tools.dotc.transform.* +import dotty.tools.dotc.transform.MegaPhase.* import scala.annotation.internal.sharable import scala.collection.mutable.ListBuffer import scala.compiletime.uninitialized import scala.util.control.NonFatal -import Periods._ -import Contexts._ -import DenotTransformers._ -import Denotations._ -import Decorators._ +import Periods.* +import Contexts.* +import DenotTransformers.* +import Denotations.* +import Decorators.* import config.Printers.config -import Periods._ +import Periods.* import parsing.Parser import printing.XprintMode import typer.{TyperPhase, RefChecks} diff --git a/compiler/src/dotty/tools/dotc/core/Scopes.scala b/compiler/src/dotty/tools/dotc/core/Scopes.scala index e6df7d051c41..7f0557cb2f0e 100644 --- a/compiler/src/dotty/tools/dotc/core/Scopes.scala +++ b/compiler/src/dotty/tools/dotc/core/Scopes.scala @@ -9,14 +9,14 @@ package core import scala.compiletime.uninitialized -import Symbols._ +import Symbols.* import Types.{TermRef, NoPrefix} -import Flags._ -import Names._ -import Contexts._ -import Phases._ -import Denotations._ -import printing.Texts._ +import Flags.* +import Names.* +import Contexts.* +import Phases.* +import Denotations.* +import printing.Texts.* import printing.Printer import SymDenotations.NoDenotation import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/core/Signature.scala b/compiler/src/dotty/tools/dotc/core/Signature.scala index c69805e7c28f..920be5d7e29a 100644 --- a/compiler/src/dotty/tools/dotc/core/Signature.scala +++ b/compiler/src/dotty/tools/dotc/core/Signature.scala @@ -3,13 +3,13 @@ package core import scala.annotation.tailrec -import Names._ -import Types._ -import Contexts._ -import StdNames._ -import Decorators._ +import Names.* +import Types.* +import Contexts.* +import StdNames.* +import Decorators.* import TypeErasure.sigName -import Signature._ +import Signature.* /** The signature of a denotation. * diff --git a/compiler/src/dotty/tools/dotc/core/StdNames.scala b/compiler/src/dotty/tools/dotc/core/StdNames.scala index e43323745ab5..5ce432b30663 100644 --- a/compiler/src/dotty/tools/dotc/core/StdNames.scala +++ b/compiler/src/dotty/tools/dotc/core/StdNames.scala @@ -5,9 +5,9 @@ import scala.annotation.internal.sharable import scala.annotation.switch import scala.collection.mutable -import Names._ -import Symbols._ -import Contexts._ +import Names.* +import Symbols.* +import Contexts.* object StdNames { diff --git a/compiler/src/dotty/tools/dotc/core/Substituters.scala b/compiler/src/dotty/tools/dotc/core/Substituters.scala index 245dad97c40b..4b0a9278ab10 100644 --- a/compiler/src/dotty/tools/dotc/core/Substituters.scala +++ b/compiler/src/dotty/tools/dotc/core/Substituters.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package core -import Types._ -import Symbols._ -import Contexts._ +import Types.* +import Symbols.* +import Contexts.* import cc.CaptureSet.IdempotentCaptRefMap /** Substitution operations on types. See the corresponding `subst` and diff --git a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala index 840845598e98..e4bd0e05eb2d 100644 --- a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala @@ -9,27 +9,27 @@ import scala.annotation.internal.sharable import scala.compiletime.uninitialized import scala.util.control.NonFatal -import Periods._ -import Contexts._ -import Symbols._ -import Denotations._ -import Names._ -import NameOps._ -import Annotations._ -import Types._ -import Flags._ -import Decorators._ -import DenotTransformers._ -import StdNames._ -import Scopes._ -import NameOps._ -import NameKinds._ +import Periods.* +import Contexts.* +import Symbols.* +import Denotations.* +import Names.* +import NameOps.* +import Annotations.* +import Types.* +import Flags.* +import Decorators.* +import DenotTransformers.* +import StdNames.* +import Scopes.* +import NameOps.* +import NameKinds.* import Phases.{Phase, typerPhase, unfusedPhases} import Constants.Constant import TypeApplications.TypeParamInfo import Scopes.Scope -import Decorators._ -import ast._ +import Decorators.* +import ast.* import ast.Trees.{LambdaTypeTree, TypeBoundsTree} import Trees.Literal import Variances.Variance @@ -37,7 +37,7 @@ import annotation.tailrec import util.SimpleIdentityMap import util.Stats import config.Config -import reporting._ +import reporting.* import collection.mutable import cc.{CapturingType, derivedCapturingType} diff --git a/compiler/src/dotty/tools/dotc/core/SymUtils.scala b/compiler/src/dotty/tools/dotc/core/SymUtils.scala index b3619357f0e5..6f251f052532 100644 --- a/compiler/src/dotty/tools/dotc/core/SymUtils.scala +++ b/compiler/src/dotty/tools/dotc/core/SymUtils.scala @@ -5,20 +5,20 @@ import dotty.tools.dotc.transform.sjs.JSSymUtils.sjsNeedsField import scala.annotation.tailrec -import core._ -import Types._ -import Contexts._ -import Symbols._ -import SymDenotations._ -import Names._ -import NameOps._ -import StdNames._ -import NameKinds._ -import Flags._ -import Decorators._ +import core.* +import Types.* +import Contexts.* +import Symbols.* +import SymDenotations.* +import Names.* +import NameOps.* +import StdNames.* +import NameKinds.* +import Flags.* +import Decorators.* import Constants.Constant import Annotations.Annotation -import Phases._ +import Phases.* import ast.tpd.Literal import transform.Mixin diff --git a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala index 6065c219f1e8..26e8bae5fe04 100644 --- a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala +++ b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala @@ -18,17 +18,17 @@ import java.io.IOException import java.nio.channels.ClosedByInterruptException import scala.util.control.NonFatal -import Contexts._ -import Symbols._ -import Flags._ -import SymDenotations._ -import Types._ -import Scopes._ -import Names._ -import NameOps._ -import StdNames._ +import Contexts.* +import Symbols.* +import Flags.* +import SymDenotations.* +import Types.* +import Scopes.* +import Names.* +import NameOps.* +import StdNames.* import classfile.{ClassfileParser, ClassfileTastyUUIDParser} -import Decorators._ +import Decorators.* import util.Stats import reporting.trace import ast.desugar diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index a622588648a9..ab01e23aa937 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -8,22 +8,22 @@ import dotty.tools.tasty.TastyVersion import scala.annotation.internal.sharable import scala.compiletime.uninitialized -import Periods._ -import Names._ -import Scopes._ -import Flags._ -import Decorators._ -import Contexts._ -import Phases._ -import SymDenotations._ -import Denotations._ -import printing.Texts._ +import Periods.* +import Names.* +import Scopes.* +import Flags.* +import Decorators.* +import Contexts.* +import Phases.* +import SymDenotations.* +import Denotations.* +import printing.Texts.* import printing.Printer -import Types._ -import util.Spans._ -import DenotTransformers._ -import StdNames._ -import NameOps._ +import Types.* +import util.Spans.* +import DenotTransformers.* +import StdNames.* +import NameOps.* import NameKinds.LazyImplicitName import ast.tpd import tpd.{Tree, TreeProvider, TreeOps} diff --git a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala index 39e28353e91b..8145552fac6c 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala @@ -4,13 +4,13 @@ package core import dotty.tools.dotc.config.Config -import Types._ -import Contexts._ -import Symbols._ +import Types.* +import Contexts.* +import Symbols.* import SymDenotations.LazyType -import Decorators._ -import util.Stats._ -import Names._ +import Decorators.* +import util.Stats.* +import Names.* import StdNames.nme import Flags.{Module, Provisional} diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index f0457f99b607..cb9900526a60 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -4,14 +4,14 @@ package core import scala.util.control.NonFatal -import Types._ -import Contexts._ -import Symbols._ -import Flags._ -import Names._ -import NameOps._ -import Denotations._ -import Decorators._ +import Types.* +import Contexts.* +import Symbols.* +import Flags.* +import Names.* +import NameOps.* +import Denotations.* +import Decorators.* import Phases.{gettersPhase, elimByNamePhase} import StdNames.nme import TypeOps.refineUsingParent @@ -22,14 +22,14 @@ import config.Feature.{migrateTo3, sourceVersion} import config.Printers.{subtyping, gadts, matchTypes, noPrinter} import config.SourceVersion import TypeErasure.{erasedLub, erasedGlb} -import TypeApplications._ +import TypeApplications.* import Variances.{Variance, variancesConform} import Constants.Constant import typer.ProtoTypes.constrained import typer.Applications.productSelectorTypes import reporting.trace import annotation.constructorOnly -import cc._ +import cc.* import NameKinds.WildcardParamName /** Provides methods to compare types. diff --git a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala index 1904066a83ce..bcf12fecb756 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala @@ -4,22 +4,22 @@ package core import scala.annotation.tailrec -import Symbols._ -import Types._ -import Contexts._ -import Flags._ -import Names._ -import StdNames._ -import Phases._ +import Symbols.* +import Types.* +import Contexts.* +import Flags.* +import Names.* +import StdNames.* +import Phases.* import Flags.JavaDefined import Uniques.unique import TypeOps.makePackageObjPrefixExplicit import backend.sjs.JSDefinitions -import transform.ExplicitOuter._ -import transform.ValueClasses._ -import transform.ContextFunctionResults._ +import transform.ExplicitOuter.* +import transform.ValueClasses.* +import transform.ContextFunctionResults.* import unpickleScala2.Scala2Erasure -import Decorators._ +import Decorators.* import Definitions.MaxImplementedFunctionArity /** The language in which the definition being erased was written. */ diff --git a/compiler/src/dotty/tools/dotc/core/TypeErrors.scala b/compiler/src/dotty/tools/dotc/core/TypeErrors.scala index 120bf8bde7d2..1881c71d0d04 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErrors.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErrors.scala @@ -4,15 +4,15 @@ package core import scala.annotation.constructorOnly -import Types._ -import Symbols._ -import Flags._ -import Names._ -import Contexts._ -import SymDenotations._ -import Denotations._ -import Decorators._ -import reporting._ +import Types.* +import Symbols.* +import Flags.* +import Names.* +import Contexts.* +import SymDenotations.* +import Denotations.* +import Decorators.* +import reporting.* import ast.untpd import util.Property import config.Printers.{cyclicErrors, noPrinter} diff --git a/compiler/src/dotty/tools/dotc/core/TypeEval.scala b/compiler/src/dotty/tools/dotc/core/TypeEval.scala index 1c85a127952f..44f34c4e5953 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeEval.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeEval.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package core -import Types._ -import Contexts._ -import Symbols._ -import Constants._ -import Decorators._ +import Types.* +import Contexts.* +import Symbols.* +import Constants.* +import Decorators.* import config.Printers.typr import reporting.trace import StdNames.tpnme diff --git a/compiler/src/dotty/tools/dotc/core/TypeOps.scala b/compiler/src/dotty/tools/dotc/core/TypeOps.scala index a20c80b1e130..eefc1cd98497 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeOps.scala @@ -5,25 +5,25 @@ package core import scala.annotation.internal.sharable import scala.annotation.threadUnsafe -import Contexts._ -import Types._ -import Symbols._ -import Names._ -import NameKinds._ -import Flags._ -import SymDenotations._ -import util.Spans._ +import Contexts.* +import Types.* +import Symbols.* +import Names.* +import NameKinds.* +import Flags.* +import SymDenotations.* +import util.Spans.* import util.Stats -import Decorators._ -import StdNames._ +import Decorators.* +import StdNames.* import collection.mutable -import ast.tpd._ +import ast.tpd.* import reporting.trace import config.Printers.typr import config.Feature -import typer.ProtoTypes._ +import typer.ProtoTypes.* import typer.ForceDegree -import typer.Inferencing._ +import typer.Inferencing.* import typer.IfBottom import reporting.TestingReporter import cc.{CapturingType, derivedCapturingType, CaptureSet, isBoxed, isBoxedCapturing} diff --git a/compiler/src/dotty/tools/dotc/core/TypeUtils.scala b/compiler/src/dotty/tools/dotc/core/TypeUtils.scala index 1394cf11285f..9d236a6553d6 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeUtils.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeUtils.scala @@ -3,11 +3,11 @@ package dotc package core import TypeErasure.ErasedValueType -import Types._ -import Contexts._ -import Symbols._ -import Flags._ -import Decorators._ +import Types.* +import Contexts.* +import Symbols.* +import Flags.* +import Decorators.* import Names.Name class TypeUtils { diff --git a/compiler/src/dotty/tools/dotc/core/TyperState.scala b/compiler/src/dotty/tools/dotc/core/TyperState.scala index edf853b44ce3..a4c3d828cc99 100644 --- a/compiler/src/dotty/tools/dotc/core/TyperState.scala +++ b/compiler/src/dotty/tools/dotc/core/TyperState.scala @@ -6,15 +6,15 @@ import java.lang.ref.WeakReference import scala.annotation.internal.sharable import scala.compiletime.uninitialized -import Types._ -import Contexts._ +import Types.* +import Contexts.* import util.SimpleIdentitySet -import reporting._ +import reporting.* import config.Config import config.Printers.constr import collection.mutable import util.{Stats, SimpleIdentityMap} -import Decorators._ +import Decorators.* object TyperState { @sharable private var nextId: Int = 0 diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 8802e93860fb..195e703b943d 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -5,35 +5,35 @@ package core import java.lang.ref.WeakReference import scala.annotation.internal.sharable import scala.annotation.threadUnsafe -import scala.util.hashing.{ MurmurHash3 => hashing } - -import Symbols._ -import Flags._ -import Names._ -import StdNames._ -import NameOps._ -import NullOpsDecorator._ +import scala.util.hashing.MurmurHash3 as hashing + +import Symbols.* +import Flags.* +import Names.* +import StdNames.* +import NameOps.* +import NullOpsDecorator.* import NameKinds.{SkolemName, WildcardParamName} -import Scopes._ -import Constants._ -import Contexts._ -import Phases._ -import Annotations._ -import SymDenotations._ -import Decorators._ -import Denotations._ -import Periods._ -import CheckRealizable._ +import Scopes.* +import Constants.* +import Contexts.* +import Phases.* +import Annotations.* +import SymDenotations.* +import Decorators.* +import Denotations.* +import Periods.* +import CheckRealizable.* import Variances.{Variance, setStructuralVariances, Invariant} import typer.Nullables -import util.Stats._ +import util.Stats.* import util.{SimpleIdentityMap, SimpleIdentitySet} -import ast.tpd._ +import ast.tpd.* import ast.TreeTypeMap -import printing.Texts._ +import printing.Texts.* import printing.Printer -import Hashable._ -import Uniques._ +import Hashable.* +import Uniques.* import collection.mutable import config.Config import config.Feature.sourceVersion diff --git a/compiler/src/dotty/tools/dotc/core/Uniques.scala b/compiler/src/dotty/tools/dotc/core/Uniques.scala index 4ba357b5d7b0..072379ecd358 100644 --- a/compiler/src/dotty/tools/dotc/core/Uniques.scala +++ b/compiler/src/dotty/tools/dotc/core/Uniques.scala @@ -3,13 +3,13 @@ package core import scala.annotation.tailrec -import Types._ -import Contexts._ -import util.Stats._ -import Hashable._ -import Names._ +import Types.* +import Contexts.* +import util.Stats.* +import Hashable.* +import Names.* import config.Config -import Decorators._ +import Decorators.* import util.{WeakHashSet, Stats} import WeakHashSet.Entry diff --git a/compiler/src/dotty/tools/dotc/core/Variances.scala b/compiler/src/dotty/tools/dotc/core/Variances.scala index e53aedc61fa4..899620e752a4 100644 --- a/compiler/src/dotty/tools/dotc/core/Variances.scala +++ b/compiler/src/dotty/tools/dotc/core/Variances.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package core -import Types._ -import Contexts._ -import Flags._ -import Symbols._ -import Annotations._ +import Types.* +import Contexts.* +import Flags.* +import Symbols.* +import Annotations.* import TypeApplications.TypeParamInfo -import Decorators._ +import Decorators.* object Variances { diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index 2753211d0d31..6f72f0a5bdac 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -18,23 +18,23 @@ import scala.compiletime.uninitialized import scala.language.unsafeNulls import scala.util.control.NonFatal -import Contexts._ -import Symbols._ -import Types._ -import Names._ -import StdNames._ -import NameOps._ -import Scopes._ -import Decorators._ -import SymDenotations._ -import unpickleScala2.Scala2Unpickler._ -import Constants._ -import Annotations._ -import util.Spans._ -import Phases._ +import Contexts.* +import Symbols.* +import Types.* +import Names.* +import StdNames.* +import NameOps.* +import Scopes.* +import Decorators.* +import SymDenotations.* +import unpickleScala2.Scala2Unpickler.* +import Constants.* +import Annotations.* +import util.Spans.* +import Phases.* import ast.{ tpd, untpd } -import ast.tpd._ -import util._ +import ast.tpd.* +import util.* import typer.Checking.checkNonCyclic import io.{AbstractFile, ZipArchive} diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala index 4203fcca9690..1312d13d2b6d 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package core.classfile -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.util._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.util.* import dotty.tools.io.AbstractFile import dotty.tools.tasty.TastyReader diff --git a/compiler/src/dotty/tools/dotc/core/tasty/AttributePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/AttributePickler.scala index 1c37cd5bdfe4..a50f375b4ca5 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/AttributePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/AttributePickler.scala @@ -3,7 +3,7 @@ package dotty.tools.dotc.core.tasty import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd import dotty.tools.tasty.TastyBuffer -import dotty.tools.tasty.TastyFormat._ +import dotty.tools.tasty.TastyFormat.* object AttributePickler: diff --git a/compiler/src/dotty/tools/dotc/core/tasty/Attributes.scala b/compiler/src/dotty/tools/dotc/core/tasty/Attributes.scala index 62d9f780d31a..9e7c62ea9b5d 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/Attributes.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/Attributes.scala @@ -1,6 +1,6 @@ package dotty.tools.dotc.core.tasty -import dotty.tools.tasty.TastyFormat._ +import dotty.tools.tasty.TastyFormat.* import scala.collection.immutable.BitSet import scala.collection.immutable.TreeMap diff --git a/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala index 363cefe75f96..1d06a8814580 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala @@ -14,10 +14,10 @@ import dotty.tools.tasty.TastyVersion import scala.language.unsafeNulls -import Contexts._ -import SymDenotations._ -import Decorators._ -import TastyUnpickler._ +import Contexts.* +import SymDenotations.* +import Decorators.* +import TastyUnpickler.* import classfile.ClassfileParser import Names.SimpleName import TreeUnpickler.UnpickleMode diff --git a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala index e83d342b20fe..5e9a3e086f8b 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala @@ -7,11 +7,11 @@ import dotty.tools.tasty.TastyBuffer import scala.io.Codec -import TastyBuffer._ +import TastyBuffer.* import collection.mutable import Names.{Name, chrs, SimpleName, DerivedName, TypeName} -import NameKinds._ -import NameOps._ +import NameKinds.* +import NameOps.* import NameTags.{SIGNED, TARGETSIGNED} class NameBuffer extends TastyBuffer(10000) { diff --git a/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala index 9f294f975778..c29fb4ae1422 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala @@ -7,15 +7,15 @@ import dotty.tools.tasty.TastyBuffer import dotty.tools.tasty.TastyFormat.PositionsSection import dotty.tools.tasty.TastyFormat.SOURCE -import TastyBuffer._ -import ast._ +import TastyBuffer.* +import ast.* import Trees.WithLazyFields import util.{SourceFile, NoSource} -import core._ -import Annotations._ -import Decorators._ +import core.* +import Annotations.* +import Decorators.* import collection.mutable -import util.Spans._ +import util.Spans.* import reporting.Message object PositionPickler: diff --git a/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala index bf5aa255a3a2..13224274eb36 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala @@ -11,7 +11,7 @@ import scala.compiletime.uninitialized import TastyFormat.SOURCE import TastyBuffer.{Addr, NameRef} -import util.Spans._ +import util.Spans.* import Names.TermName /** Unpickler for tree positions */ diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala index 5d75e45dc047..40386605bfa2 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala @@ -7,11 +7,11 @@ import dotty.tools.tasty.TastyFormat.ASTsSection import dotty.tools.tasty.TastyReader import TastyBuffer.NameRef -import Contexts._ -import Decorators._ +import Contexts.* +import Decorators.* import Names.TermName import StdNames.nme -import TastyUnpickler._ +import TastyUnpickler.* /** Reads the package and class name of the class contained in this TASTy */ class TastyClassName(bytes: Array[Byte]) { diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala index 530aa3be6a3c..010d0e5e2794 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala @@ -9,11 +9,11 @@ import dotty.tools.tasty.TastyHash import scala.language.unsafeNulls -import TastyFormat._ -import TastyBuffer._ +import TastyFormat.* +import TastyBuffer.* import collection.mutable import core.Symbols.ClassSymbol -import Decorators._ +import Decorators.* object TastyPickler: private val versionString = s"Scala ${config.Properties.simpleVersionString}" diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala index bc9abaa3cbc2..1fcc88072da0 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala @@ -18,10 +18,10 @@ import java.nio.file.Paths import scala.compiletime.uninitialized import TastyBuffer.NameRef -import Contexts._ -import Decorators._ +import Contexts.* +import Decorators.* import Names.Name -import TastyUnpickler._ +import TastyUnpickler.* import util.Spans.offsetToInt object TastyPrinter: diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala index 7183dffa255b..ea626c9422b9 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala @@ -14,11 +14,11 @@ import dotty.tools.tasty.UnpicklerConfig import scala.collection.mutable import scala.language.unsafeNulls -import TastyFormat.NameTags._ +import TastyFormat.NameTags.* import TastyFormat.nameTagToString import TastyBuffer.NameRef import Names.{TermName, termName, EmptyTermName} -import NameKinds._ +import NameKinds.* object TastyUnpickler { diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala index 40d893abc3fd..dbf03fd29318 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -3,24 +3,24 @@ package dotc package core package tasty -import dotty.tools.tasty.TastyBuffer._ +import dotty.tools.tasty.TastyBuffer.* +import dotty.tools.tasty.TastyFormat.* import dotty.tools.tasty.TastyFormat.ASTsSection -import dotty.tools.tasty.TastyFormat._ import scala.language.unsafeNulls -import ast.Trees._ +import ast.Trees.* import ast.{untpd, tpd} -import Contexts._ -import Symbols._ -import Types._ -import Names._ -import Constants._ -import Decorators._ -import Annotations._ -import Flags._ +import Contexts.* +import Symbols.* +import Types.* +import Names.* +import Constants.* +import Decorators.* +import Annotations.* +import Flags.* import Comments.{Comment, docCtx} -import NameKinds._ +import NameKinds.* import StdNames.{nme, tpnme} import config.Config import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index e2dd17d9a690..89f55d9b7bcb 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -5,7 +5,7 @@ package tasty import dotty.tools.dotc.quoted.QuotePatterns import dotty.tools.tasty.TastyBuffer -import dotty.tools.tasty.TastyFormat._ +import dotty.tools.tasty.TastyFormat.* import dotty.tools.tasty.TastyReader import scala.annotation.constructorOnly @@ -18,32 +18,32 @@ import scala.compiletime.uninitialized import scala.language.unsafeNulls import Comments.docCtx -import Contexts._ -import Symbols._ -import Types._ -import Scopes._ -import SymDenotations._ -import Denotations._ -import Names._ -import NameOps._ -import StdNames._ -import Flags._ -import Constants._ -import Annotations._ -import NameKinds._ -import NamerOps._ -import ContextOps._ +import Contexts.* +import Symbols.* +import Types.* +import Scopes.* +import SymDenotations.* +import Denotations.* +import Names.* +import NameOps.* +import StdNames.* +import Flags.* +import Constants.* +import Annotations.* +import NameKinds.* +import NamerOps.* +import ContextOps.* import Variances.Invariant import TastyUnpickler.NameTable import typer.ConstFold import typer.Checking.checkNonCyclic -import typer.Nullables._ -import util.Spans._ +import typer.Nullables.* +import util.Spans.* import util.{SourceFile, Property} import ast.{Trees, tpd, untpd} -import Trees._ -import Decorators._ -import TastyBuffer._ +import Trees.* +import Decorators.* +import TastyBuffer.* import config.Printers.pickling /** Unpickler for typed trees diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala index 4c00bd2c6dc2..e4c253fddc53 100644 --- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala +++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala @@ -3,7 +3,7 @@ package dotc package core package unpickleScala2 -import Flags._ +import Flags.* /** Variable length byte arrays, with methods for basic pickling and unpickling. * diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala index 08c101669a92..f9f068f15193 100644 --- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala +++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala @@ -5,14 +5,14 @@ package unpickleScala2 import scala.collection.mutable.ListBuffer -import Symbols._ -import Types._ -import Contexts._ -import Flags._ -import Names._ -import StdNames._ -import Phases._ -import Decorators._ +import Symbols.* +import Types.* +import Contexts.* +import Flags.* +import Names.* +import StdNames.* +import Phases.* +import Decorators.* /** Erasure logic specific to Scala 2 symbols. */ object Scala2Erasure: diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala index ed8293b07bcd..5d531200472f 100644 --- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala @@ -14,38 +14,38 @@ import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.language.unsafeNulls -import Contexts._ -import Symbols._ -import Types._ -import Scopes._ -import SymDenotations._ -import Names._ -import NameOps._ -import StdNames._ -import Denotations._ -import NameOps._ -import Flags._ -import Constants._ -import Annotations._ -import Phases._ +import Contexts.* +import Symbols.* +import Types.* +import Scopes.* +import SymDenotations.* +import Names.* +import NameOps.* +import StdNames.* +import Denotations.* +import NameOps.* +import Flags.* +import Constants.* +import Annotations.* +import Phases.* import NameKinds.{Scala2MethodNameKinds, SuperAccessorName, ExpandedName} -import util.Spans._ -import ast.tpd._ +import util.Spans.* +import ast.tpd.* import ast.untpd.Modifiers import backend.sjs.JSDefinitions -import printing.Texts._ +import printing.Texts.* import printing.Printer import io.AbstractFile -import util.common._ +import util.common.* import util.NoSourcePosition import typer.Checking.checkNonCyclic -import typer.Nullables._ -import PickleBuffer._ -import PickleFormat._ -import Decorators._ -import TypeApplications._ +import typer.Nullables.* +import PickleBuffer.* +import PickleFormat.* +import Decorators.* +import TypeApplications.* import classfile.ClassfileParser -import reporting._ +import reporting.* object Scala2Unpickler { diff --git a/compiler/src/dotty/tools/dotc/coverage/Location.scala b/compiler/src/dotty/tools/dotc/coverage/Location.scala index cc73db914995..5871f2117e2f 100644 --- a/compiler/src/dotty/tools/dotc/coverage/Location.scala +++ b/compiler/src/dotty/tools/dotc/coverage/Location.scala @@ -2,12 +2,12 @@ package dotty.tools.dotc package coverage import dotty.tools.dotc.core.Contexts.Context -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.util.SourceFile import java.nio.file.Path -import ast.tpd._ +import ast.tpd.* /** Information about the location of a coverable piece of code. * diff --git a/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala b/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala index be2edfc25c55..2052da885299 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package decompiler -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.Phase import dotty.tools.io.File diff --git a/compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala b/compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala index 674c886e3eb9..d3bc22b45ff7 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package decompiler -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.tasty.TastyHTMLPrinter -import dotty.tools.dotc.reporting._ +import dotty.tools.dotc.reporting.* import dotty.tools.io.AbstractFile import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/dotc/decompiler/Main.scala b/compiler/src/dotty/tools/dotc/decompiler/Main.scala index 9986e4c3144f..df69882e2455 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/Main.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/Main.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.decompiler import dotty.tools.dotc -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.io.AbstractFile import java.nio.file.Files diff --git a/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala b/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala index 4a1517018005..df0930980a67 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.decompiler import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.fromtasty._ +import dotty.tools.dotc.fromtasty.* /** Compiler from tasty to user readable high text representation * of the compiled scala code. diff --git a/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala b/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala index b1c5d1ea0a84..ffd60fc7b12d 100644 --- a/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala +++ b/compiler/src/dotty/tools/dotc/fromtasty/Debug.scala @@ -4,7 +4,7 @@ package fromtasty import dotty.tools.io.Directory -import java.io.{File => JFile} +import java.io.File as JFile import java.nio.file.Files import java.nio.file.Paths import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala b/compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala index 734e723eaab6..74010b3f64d1 100644 --- a/compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala +++ b/compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package fromtasty -import core._ -import Decorators._ -import Contexts._ +import core.* +import Decorators.* +import Contexts.* import Symbols.{Symbol, ClassSymbol} import SymDenotations.ClassDenotation import Denotations.staticRef -import NameOps._ +import NameOps.* import ast.Trees.Tree import Phases.Phase import core.tasty.Attributes diff --git a/compiler/src/dotty/tools/dotc/fromtasty/TASTYCompiler.scala b/compiler/src/dotty/tools/dotc/fromtasty/TASTYCompiler.scala index 923892b62f13..c0adf454b063 100644 --- a/compiler/src/dotty/tools/dotc/fromtasty/TASTYCompiler.scala +++ b/compiler/src/dotty/tools/dotc/fromtasty/TASTYCompiler.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package fromtasty -import core._ -import Contexts._ +import core.* +import Contexts.* import Phases.Phase class TASTYCompiler extends Compiler { diff --git a/compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala b/compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala index 74fc6a246247..8ef3ac87f089 100644 --- a/compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala +++ b/compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala @@ -6,7 +6,7 @@ import java.io.File import scala.language.unsafeNulls import io.{JarArchive, AbstractFile, Path} -import core.Contexts._ +import core.Contexts.* import core.Decorators.em class TASTYRun(comp: Compiler, ictx: Context) extends Run(comp, ictx) { diff --git a/compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala b/compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala index 93b222de408e..61e59e0c8a4f 100644 --- a/compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala +++ b/compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package inlines -import ast._ -import core._ -import Flags._ -import Symbols._ -import Types._ -import Decorators._ -import Contexts._ +import ast.* +import core.* +import Flags.* +import Symbols.* +import Types.* +import Decorators.* +import Contexts.* import StdNames.nme -import typer._ +import typer.* import Names.TermName import NameKinds.{InlineAccessorName, InlineBinderName, InlineScrutineeName} import config.Printers.inlining diff --git a/compiler/src/dotty/tools/dotc/inlines/Inliner.scala b/compiler/src/dotty/tools/dotc/inlines/Inliner.scala index b9f92e4b91b8..4ed07bf1f38d 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inliner.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inliner.scala @@ -7,16 +7,16 @@ import dotty.tools.dotc.transform.Splicer import scala.annotation.constructorOnly -import ast._ -import core._ -import Flags._ -import Symbols._ -import Types._ -import Decorators._ -import Constants._ -import Contexts._ +import ast.* +import core.* +import Flags.* +import Symbols.* +import Types.* +import Decorators.* +import Constants.* +import Contexts.* import StdNames.nme -import typer._ +import typer.* import Names.Name import NameKinds.InlineBinderName import ProtoTypes.shallowSelectionProto diff --git a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala index 2b03b3c0331f..24d80bd8f1d4 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala @@ -6,16 +6,16 @@ import dotty.tools.dotc.util.SourceFile import dotty.tools.dotc.util.SourcePosition import dotty.tools.dotc.util.SrcPos -import ast._ -import core._ -import Flags._ -import Symbols._ -import Types._ -import Decorators._ -import Constants._ -import Contexts._ +import ast.* +import core.* +import Flags.* +import Symbols.* +import Types.* +import Decorators.* +import Constants.* +import Contexts.* import StdNames.{tpnme, nme} -import typer._ +import typer.* import NameKinds.BodyRetainerName import SymDenotations.SymDenotation import config.Printers.inlining diff --git a/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala b/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala index 3879fe4e2f70..9ec60cbac5cc 100644 --- a/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala +++ b/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala @@ -8,20 +8,20 @@ import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.reporting.Message import dotty.tools.dotc.util.SrcPos -import Trees._ -import core._ -import Flags._ -import Symbols._ -import Flags._ -import Types._ -import Decorators._ +import Trees.* +import core.* +import Flags.* +import Symbols.* +import Flags.* +import Types.* +import Decorators.* import StdNames.nme -import Contexts._ +import Contexts.* import Names.{Name, TermName} import NameKinds.{InlineAccessorName, UniqueInlineName} import inlines.Inlines -import NameOps._ -import Annotations._ +import NameOps.* +import Annotations.* import transform.{AccessProxies, Splicer} import staging.CrossStageSafety import config.Printers.inlining diff --git a/compiler/src/dotty/tools/dotc/interactive/Completion.scala b/compiler/src/dotty/tools/dotc/interactive/Completion.scala index e03f1833e0a0..16621620eebf 100644 --- a/compiler/src/dotty/tools/dotc/interactive/Completion.scala +++ b/compiler/src/dotty/tools/dotc/interactive/Completion.scala @@ -4,17 +4,17 @@ import dotty.tools.dotc.ast.NavigateAST import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.config.Printers.interactiv import dotty.tools.dotc.core.ContextOps.localContext -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.Denotations.SingleDenotation -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds.SimpleNameKind -import dotty.tools.dotc.core.NameOps._ +import dotty.tools.dotc.core.NameOps.* import dotty.tools.dotc.core.Names import dotty.tools.dotc.core.Names.Name import dotty.tools.dotc.core.Names.TermName import dotty.tools.dotc.core.Phases -import dotty.tools.dotc.core.Scopes._ +import dotty.tools.dotc.core.Scopes.* import dotty.tools.dotc.core.StdNames.nme import dotty.tools.dotc.core.SymDenotations.SymDenotation import dotty.tools.dotc.core.Symbols diff --git a/compiler/src/dotty/tools/dotc/interactive/Interactive.scala b/compiler/src/dotty/tools/dotc/interactive/Interactive.scala index ed48b9adf196..bbbc56681ba9 100644 --- a/compiler/src/dotty/tools/dotc/interactive/Interactive.scala +++ b/compiler/src/dotty/tools/dotc/interactive/Interactive.scala @@ -2,21 +2,21 @@ package dotty.tools package dotc package interactive -import scala.collection._ +import scala.collection.* import scala.language.unsafeNulls import ast.{NavigateAST, Trees, tpd, untpd} -import core._ -import Decorators._ -import ContextOps._ -import Contexts._ -import Flags._ -import Names._ -import NameOps._ -import Symbols._ -import Trees._ -import Types._ -import util.Spans._ +import core.* +import Decorators.* +import ContextOps.* +import Contexts.* +import Flags.* +import Names.* +import NameOps.* +import Symbols.* +import Trees.* +import Types.* +import util.Spans.* import util.SourceFile import util.SourcePosition diff --git a/compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala b/compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala index 38a93125a342..af1484896c72 100644 --- a/compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala +++ b/compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package interactive -import core._ -import Phases._ -import parsing._ -import typer._ +import core.* +import Phases.* +import parsing.* +import typer.* class InteractiveCompiler extends Compiler { // TODO: Figure out what phases should be run in IDEs diff --git a/compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala b/compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala index 26218cd02af0..b6305741d5ec 100644 --- a/compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala +++ b/compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala @@ -4,30 +4,30 @@ package interactive import dotty.tools.io.AbstractFile -import java.io._ +import java.io.* import java.net.URI import java.nio.charset.StandardCharsets -import java.nio.file._ +import java.nio.file.* import java.nio.file.attribute.BasicFileAttributes -import java.util.zip._ -import scala.collection._ +import java.util.zip.* +import scala.collection.* import scala.io.Codec import scala.language.unsafeNulls import ast.{Trees, tpd} -import core._ -import core.Decorators._ -import Contexts._ -import Names._ -import NameOps._ -import Symbols._ -import SymDenotations._ -import Trees._ -import Types._ +import core.* +import core.Decorators.* +import Contexts.* +import Names.* +import NameOps.* +import Symbols.* +import SymDenotations.* +import Trees.* +import Types.* import Denotations.staticRef -import classpath._ -import reporting._ -import util._ +import classpath.* +import reporting.* +import util.* /** A Driver subclass designed to be used from IDEs */ class InteractiveDriver(val settings: List[String]) extends Driver { diff --git a/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala b/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala index e3e1fbfe1d56..90d7a38f0a41 100644 --- a/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala +++ b/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala @@ -4,13 +4,13 @@ package interactive import ast.tpd -import core._ -import Contexts._ -import NameOps._ -import Symbols._ -import StdNames._ -import util._ -import util.Spans._ +import core.* +import Contexts.* +import NameOps.* +import Symbols.* +import StdNames.* +import util.* +import util.Spans.* /** * A `tree` coming from `source` diff --git a/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala b/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala index 1b6f3e2c156a..516b16571dee 100644 --- a/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala +++ b/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala @@ -4,7 +4,7 @@ package parsing import scala.compiletime.uninitialized -import util.Chars._ +import util.Chars.* abstract class CharArrayReader { self => diff --git a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala index 0ba7199555d4..c2ac66d401f1 100644 --- a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala @@ -10,20 +10,20 @@ import dotty.tools.dotc.util.SourceFile import scala.collection.mutable.LinkedHashMap import scala.collection.mutable.ListBuffer -import JavaTokens._ -import JavaScanners._ +import JavaTokens.* +import JavaScanners.* import Scanners.Offset -import Parsers._ -import core._ -import Contexts._ +import Parsers.* +import core.* +import Contexts.* import Symbols.defn -import Names._ -import Types._ -import ast.Trees._ -import Decorators._ -import StdNames._ -import reporting._ -import util.Spans._ +import Names.* +import Types.* +import ast.Trees.* +import Decorators.* +import StdNames.* +import reporting.* +import util.Spans.* object JavaParsers { diff --git a/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala b/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala index 54e7877eac7b..b02b02970b39 100644 --- a/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala +++ b/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala @@ -5,12 +5,12 @@ package parsing import scala.annotation.switch import scala.annotation.tailrec -import core.Contexts._ +import core.Contexts.* import core.Names.SimpleName -import Scanners._ +import Scanners.* import util.SourceFile -import JavaTokens._ -import util.Chars._ +import JavaTokens.* +import util.Chars.* import PartialFunction.cond import core.Decorators.em diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 5b60bdd82608..916c577805ba 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -11,29 +11,29 @@ import scala.collection.mutable.ListBuffer import scala.language.unsafeNulls import util.{ SourceFile, SourcePosition, NoSourcePosition } -import Tokens._ -import Scanners._ +import Tokens.* +import Scanners.* import xml.MarkupParsers.MarkupParser -import core._ -import Flags._ -import Contexts._ -import Names._ +import core.* +import Flags.* +import Contexts.* +import Names.* import NameKinds.{WildcardParamName, QualifiedName} -import NameOps._ +import NameOps.* import ast.{Positioned, Trees} -import ast.Trees._ -import StdNames._ -import util.Spans._ -import Constants._ +import ast.Trees.* +import StdNames.* +import util.Spans.* +import Constants.* import Symbols.NoSymbol -import ScriptParsers._ -import Decorators._ +import ScriptParsers.* +import Decorators.* import util.Chars import rewrites.Rewrites.{patch, overlapsPatch} -import reporting._ +import reporting.* import config.Feature import config.Feature.{sourceVersion, migrateTo3, globalOnlyImports} -import config.SourceVersion._ +import config.SourceVersion.* import config.SourceVersion object Parsers { diff --git a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala index 328d3c75b4f6..9a8f6588a696 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala @@ -12,18 +12,18 @@ import scala.collection.immutable.SortedMap import scala.collection.mutable import scala.language.unsafeNulls -import core.Names._ -import core.Contexts._ -import core.Decorators._ -import util.Spans._ -import core.StdNames._ -import core.Comments._ +import core.Names.* +import core.Contexts.* +import core.Decorators.* +import util.Spans.* +import core.StdNames.* +import core.Comments.* import util.SourceFile -import util.Chars._ +import util.Chars.* import util.{SourcePosition, CharBuffer} import util.Spans.Span import config.Config -import Tokens._ +import Tokens.* import rewrites.Rewrites.patch import config.Feature import config.Feature.{migrateTo3, fewerBracesEnabled} diff --git a/compiler/src/dotty/tools/dotc/parsing/ScriptParsers.scala b/compiler/src/dotty/tools/dotc/parsing/ScriptParsers.scala index 1e78e380c65b..d71e4cf11102 100644 --- a/compiler/src/dotty/tools/dotc/parsing/ScriptParsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/ScriptParsers.scala @@ -3,9 +3,9 @@ package dotc package parsing import util.SourceFile -import core._ -import Contexts._ -import Parsers._ +import core.* +import Contexts.* +import Parsers.* /**

Performs the following context-free rewritings:

diff --git a/compiler/src/dotty/tools/dotc/parsing/Tokens.scala b/compiler/src/dotty/tools/dotc/parsing/Tokens.scala index eea68594b08d..fbf4e8d701dd 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Tokens.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Tokens.scala @@ -5,7 +5,7 @@ package parsing import scala.language.unsafeNulls import collection.immutable.BitSet -import core.Decorators._ +import core.Decorators.* import core.StdNames.nme abstract class TokensCommon { diff --git a/compiler/src/dotty/tools/dotc/parsing/package.scala b/compiler/src/dotty/tools/dotc/parsing/package.scala index ee3ecda60aee..0e51b487d7c4 100644 --- a/compiler/src/dotty/tools/dotc/parsing/package.scala +++ b/compiler/src/dotty/tools/dotc/parsing/package.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc -import util.Chars._ +import util.Chars.* import core.Names.Name import core.StdNames.nme -import core.NameOps._ +import core.NameOps.* package object parsing { diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala index 091604a3ed06..f30b0b4f6b0d 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala @@ -11,7 +11,7 @@ package xml import scala.collection.BufferedIterator -import Utility._ +import Utility.* import util.Chars.SU /** This is not a public trait - it contains common code shared diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala index 88fca6358a28..8676a5ab705b 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala @@ -12,13 +12,13 @@ import scala.util.control.ControlThrowable import core.Contexts.Context import mutable.{ Buffer, ArrayBuffer, ListBuffer } import util.Chars.SU -import Parsers._ -import util.Spans._ -import core._ -import Constants._ +import Parsers.* +import util.Spans.* +import core.* +import Constants.* import Decorators.{em, toMessage} import util.SourceFile -import Utility._ +import Utility.* // XXX/Note: many/most of the functions in here are almost direct cut and pastes diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala index ab41d5a32845..f13352f0c371 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala @@ -7,16 +7,16 @@ import scala.collection.mutable import scala.compiletime.uninitialized import scala.language.unsafeNulls -import core._ -import Decorators._ +import core.* +import Decorators.* import Flags.Mutable -import Names._ -import StdNames._ -import ast.Trees._ +import Names.* +import StdNames.* +import ast.Trees.* import ast.{tpd, untpd} -import Symbols._ -import Contexts._ -import util.Spans._ +import Symbols.* +import Contexts.* +import util.Spans.* import Parsers.Parser /** This class builds instance of `Tree` that represent XML. diff --git a/compiler/src/dotty/tools/dotc/plugins/Plugin.scala b/compiler/src/dotty/tools/dotc/plugins/Plugin.scala index 98d291e8a63d..a691c4d94f71 100644 --- a/compiler/src/dotty/tools/dotc/plugins/Plugin.scala +++ b/compiler/src/dotty/tools/dotc/plugins/Plugin.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package plugins -import dotty.tools.io._ +import dotty.tools.io.* import java.io.InputStream import java.util.Properties @@ -10,9 +10,9 @@ import scala.util.Failure import scala.util.Success import scala.util.Try -import core._ -import Contexts._ -import Phases._ +import core.* +import Contexts.* +import Phases.* import transform.MegaPhase.MiniPhase trait PluginPhase extends MiniPhase { diff --git a/compiler/src/dotty/tools/dotc/plugins/Plugins.scala b/compiler/src/dotty/tools/dotc/plugins/Plugins.scala index 7af1d16859d1..75a3fa6f3cab 100644 --- a/compiler/src/dotty/tools/dotc/plugins/Plugins.scala +++ b/compiler/src/dotty/tools/dotc/plugins/Plugins.scala @@ -1,17 +1,17 @@ package dotty.tools.dotc package plugins -import dotty.tools.io._ +import dotty.tools.io.* import scala.compiletime.uninitialized import scala.language.unsafeNulls -import core._ -import Contexts._ +import core.* +import Contexts.* import Decorators.em import config.{ PathResolver, Feature } -import Phases._ -import config.Printers.plugins.{ println => debug } +import Phases.* +import config.Printers.plugins.println as debug import config.Properties /** Support for run-time loading of compiler plugins. diff --git a/compiler/src/dotty/tools/dotc/printing/Formatting.scala b/compiler/src/dotty/tools/dotc/printing/Formatting.scala index 7c9564a7e3b9..f9dbb41ec073 100644 --- a/compiler/src/dotty/tools/dotc/printing/Formatting.scala +++ b/compiler/src/dotty/tools/dotc/printing/Formatting.scala @@ -5,16 +5,16 @@ package printing import scala.collection.mutable import scala.language.unsafeNulls -import core._ -import Texts._ -import Types._ -import Flags._ -import Symbols._ -import Contexts._ -import Decorators._ +import core.* +import Texts.* +import Types.* +import Flags.* +import Symbols.* +import Contexts.* +import Decorators.* import reporting.Message import util.DiffUtil -import Highlighting._ +import Highlighting.* object Formatting { diff --git a/compiler/src/dotty/tools/dotc/printing/Highlighting.scala b/compiler/src/dotty/tools/dotc/printing/Highlighting.scala index fe02becb9a97..70c6b80f7e45 100644 --- a/compiler/src/dotty/tools/dotc/printing/Highlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/Highlighting.scala @@ -4,7 +4,7 @@ package printing import scala.collection.mutable -import core.Contexts._ +import core.Contexts.* object Highlighting { diff --git a/compiler/src/dotty/tools/dotc/printing/MessageLimiter.scala b/compiler/src/dotty/tools/dotc/printing/MessageLimiter.scala index c9ac4a5af4ce..24f02f37956e 100644 --- a/compiler/src/dotty/tools/dotc/printing/MessageLimiter.scala +++ b/compiler/src/dotty/tools/dotc/printing/MessageLimiter.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package printing -import core._ -import Contexts._ +import core.* +import Contexts.* import util.Property import Texts.Text diff --git a/compiler/src/dotty/tools/dotc/printing/OutlinePrinter.scala b/compiler/src/dotty/tools/dotc/printing/OutlinePrinter.scala index bb3024508237..cd8267355201 100644 --- a/compiler/src/dotty/tools/dotc/printing/OutlinePrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/OutlinePrinter.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package printing -import core._ -import Texts._ -import Flags._ -import NameOps._ -import StdNames._ -import Contexts._ -import Symbols._ +import core.* +import Texts.* +import Flags.* +import NameOps.* +import StdNames.* +import Contexts.* +import Symbols.* import ast.{Trees, untpd} -import Trees._ +import Trees.* object OutlinePrinter: def apply(_ctx: Context): Printer = new OutlinePrinter(_ctx) diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index 920c9f13f140..3a4c21ba8b78 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -4,23 +4,23 @@ package printing import scala.annotation.switch import scala.util.control.NonFatal -import core._ -import Texts._ -import Types._ -import Flags._ -import Names._ -import Symbols._ -import NameOps._ -import Constants._ -import Denotations._ -import StdNames._ -import Contexts._ +import core.* +import Texts.* +import Types.* +import Flags.* +import Names.* +import Symbols.* +import NameOps.* +import Constants.* +import Denotations.* +import StdNames.* +import Contexts.* import Scopes.Scope import Denotations.Denotation import Annotations.Annotation import StdNames.nme -import ast.Trees._ -import typer.Implicits._ +import ast.Trees.* +import typer.Implicits.* import typer.ImportInfo import Variances.varianceSign import util.SourcePosition diff --git a/compiler/src/dotty/tools/dotc/printing/Printer.scala b/compiler/src/dotty/tools/dotc/printing/Printer.scala index 240e6526a461..dd5bc0faf176 100644 --- a/compiler/src/dotty/tools/dotc/printing/Printer.scala +++ b/compiler/src/dotty/tools/dotc/printing/Printer.scala @@ -4,18 +4,18 @@ package printing import scala.annotation.internal.sharable -import core._ -import Texts._ -import ast.Trees._ +import core.* +import Texts.* +import ast.Trees.* import Types.{Type, SingletonType, LambdaParam, NamedType} import Symbols.Symbol import Scopes.Scope import Constants.Constant import Names.Name -import Denotations._ +import Denotations.* import Annotations.Annotation import Contexts.Context -import typer.Implicits._ +import typer.Implicits.* import util.SourcePosition import typer.ImportInfo import cc.CaptureSet diff --git a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala index 63a917f54b49..6ebd8be26c83 100644 --- a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -12,25 +12,25 @@ import dotty.tools.dotc.ast.untpd.ValOrDefDef import dotty.tools.dotc.parsing.JavaParsers import dotty.tools.dotc.util.SourcePosition -import core._ -import Constants._ -import Texts._ -import Types._ -import Flags._ -import Names._ -import Symbols._ -import NameOps._ +import core.* +import Constants.* +import Texts.* +import Types.* +import Flags.* +import Names.* +import Symbols.* +import NameOps.* import TypeErasure.ErasedValueType -import Contexts._ +import Contexts.* import Annotations.Annotation -import Denotations._ -import SymDenotations._ +import Denotations.* +import SymDenotations.* import StdNames.{nme, tpnme} import ast.{Trees, tpd, untpd} import typer.{Implicits, Namer, Applications} -import typer.ProtoTypes._ -import Trees._ -import TypeApplications._ +import typer.ProtoTypes.* +import Trees.* +import TypeApplications.* import NameKinds.{WildcardParamName, DefaultGetterName} import util.Chars.isOperatorPart import config.{Config, Feature} diff --git a/compiler/src/dotty/tools/dotc/printing/ReplPrinter.scala b/compiler/src/dotty/tools/dotc/printing/ReplPrinter.scala index ea3afef27fae..f02cbf159224 100644 --- a/compiler/src/dotty/tools/dotc/printing/ReplPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/ReplPrinter.scala @@ -2,13 +2,13 @@ package dotty.tools.dotc.printing import dotty.tools.dotc.core.Constants import dotty.tools.dotc.core.Constants.Constant -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.NameOps._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.NameOps.* import dotty.tools.dotc.core.Names.Name -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.printing.Texts._ +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.printing.Texts.* class ReplPrinter(_ctx: Context) extends RefinedPrinter(_ctx) { diff --git a/compiler/src/dotty/tools/dotc/printing/Showable.scala b/compiler/src/dotty/tools/dotc/printing/Showable.scala index 9cd83ebad37e..3b4b0fda1d55 100644 --- a/compiler/src/dotty/tools/dotc/printing/Showable.scala +++ b/compiler/src/dotty/tools/dotc/printing/Showable.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package printing -import core._ -import Contexts._ -import Texts._ -import Decorators._ +import core.* +import Contexts.* +import Texts.* +import Decorators.* import config.Config.summarizeDepth trait Showable extends Any { diff --git a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala index 60e2388fad7c..913d433e0620 100644 --- a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -2,11 +2,11 @@ package dotty.tools.dotc package printing import dotty.tools.dotc.ast.untpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.StdNames._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.parsing.Parsers.Parser import dotty.tools.dotc.parsing.Scanners.Scanner -import dotty.tools.dotc.parsing.Tokens._ +import dotty.tools.dotc.parsing.Tokens.* import dotty.tools.dotc.reporting.Reporter import dotty.tools.dotc.util.SourceFile import dotty.tools.dotc.util.Spans.Span diff --git a/compiler/src/dotty/tools/dotc/profile/Profiler.scala b/compiler/src/dotty/tools/dotc/profile/Profiler.scala index 1da9fc4e0299..0d1c169b212d 100644 --- a/compiler/src/dotty/tools/dotc/profile/Profiler.scala +++ b/compiler/src/dotty/tools/dotc/profile/Profiler.scala @@ -1,6 +1,6 @@ package dotty.tools.dotc.profile -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.Phase import dotty.tools.io.AbstractFile @@ -18,7 +18,7 @@ import javax.management.Notification import javax.management.NotificationEmitter import javax.management.NotificationListener import javax.management.openmbean.CompositeData -import scala.annotation._ +import scala.annotation.* import scala.language.unsafeNulls import annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala b/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala index 8b1c1435569c..a35da62dc954 100644 --- a/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala +++ b/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc.profile -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.Phase +import java.util.concurrent.* import java.util.concurrent.ThreadPoolExecutor.AbortPolicy -import java.util.concurrent._ import java.util.concurrent.atomic.AtomicInteger import scala.language.unsafeNulls diff --git a/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala b/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala index 32870c0a4b69..071d85ab3732 100644 --- a/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala +++ b/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala @@ -3,20 +3,20 @@ package quoted import dotty.tools.dotc.ast.TreeMapWithImplicits import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Constants._ -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Constants.* +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.CyclicReference -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.Denotations.staticRef -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds.FlatName -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.TypeErasure -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.reporting.Message import dotty.tools.dotc.typer.ImportInfo.withRootImports import dotty.tools.dotc.util.SrcPos @@ -25,7 +25,7 @@ import dotty.tools.repl.AbstractFileClassLoader import java.io.PrintWriter import java.io.StringWriter import java.lang.reflect.InvocationTargetException -import java.lang.reflect.{Method => JLRMethod} +import java.lang.reflect.Method as JLRMethod import scala.collection.mutable import scala.language.unsafeNulls import scala.reflect.ClassTag diff --git a/compiler/src/dotty/tools/dotc/quoted/MacroExpansion.scala b/compiler/src/dotty/tools/dotc/quoted/MacroExpansion.scala index b8048b1ba47a..aeb14f056a5c 100644 --- a/compiler/src/dotty/tools/dotc/quoted/MacroExpansion.scala +++ b/compiler/src/dotty/tools/dotc/quoted/MacroExpansion.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.quoted import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.typer.Typer import dotty.tools.dotc.util.Property import dotty.tools.dotc.util.SourcePosition diff --git a/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala b/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala index d82d06c5d5c2..fa2eea44a972 100644 --- a/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala +++ b/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc.quoted import dotty.tools.dotc.ast.TreeTypeMap -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.config.Printers._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.config.Printers.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Mode -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.core.tasty.Attributes import dotty.tools.dotc.core.tasty.DottyUnpickler import dotty.tools.dotc.core.tasty.PositionPickler @@ -23,9 +23,9 @@ import dotty.tools.io.NoAbstractFile import scala.collection.mutable import scala.quoted.Quotes -import scala.quoted.runtime.impl._ +import scala.quoted.runtime.impl.* -import QuoteUtils._ +import QuoteUtils.* object PickledQuotes { import tpd.* diff --git a/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala b/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala index 4248dd6a83a2..22133799c9fd 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala @@ -2,21 +2,21 @@ package dotty.tools.dotc package quoted import dotty.tools.dotc.ast.TreeTypeMap -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Constants._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.* +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Constants.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds.PatMatGivenVarName -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.TypeOps._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.TypeOps.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.reporting.IllegalVariableInPatternAlternative import scala.collection.mutable diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala b/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala index 29b0d6004328..a015c726c59f 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc.quoted import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Symbols.* object QuoteUtils: import tpd.* diff --git a/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala b/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala index 39ade04437c3..67b1bfe3b58a 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.quoted import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.util.Property diff --git a/compiler/src/dotty/tools/dotc/quoted/reflect/FromSymbol.scala b/compiler/src/dotty/tools/dotc/quoted/reflect/FromSymbol.scala index 87d0cbb7be08..cfc09a8ed836 100644 --- a/compiler/src/dotty/tools/dotc/quoted/reflect/FromSymbol.scala +++ b/compiler/src/dotty/tools/dotc/quoted/reflect/FromSymbol.scala @@ -3,11 +3,11 @@ package reflect import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* object FromSymbol { diff --git a/compiler/src/dotty/tools/dotc/report.scala b/compiler/src/dotty/tools/dotc/report.scala index f31b8cc9a75a..33424a575ad9 100644 --- a/compiler/src/dotty/tools/dotc/report.scala +++ b/compiler/src/dotty/tools/dotc/report.scala @@ -4,16 +4,16 @@ import dotty.tools.dotc.config.MigrationVersion import java.lang.System.currentTimeMillis -import reporting._ -import Diagnostic._ +import reporting.* +import Diagnostic.* import util.{SourcePosition, NoSourcePosition, SrcPos} -import core._ -import Contexts._ -import Flags._ -import Symbols._ -import Decorators._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* +import Decorators.* import config.SourceVersion -import ast._ +import ast.* import config.Feature.sourceVersion object report: diff --git a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala index ea8b9f95b4df..fa1aa936fdaa 100644 --- a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala @@ -5,7 +5,7 @@ package reporting import java.io.BufferedReader import java.io.PrintWriter -import core.Contexts._ +import core.Contexts.* import Diagnostic.Error /** diff --git a/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala b/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala index 3eac2cef1f11..727d00ddefc3 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala @@ -3,17 +3,17 @@ package dotc package reporting import dotty.tools.dotc.config.Settings.Setting -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.interfaces.Diagnostic.ERROR import dotty.tools.dotc.interfaces.Diagnostic.INFO import dotty.tools.dotc.interfaces.Diagnostic.WARNING import dotty.tools.dotc.util.SourcePosition import java.util.Collections +import java.util.List as JList import java.util.Optional -import java.util.{List => JList} import scala.language.unsafeNulls -import scala.util.chaining._ +import scala.util.chaining.* import core.Decorators.toMessage diff --git a/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala b/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala index cdaf9b2fbc87..9b38700aa67c 100644 --- a/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala +++ b/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package reporting -import core._ -import Contexts._ -import Decorators._ -import Symbols._ -import Names._ -import Types._ -import Flags._ +import core.* +import Contexts.* +import Decorators.* +import Symbols.* +import Names.* +import Types.* +import Flags.* import typer.ProtoTypes.{FunProto, SelectionProto} /** A utility object to support "did you mean" hinting */ diff --git a/compiler/src/dotty/tools/dotc/reporting/ExploringReporter.scala b/compiler/src/dotty/tools/dotc/reporting/ExploringReporter.scala index a2062bd1b2c7..f469c03764c0 100644 --- a/compiler/src/dotty/tools/dotc/reporting/ExploringReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/ExploringReporter.scala @@ -6,7 +6,7 @@ import scala.language.unsafeNulls import collection.mutable import core.Contexts.Context -import Diagnostic._ +import Diagnostic.* /** A re-usable Reporter used in Contexts#test */ class ExploringReporter extends StoreReporter(null, fromTyperState = false): diff --git a/compiler/src/dotty/tools/dotc/reporting/HideNonSensicalMessages.scala b/compiler/src/dotty/tools/dotc/reporting/HideNonSensicalMessages.scala index 74cc6b99d2e6..81e17c495d90 100644 --- a/compiler/src/dotty/tools/dotc/reporting/HideNonSensicalMessages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/HideNonSensicalMessages.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package reporting -import core.Contexts._ +import core.Contexts.* /** * This trait implements `isHidden` so that we avoid reporting non-sensical messages. diff --git a/compiler/src/dotty/tools/dotc/reporting/Message.scala b/compiler/src/dotty/tools/dotc/reporting/Message.scala index 42b9bc976eeb..51f975e5d8b9 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Message.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Message.scala @@ -5,12 +5,12 @@ package reporting import scala.annotation.threadUnsafe import scala.language.unsafeNulls -import core._ -import Contexts._ -import Decorators._ -import Symbols._ -import Types._ -import Flags._ +import core.* +import Contexts.* +import Decorators.* +import Symbols.* +import Types.* +import Flags.* import printing.{RefinedPrinter, MessageLimiter, ErrorMessageLimiter} import printing.Texts.Text import printing.Formatting.hl diff --git a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala index 5e9e600c12de..a1bb6a2408a3 100644 --- a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala +++ b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package reporting -import java.lang.System.{lineSeparator => EOL} +import java.lang.System.lineSeparator as EOL import scala.annotation.switch import scala.collection.mutable import scala.language.unsafeNulls -import core.Contexts._ -import core.Decorators._ +import core.Contexts.* +import core.Decorators.* import printing.Highlighting.{Blue, Red, Yellow} import printing.SyntaxHighlighting -import Diagnostic._ +import Diagnostic.* import util.{ SourcePosition, NoSourcePosition } import util.Chars.{ LF, CR, FF, SU } diff --git a/compiler/src/dotty/tools/dotc/reporting/Profile.scala b/compiler/src/dotty/tools/dotc/reporting/Profile.scala index 1f8afc888938..6e2f83364dbe 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Profile.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Profile.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package reporting -import core._ +import core.* import Contexts.{Context, ctx} import Symbols.{Symbol, NoSymbol} import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/reporting/Reporter.scala b/compiler/src/dotty/tools/dotc/reporting/Reporter.scala index c7a4123976ca..fe145dcf3ec7 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Reporter.scala @@ -2,12 +2,12 @@ package dotty.tools package dotc package reporting -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Mode import dotty.tools.dotc.core.Symbols.NoSymbol import dotty.tools.dotc.core.Symbols.Symbol -import dotty.tools.dotc.reporting.Diagnostic._ -import dotty.tools.dotc.reporting.Message._ +import dotty.tools.dotc.reporting.Diagnostic.* +import dotty.tools.dotc.reporting.Message.* import dotty.tools.dotc.util.NoSourcePosition import java.io.BufferedReader diff --git a/compiler/src/dotty/tools/dotc/reporting/StoreReporter.scala b/compiler/src/dotty/tools/dotc/reporting/StoreReporter.scala index 9783a3208a60..aef5f2c5863b 100644 --- a/compiler/src/dotty/tools/dotc/reporting/StoreReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/StoreReporter.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package reporting -import core.Contexts._ +import core.Contexts.* import collection.mutable import config.Printers.typr -import Diagnostic._ +import Diagnostic.* /** This class implements a Reporter that stores all messages * diff --git a/compiler/src/dotty/tools/dotc/reporting/TestReporter.scala b/compiler/src/dotty/tools/dotc/reporting/TestReporter.scala index 8d7204a93fa2..c0b5ffe8e650 100644 --- a/compiler/src/dotty/tools/dotc/reporting/TestReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/TestReporter.scala @@ -5,7 +5,7 @@ package reporting import scala.language.unsafeNulls import collection.mutable -import Diagnostic._ +import Diagnostic.* /** A re-usable Reporter used in Contexts#test */ class TestingReporter extends StoreReporter(null, fromTyperState = false): diff --git a/compiler/src/dotty/tools/dotc/reporting/ThrowingReporter.scala b/compiler/src/dotty/tools/dotc/reporting/ThrowingReporter.scala index 153212522541..75c698a28ee4 100644 --- a/compiler/src/dotty/tools/dotc/reporting/ThrowingReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/ThrowingReporter.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package reporting -import core.Contexts._ +import core.Contexts.* import Diagnostic.Error /** diff --git a/compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala b/compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala index 7db85c4c015b..7eee08d4de3a 100644 --- a/compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala +++ b/compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala @@ -5,7 +5,7 @@ package reporting import scala.collection.mutable import util.SourceFile -import core.Contexts._ +import core.Contexts.* /** This trait implements `isHidden` so that multiple messages per position * are suppressed, unless they are of increasing severity. */ diff --git a/compiler/src/dotty/tools/dotc/reporting/WConf.scala b/compiler/src/dotty/tools/dotc/reporting/WConf.scala index 4447c74f842d..ea129a4b9c0c 100644 --- a/compiler/src/dotty/tools/dotc/reporting/WConf.scala +++ b/compiler/src/dotty/tools/dotc/reporting/WConf.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package reporting -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.util.SourcePosition import java.util.regex.PatternSyntaxException diff --git a/compiler/src/dotty/tools/dotc/reporting/messages.scala b/compiler/src/dotty/tools/dotc/reporting/messages.scala index 569862ac3146..29fc64e302ed 100644 --- a/compiler/src/dotty/tools/dotc/reporting/messages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/messages.scala @@ -8,40 +8,40 @@ import dotty.tools.dotc.util.SourcePosition import dotty.tools.dotc.util.Spans.Span import java.util.regex.Matcher.quoteReplacement -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.util.control.NonFatal import scala.util.matching.Regex -import core._ -import Contexts._ -import Decorators._ -import Symbols._ -import Names._ -import NameOps._ -import Types._ -import Flags._ -import Phases._ +import core.* +import Contexts.* +import Decorators.* +import Symbols.* +import Names.* +import NameOps.* +import Types.* +import Flags.* +import Phases.* import Denotations.SingleDenotation import SymDenotations.SymDenotation import NameKinds.{WildcardParamName, ContextFunctionParamName} import parsing.Scanners.Token import parsing.Tokens -import printing.Highlighting._ +import printing.Highlighting.* import printing.Formatting -import ErrorMessageID._ +import ErrorMessageID.* import ast.Trees import config.{Feature, ScalaVersion} import typer.ErrorReporting.{err, matchReductionAddendum, substitutableTypeSymbolsInScope} import typer.ProtoTypes.{ViewProto, SelectionProto, FunProto} -import typer.Implicits._ +import typer.Implicits.* import typer.Inferencing import StdNames.nme import printing.Formatting.hl -import ast.Trees._ +import ast.Trees.* import ast.untpd import ast.tpd import cc.CaptureSet.IdentityCaptRefMap -import DidYouMean._ +import DidYouMean.* /** Messages * ======== diff --git a/compiler/src/dotty/tools/dotc/reporting/trace.scala b/compiler/src/dotty/tools/dotc/reporting/trace.scala index f0399a8b8d8e..d359e2034a94 100644 --- a/compiler/src/dotty/tools/dotc/reporting/trace.scala +++ b/compiler/src/dotty/tools/dotc/reporting/trace.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package reporting -import scala.compiletime._ +import scala.compiletime.* import scala.language.unsafeNulls -import core._ -import Contexts._ -import Decorators._ -import config._ -import printing.Formatting._ +import core.* +import Contexts.* +import Decorators.* +import config.* +import printing.Formatting.* /** Exposes the {{{ trace("question") { op } }}} syntax. * diff --git a/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala b/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala index 3b39ca142fce..817e541d21e0 100644 --- a/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala +++ b/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala @@ -11,7 +11,7 @@ import scala.annotation.tailrec import util.{SourceFile, Spans} import Spans.Span -import core.Contexts._ +import core.Contexts.* import collection.mutable /** Handles rewriting of Scala2 files to Dotty */ diff --git a/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala b/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala index c64a425c3ba4..080ba27ce8aa 100644 --- a/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala +++ b/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala @@ -6,11 +6,11 @@ import xsbti.api.SafeLazy.strict import scala.language.unsafeNulls -import core._ -import Contexts._ -import Flags._ -import Symbols._ -import NameOps._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* +import NameOps.* /** Utilities to deal with xsbti.api. * diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala index 5c0ade9ba048..3c14c19e0a2e 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala @@ -6,22 +6,22 @@ import dotty.tools.io.File import java.io.PrintWriter import scala.collection.mutable import scala.language.unsafeNulls -import scala.util.chaining._ +import scala.util.chaining.* import scala.util.hashing.MurmurHash3 import ExtractDependencies.internalError import ast.{Positioned, Trees, tpd} -import core._ -import core.Decorators._ -import Annotations._ -import Contexts._ -import Flags._ -import Phases._ -import Trees._ -import Types._ -import Symbols._ -import Names._ -import NameOps._ +import core.* +import core.Decorators.* +import Annotations.* +import Contexts.* +import Flags.* +import Phases.* +import Trees.* +import Types.* +import Symbols.* +import Names.* +import NameOps.* import inlines.Inlines import transform.ValueClasses diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala index bbe4d120858e..bc739f878498 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala @@ -5,15 +5,15 @@ import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.classpath.FileUtils.hasClassExtension import dotty.tools.dotc.classpath.FileUtils.hasTastyExtension import dotty.tools.dotc.classpath.FileUtils.isTasty -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.Denotations.StaleSymbol -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.NameOps._ -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.Phases._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.NameOps.* +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.Phases.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.util.NoSourcePosition import dotty.tools.dotc.util.SrcPos import dotty.tools.io @@ -23,7 +23,7 @@ import dotty.tools.io.PlainFile import dotty.tools.io.ZipArchive import xsbti.UseScope import xsbti.api.DependencyContext -import xsbti.api.DependencyContext._ +import xsbti.api.DependencyContext.* import java.io.File import java.nio.file.Path @@ -32,7 +32,7 @@ import java.util.EnumSet import scala.collection.Set import scala.collection.mutable import scala.compiletime.uninitialized -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.language.unsafeNulls /** This phase sends information on classes' dependencies to sbt via callbacks. diff --git a/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala b/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala index c18bc2ff1feb..9e2cd2ceca40 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala @@ -9,7 +9,7 @@ package dotty.tools.dotc package sbt -import xsbti.api._ +import xsbti.api.* import scala.language.unsafeNulls import scala.util.Try diff --git a/compiler/src/dotty/tools/dotc/semanticdb/ConstantOps.scala b/compiler/src/dotty/tools/dotc/semanticdb/ConstantOps.scala index 975d5480fe9b..c10767c6073c 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/ConstantOps.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/ConstantOps.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package semanticdb -import dotty.tools.dotc.{semanticdb => s} +import dotty.tools.dotc.semanticdb as s import core.Contexts.Context -import core.Constants._ +import core.Constants.* object ConstantOps: extension (const: Constant) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/Descriptor.scala b/compiler/src/dotty/tools/dotc/semanticdb/Descriptor.scala index d33afd1bd6a8..b86932797c8e 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/Descriptor.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/Descriptor.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.{Descriptor => d} +import dotty.tools.dotc.semanticdb.Descriptor as d -import java.lang.System.{lineSeparator => EOL} +import java.lang.System.lineSeparator as EOL import scala.language.unsafeNulls class DescriptorParser(s: String) { diff --git a/compiler/src/dotty/tools/dotc/semanticdb/DiagnosticOps.scala b/compiler/src/dotty/tools/dotc/semanticdb/DiagnosticOps.scala index 6096b57214a3..b8e9515a17d3 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/DiagnosticOps.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/DiagnosticOps.scala @@ -5,7 +5,7 @@ import dotty.tools.dotc.interfaces.Diagnostic.ERROR import dotty.tools.dotc.interfaces.Diagnostic.INFO import dotty.tools.dotc.interfaces.Diagnostic.WARNING import dotty.tools.dotc.reporting.Diagnostic -import dotty.tools.dotc.{semanticdb => s} +import dotty.tools.dotc.semanticdb as s import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala b/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala index 0bc7684db577..7dbcc44bb9a6 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala @@ -3,32 +3,32 @@ package dotc package semanticdb import dotty.tools.dotc.reporting.Diagnostic.Warning -import dotty.tools.dotc.semanticdb.DiagnosticOps._ -import dotty.tools.dotc.{semanticdb => s} +import dotty.tools.dotc.semanticdb as s +import dotty.tools.dotc.semanticdb.DiagnosticOps.* import dotty.tools.io.AbstractFile import dotty.tools.io.JarArchive import java.nio.file.Path import scala.PartialFunction.condOpt import scala.annotation.tailrec -import scala.annotation.{threadUnsafe => tu} +import scala.annotation.threadUnsafe as tu import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.language.unsafeNulls import scala.util.Failure import scala.util.Success import scala.util.Using -import core._ -import Phases._ -import ast.tpd._ +import core.* +import Phases.* +import ast.tpd.* import ast.Trees.{mods, WithEndMarker} -import Contexts._ -import Symbols._ -import Flags._ +import Contexts.* +import Symbols.* +import Flags.* import Names.Name import StdNames.nme -import NameOps._ +import NameOps.* import Denotations.StaleSymbol import util.Spans.Span import util.SourceFile diff --git a/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala b/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala index 2e2932b0556f..8e6ce1f7bae1 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc.semanticdb +import dotty.tools.dotc.semanticdb as s import dotty.tools.dotc.semanticdb.Scala3.given import dotty.tools.dotc.util.SourceFile -import dotty.tools.dotc.{semanticdb => s} import scala.collection.mutable -import SymbolInformation.Kind._ +import SymbolInformation.Kind.* class SymbolInformationPrinter (symtab: PrinterSymtab): val notes = InfoNotes() val infoPrinter = InfoPrinter(notes) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala b/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala index 3b3746e342cc..fc0d0485902c 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala @@ -11,14 +11,14 @@ import scala.annotation.internal.sharable import scala.annotation.switch import core.Symbols.{ Symbol , defn, NoSymbol } -import core.Contexts._ +import core.Contexts.* import core.Names import core.Names.Name import core.Types.{Type, TypeBounds} -import core.Flags._ +import core.Flags.* import core.NameKinds import core.StdNames.nme -import SymbolInformation.{Kind => k} +import SymbolInformation.Kind as k object Scala3: import Symbols.* diff --git a/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala b/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala index 7bcc8dd94987..56c03892fe50 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala @@ -5,10 +5,10 @@ package semanticdb import scala.annotation.tailrec import scala.collection.mutable -import core._ -import Contexts._ -import Symbols._ -import Flags._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* import Names.Name class SemanticSymbolBuilder: diff --git a/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala b/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala index 83e120518091..8bd5306d9d5e 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.ast.tpd._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.ast.tpd.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds import dotty.tools.dotc.core.StdNames.nme -import dotty.tools.dotc.{semanticdb => s} +import dotty.tools.dotc.semanticdb as s class SyntheticsExtractor: diff --git a/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala b/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala index 8c0f1f4000fb..ef69ed3c7241 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala @@ -4,8 +4,8 @@ import dotty.tools.dotc.semanticdb.Scala3.given import dotty.tools.dotc.util.SourceFile import java.nio.charset.StandardCharsets -import java.nio.file._ -import scala.jdk.CollectionConverters._ +import java.nio.file.* +import scala.jdk.CollectionConverters.* object Tools: diff --git a/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala b/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala index ae2b8b860945..558bf13f626e 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala @@ -3,13 +3,13 @@ package dotc package semanticdb import dotty.tools.dotc.core.Names.Designator -import dotty.tools.dotc.{semanticdb => s} +import dotty.tools.dotc.semanticdb as s import scala.util.chaining.scalaUtilChainingOps -import core.Symbols._ +import core.Symbols.* import core.Contexts.Context -import core.Types._ +import core.Types.* import core.Annotations.Annotation import core.Flags import core.Names.Name diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala index 2aacef9a5855..f8a0ecf72670 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala index 33b8ed8be424..303da6a16ccd 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala index f9a640ebabae..6bb20066bf18 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala index 4b09032c1a4d..cc100f67c2c3 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala index f645694b4c56..1e3874a25636 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala index 5bd35ec3dbf0..016d8dab39e3 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala index 7a26dd30aca0..5f3a22229511 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala index bb1af9a81ba0..e1b03b90ab15 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Schema.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Schema.scala index 707604ffd221..5605f092ffd8 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Schema.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Schema.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala index 0026f3f5883c..89006d85b43f 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala index 06b425a36ff1..939feee675ec 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala index b7886ed1d911..7458a989e112 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala index 849d905152ca..1e12f252c5d0 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala index c81c567fb9d7..c1855967dfb9 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala index 060768344a87..33a97c33ecc1 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala index 43024c6a31b9..b44a27037ef5 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Tree.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Tree.scala index e55ee2ab9445..738521b3cf6a 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Tree.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Tree.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Type.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Type.scala index 22c1d6f11b3d..ce029733e917 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/generated/Type.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/generated/Type.scala @@ -5,7 +5,7 @@ // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb -import dotty.tools.dotc.semanticdb.internal._ +import dotty.tools.dotc.semanticdb.internal.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala index f5134ef76f57..d282fa77cedd 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala @@ -7,7 +7,7 @@ import java.util.Arrays import scala.collection.mutable import scala.language.unsafeNulls -import SemanticdbInputStream._ +import SemanticdbInputStream.* object SemanticdbInputStream { diff --git a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala index 4ab7a0565096..3216129b965a 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala @@ -6,7 +6,7 @@ import java.nio.ByteBuffer import java.nio.charset.StandardCharsets import scala.language.unsafeNulls -import SemanticdbOutputStream._ +import SemanticdbOutputStream.* object SemanticdbOutputStream { diff --git a/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala b/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala index 284f93d1a7e8..265e618ef074 100644 --- a/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala +++ b/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala @@ -3,19 +3,19 @@ package staging import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.NameKinds._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.NameKinds.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.quoted.QuotePatterns -import dotty.tools.dotc.staging.QuoteTypeTags._ -import dotty.tools.dotc.staging.StagingLevel._ +import dotty.tools.dotc.staging.QuoteTypeTags.* +import dotty.tools.dotc.staging.StagingLevel.* import dotty.tools.dotc.util.Property -import dotty.tools.dotc.util.Spans._ +import dotty.tools.dotc.util.Spans.* import dotty.tools.dotc.util.SrcPos /** Checks that staging level consistency holds and heals staged types. diff --git a/compiler/src/dotty/tools/dotc/staging/HealType.scala b/compiler/src/dotty/tools/dotc/staging/HealType.scala index 829a980b7742..40fbce09c268 100644 --- a/compiler/src/dotty/tools/dotc/staging/HealType.scala +++ b/compiler/src/dotty/tools/dotc/staging/HealType.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package staging -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.staging.QuoteTypeTags._ -import dotty.tools.dotc.staging.StagingLevel._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.staging.QuoteTypeTags.* +import dotty.tools.dotc.staging.StagingLevel.* import dotty.tools.dotc.typer.Implicits.SearchFailureType import dotty.tools.dotc.util.SrcPos diff --git a/compiler/src/dotty/tools/dotc/staging/QuoteTypeTags.scala b/compiler/src/dotty/tools/dotc/staging/QuoteTypeTags.scala index c41e2629d278..467f1f440fd6 100644 --- a/compiler/src/dotty/tools/dotc/staging/QuoteTypeTags.scala +++ b/compiler/src/dotty/tools/dotc/staging/QuoteTypeTags.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc.staging import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.staging.StagingLevel._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.staging.StagingLevel.* import dotty.tools.dotc.util.Property import scala.collection.mutable.LinkedHashSet diff --git a/compiler/src/dotty/tools/dotc/staging/StagingLevel.scala b/compiler/src/dotty/tools/dotc/staging/StagingLevel.scala index 05b3efab408c..0a229881804e 100644 --- a/compiler/src/dotty/tools/dotc/staging/StagingLevel.scala +++ b/compiler/src/dotty/tools/dotc/staging/StagingLevel.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package staging -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.util.Property import dotty.tools.dotc.util.SrcPos diff --git a/compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala b/compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala index 3c14e534cade..2414c27ae30a 100644 --- a/compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala +++ b/compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala @@ -4,10 +4,10 @@ package staging import dotty.tools.dotc.ast.TreeMapWithImplicits import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.config.Printers.staging -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.staging.StagingLevel._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.staging.StagingLevel.* import scala.collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala b/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala index 588de1ef91de..6d445887e1d9 100644 --- a/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala +++ b/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Symbols._ -import Flags._ -import Names._ -import NameOps._ -import Decorators._ -import Types._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* +import Names.* +import NameOps.* +import Decorators.* +import Types.* import util.Spans.Span import config.Printers.transforms diff --git a/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala b/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala index f5e380137d40..154f66ab86da 100644 --- a/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala +++ b/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala @@ -3,15 +3,15 @@ package dotc package transform import ast.tpd -import core._ -import Contexts._ -import Decorators._ -import Symbols._ -import Flags._ -import StdNames._ +import core.* +import Contexts.* +import Decorators.* +import Symbols.* +import Flags.* +import StdNames.* import reporting.trace import util.Property -import MegaPhase._ +import MegaPhase.* /** This phase rewrites calls to `Array.apply` to a direct instantiation of the array in the bytecode. * diff --git a/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala b/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala index 7300edadcdda..e55d25f16df7 100644 --- a/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala +++ b/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala @@ -5,12 +5,12 @@ import dotty.tools.dotc.ast.tpd import scala.collection.immutable.:: -import core._ -import MegaPhase._ -import Contexts._ -import Symbols._ -import Types._ -import StdNames._ +import core.* +import MegaPhase.* +import Contexts.* +import Symbols.* +import Types.* +import StdNames.* /** This phase rewrites calls to array constructors to newArray method in Dotty.runtime.Arrays module. diff --git a/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala b/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala index 703a375c9586..e491f8b29dc8 100644 --- a/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala +++ b/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala @@ -1,17 +1,17 @@ package dotty.tools.dotc package transform -import core._ -import ast.tpd._ -import Annotations._ -import Contexts._ -import Symbols._ -import Decorators._ -import Flags._ -import Names._ -import Types._ -import util.Spans._ -import DenotTransformers._ +import core.* +import ast.tpd.* +import Annotations.* +import Contexts.* +import Symbols.* +import Decorators.* +import Flags.* +import Names.* +import Types.* +import util.Spans.* +import DenotTransformers.* class BeanProperties(thisPhase: DenotTransformer): def addBeanMethods(impl: Template)(using Context): Template = diff --git a/compiler/src/dotty/tools/dotc/transform/BetaReduce.scala b/compiler/src/dotty/tools/dotc/transform/BetaReduce.scala index a775906c622d..cef6cb1ff6b5 100644 --- a/compiler/src/dotty/tools/dotc/transform/BetaReduce.scala +++ b/compiler/src/dotty/tools/dotc/transform/BetaReduce.scala @@ -4,13 +4,13 @@ package transform import scala.collection.mutable.ListBuffer -import core._ -import Flags._ -import MegaPhase._ -import Symbols._ -import Contexts._ -import Types._ -import Decorators._ +import core.* +import Flags.* +import MegaPhase.* +import Symbols.* +import Contexts.* +import Types.* +import Decorators.* import StdNames.nme import ast.TreeTypeMap diff --git a/compiler/src/dotty/tools/dotc/transform/Bridges.scala b/compiler/src/dotty/tools/dotc/transform/Bridges.scala index 27b486f44d9d..076c756ff547 100644 --- a/compiler/src/dotty/tools/dotc/transform/Bridges.scala +++ b/compiler/src/dotty/tools/dotc/transform/Bridges.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package transform -import core._ -import Symbols._ -import Types._ -import Contexts._ -import Decorators._ -import Flags._ -import Scopes._ -import Phases._ -import DenotTransformers._ +import core.* +import Symbols.* +import Types.* +import Contexts.* +import Decorators.* +import Flags.* +import Scopes.* +import Phases.* +import DenotTransformers.* import ast.untpd import collection.{mutable, immutable} import util.SrcPos diff --git a/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala b/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala index be2f44fa138e..f9a74f6f3f42 100644 --- a/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala +++ b/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala @@ -3,18 +3,18 @@ package transform import dotty.tools.uncheckedNN -import MegaPhase._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Flags._ -import core.Decorators._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme -import core.Names._ +import core.Names.* import core.NameKinds.TempResultName -import core.Constants._ +import core.Constants.* import util.Store -import ast.tpd._ +import ast.tpd.* import compiletime.uninitialized /** This phase translates variables that are captured in closures to diff --git a/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala b/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala index 6e59a137fac7..ee4a3b9af47f 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -import core._ +import core.* import MegaPhase.MiniPhase -import Contexts._ -import Types._ -import Symbols._ -import SymDenotations._ -import Flags._ -import ast._ -import Decorators._ -import StdNames._ +import Contexts.* +import Types.* +import Symbols.* +import SymDenotations.* +import Flags.* +import ast.* +import Decorators.* +import StdNames.* object CheckLoopingImplicits: val name: String = "checkLoopingImplicits" diff --git a/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala b/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala index 886588334920..5cf8e6a4352b 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ +import core.* import MegaPhase.MiniPhase -import Contexts._ -import Types._ -import Symbols._ -import SymDenotations._ -import Flags._ -import ast._ -import Decorators._ +import Contexts.* +import Types.* +import Symbols.* +import SymDenotations.* +import Flags.* +import ast.* +import Decorators.* object CheckNoSuperThis: diff --git a/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala b/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala index 9f201dedec66..1e51ac7d5730 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* -import core._ -import Flags._ -import Contexts._ -import Symbols._ -import Decorators._ +import core.* +import Flags.* +import Contexts.* +import Symbols.* +import Decorators.* /** A no-op transform that checks whether the compiled sources are re-entrant. * If -Ycheck:reentrant is set, the phase makes sure that there are no variables diff --git a/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala b/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala index e895956c0878..3e99166b5426 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala @@ -7,10 +7,10 @@ import dotty.tools.dotc.ast.tpd.TreeTraverser import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.ast.untpd.ImportSelector import dotty.tools.dotc.cc.boxedCaptureSet -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Denotations.SingleDenotation +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Flags.EmptyFlags -import dotty.tools.dotc.core.Flags._ import dotty.tools.dotc.core.Mode.Type import dotty.tools.dotc.core.Names.Name import dotty.tools.dotc.core.Names.SimpleName diff --git a/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala b/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala index 33aad9fa74d7..1eb6f559cc9d 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala @@ -2,13 +2,13 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* -import core._ -import Flags._ -import Contexts._ -import Symbols._ -import reporting._ +import core.* +import Flags.* +import Contexts.* +import Symbols.* +import reporting.* diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index e442d093823e..e26fe221b35e 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -7,12 +7,12 @@ import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.ast.untpd.ImportSelector import dotty.tools.dotc.config.ScalaSettings import dotty.tools.dotc.core.Annotations -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Decorators.em import dotty.tools.dotc.core.Decorators.i import dotty.tools.dotc.core.Definitions import dotty.tools.dotc.core.Flags -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Flags.flagsString import dotty.tools.dotc.core.Mode import dotty.tools.dotc.core.NameKinds.WildcardParamName @@ -20,8 +20,8 @@ import dotty.tools.dotc.core.Names.Name import dotty.tools.dotc.core.Phases.Phase import dotty.tools.dotc.core.StdNames import dotty.tools.dotc.core.StdNames.nme +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Symbols.Symbol -import dotty.tools.dotc.core.Symbols._ import dotty.tools.dotc.core.Types.AnnotatedType import dotty.tools.dotc.core.Types.ConstantType import dotty.tools.dotc.core.Types.NoType diff --git a/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala b/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala index ba68190d3ff9..9563af4782a6 100644 --- a/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala +++ b/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala @@ -4,12 +4,12 @@ package transform import dotty.tools.backend.jvm.GenBCode import dotty.tools.io.JarArchive -import core._ +import core.* import ast.tpd -import MegaPhase._ -import Contexts._ -import Symbols._ -import Phases._ +import MegaPhase.* +import Contexts.* +import Symbols.* +import Phases.* /** * Small phase to be run to collect main classes and store them in the context. diff --git a/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala b/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala index 096fa0137918..476cb9dc7320 100644 --- a/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala +++ b/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc.transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Symbols.Symbol import dotty.tools.dotc.transform.MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala b/compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala index e3d1f8145aa6..55c86f4c29a7 100644 --- a/compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala +++ b/compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala @@ -2,18 +2,18 @@ package dotty.tools package dotc package transform -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* -import core._ -import Names._ +import core.* +import Names.* import StdNames.nme -import Types._ -import Flags._ -import Contexts._ -import Symbols._ -import Constants._ -import Decorators._ -import DenotTransformers._ +import Types.* +import Flags.* +import Contexts.* +import Symbols.* +import Constants.* +import Decorators.* +import DenotTransformers.* diff --git a/compiler/src/dotty/tools/dotc/transform/Constructors.scala b/compiler/src/dotty/tools/dotc/transform/Constructors.scala index dada92cae4f1..4bddf1b47c5c 100644 --- a/compiler/src/dotty/tools/dotc/transform/Constructors.scala +++ b/compiler/src/dotty/tools/dotc/transform/Constructors.scala @@ -1,21 +1,21 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.StdNames._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.StdNames.* -import core._ -import MegaPhase._ -import ast._ -import Flags._ +import core.* +import MegaPhase.* +import ast.* +import Flags.* import Names.Name -import NameOps._ +import NameOps.* import NameKinds.{FieldName, ExplicitFieldName} -import Symbols._ -import Decorators._ -import DenotTransformers._ +import Symbols.* +import Decorators.* +import DenotTransformers.* import collection.mutable -import Types._ +import Types.* object Constructors { val name: String = "constructors" diff --git a/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala b/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala index 668465b3ddfd..1ec3b759d598 100644 --- a/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala +++ b/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Symbols._ -import Types._ -import Annotations._ -import Constants._ -import Phases._ +import core.* +import Contexts.* +import Symbols.* +import Types.* +import Annotations.* +import Constants.* +import Phases.* import StdNames.nme import ast.untpd -import ast.tpd._ +import ast.tpd.* import config.Config object ContextFunctionResults: diff --git a/compiler/src/dotty/tools/dotc/transform/CookComments.scala b/compiler/src/dotty/tools/dotc/transform/CookComments.scala index 6f8231579a00..36ce892a8644 100644 --- a/compiler/src/dotty/tools/dotc/transform/CookComments.scala +++ b/compiler/src/dotty/tools/dotc/transform/CookComments.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc.transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.ContextOps._ -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.ContextOps.* +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.typer.Docstrings class CookComments extends MegaPhase.MiniPhase { diff --git a/compiler/src/dotty/tools/dotc/transform/CountOuterAccesses.scala b/compiler/src/dotty/tools/dotc/transform/CountOuterAccesses.scala index f7a734477366..354e4cc558b1 100644 --- a/compiler/src/dotty/tools/dotc/transform/CountOuterAccesses.scala +++ b/compiler/src/dotty/tools/dotc/transform/CountOuterAccesses.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* -import core._ +import core.* import MegaPhase.MiniPhase -import ast._ -import Flags._ -import Symbols._ +import ast.* +import Flags.* +import Symbols.* import ExplicitOuter.isOuterParamAccessor import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala b/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala index a8333dcabfe2..b61988b3f560 100644 --- a/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala +++ b/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala @@ -3,7 +3,7 @@ package transform import scala.compiletime.uninitialized -import core.Contexts._ +import core.Contexts.* /** Utility class for lazy values whose evaluation depends on a context. * This should be used whenever the evaluation of a lazy expression diff --git a/compiler/src/dotty/tools/dotc/transform/Dependencies.scala b/compiler/src/dotty/tools/dotc/transform/Dependencies.scala index 2a8652f530f0..2cbfffad88fe 100644 --- a/compiler/src/dotty/tools/dotc/transform/Dependencies.scala +++ b/compiler/src/dotty/tools/dotc/transform/Dependencies.scala @@ -6,12 +6,12 @@ import dotty.tools.backend.sjs.JSDefinitions.jsdefn import scala.compiletime.uninitialized -import core._ -import Symbols._ -import Contexts._ -import Types._ -import Flags._ -import Decorators._ +import core.* +import Symbols.* +import Contexts.* +import Types.* +import Flags.* +import Decorators.* import collection.mutable.{LinkedHashMap, LinkedHashSet} import annotation.constructorOnly diff --git a/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala b/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala index 7b43cea0cf67..ec891454bb84 100644 --- a/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala +++ b/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala @@ -3,17 +3,17 @@ package dotc package transform import ast.{Trees, tpd} -import core._ -import Decorators._ +import core.* +import Decorators.* import NameKinds.BoundaryName -import MegaPhase._ -import Types._ -import Contexts._ -import Flags._ -import DenotTransformers._ -import Symbols._ -import StdNames._ -import Trees._ +import MegaPhase.* +import Types.* +import Contexts.* +import Flags.* +import DenotTransformers.* +import Symbols.* +import StdNames.* +import Trees.* import util.Property import Constants.Constant import Flags.MethodOrLazy diff --git a/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala b/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala index 5865995f53de..16a4dec27e7d 100644 --- a/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* -import core._ +import core.* import MegaPhase.MiniPhase -import ast._ -import Flags._ -import Symbols._ -import Contexts._ -import Decorators._ -import DenotTransformers._ +import ast.* +import Flags.* +import Symbols.* +import Contexts.* +import Decorators.* +import DenotTransformers.* import ExplicitOuter.isOuterParamAccessor import CountOuterAccesses.mightBeDropped import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala index eb350536502f..004b76c27838 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala @@ -4,17 +4,17 @@ package transform import dotty.tools.dotc.core.Names.Name -import core._ -import Contexts._ -import Symbols._ -import Types._ -import Flags._ -import SymDenotations._ +import core.* +import Contexts.* +import Symbols.* +import Types.* +import Flags.* +import SymDenotations.* import DenotTransformers.InfoTransformer import NameKinds.SuperArgName import core.StdNames.nme -import MegaPhase._ -import Decorators._ +import MegaPhase.* +import Decorators.* import typer.RefChecks import reporting.trace diff --git a/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala b/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala index 7e9757963c8f..0c90e55c9a38 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala @@ -3,20 +3,20 @@ package dotc package transform import ast.{Trees, tpd} -import core._ -import core.Decorators._ -import MegaPhase._ -import Types._ -import Contexts._ -import Flags._ -import DenotTransformers._ -import Phases._ -import Symbols._ -import StdNames._ -import Trees._ +import core.* +import core.Decorators.* +import MegaPhase.* +import Types.* +import Contexts.* +import Flags.* +import DenotTransformers.* +import Phases.* +import Symbols.* +import StdNames.* +import Trees.* import TypeErasure.ErasedValueType -import ValueClasses._ -import reporting._ +import ValueClasses.* +import reporting.* import NameKinds.SuperAccessorName object ElimErasedValueType { diff --git a/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala b/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala index 00f1e77e3ebf..b647db7040ee 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala @@ -2,17 +2,17 @@ package dotty.tools package dotc package transform -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* -import core._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ +import core.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* import Denotations.{SingleDenotation, NonSymSingleDenotation} import SymDenotations.SymDenotation -import DenotTransformers._ -import Names._ +import DenotTransformers.* +import Names.* object ElimOpaque { val name: String = "elimOpaque" diff --git a/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala b/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala index 87c0de923c26..8527ad26e51b 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import core._ +import core.* import MegaPhase.MiniPhase -import Contexts._ -import Types._ +import Contexts.* +import Types.* import NameKinds.OuterSelectName /** This phase rewrites outer selects `E.n_` which were introduced by diff --git a/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala b/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala index 3579292c3683..b869fa6a598e 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package transform -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import ast.tpd._ -import Flags._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import ast.tpd.* +import Flags.* import MegaPhase.MiniPhase /** Eliminates syntactic references to package terms as prefixes of classes, so that there's no chance diff --git a/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala b/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala index 640241ce0f86..0d31e8e6c11a 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala @@ -2,26 +2,26 @@ package dotty.tools.dotc package transform import ast.{Trees, tpd} -import core._ -import core.Decorators._ -import MegaPhase._ +import core.* +import core.Decorators.* +import MegaPhase.* import Phases.Phase -import Types._ -import Contexts._ -import Constants._ -import Names._ -import NameOps._ -import Flags._ -import DenotTransformers._ -import SymDenotations._ -import Symbols._ -import StdNames._ -import Annotations._ -import Trees._ -import Scopes._ -import Denotations._ +import Types.* +import Contexts.* +import Constants.* +import Names.* +import NameOps.* +import Flags.* +import DenotTransformers.* +import SymDenotations.* +import Symbols.* +import StdNames.* +import Annotations.* +import Trees.* +import Scopes.* +import Denotations.* import TypeErasure.ErasedValueType -import ValueClasses._ +import ValueClasses.* /** This phase rewrite PolyFunction subclasses to FunctionN subclasses * diff --git a/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala b/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala index c56ef5a49df7..b494a9e0566d 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala @@ -2,18 +2,18 @@ package dotty.tools package dotc package transform -import core._ +import core.* import StdNames.nme -import Types._ -import transform.MegaPhase._ -import Flags._ -import Contexts._ -import Symbols._ -import Decorators._ -import Denotations._ -import SymDenotations._ -import DenotTransformers._ -import NullOpsDecorator._ +import Types.* +import transform.MegaPhase.* +import Flags.* +import Contexts.* +import Symbols.* +import Decorators.* +import Denotations.* +import SymDenotations.* +import DenotTransformers.* +import NullOpsDecorator.* object ElimRepeated { val name: String = "elimRepeated" diff --git a/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala b/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala index 2b71c98ada86..73143a97f892 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala @@ -5,9 +5,9 @@ import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Types.TermRef import dotty.tools.dotc.core.Types.ThisType -import core._ -import Contexts._ -import Flags._ +import core.* +import Contexts.* +import Flags.* import MegaPhase.MiniPhase /** Replace This references to module classes in static methods by global identifiers to the diff --git a/compiler/src/dotty/tools/dotc/transform/EmptyPhase.scala b/compiler/src/dotty/tools/dotc/transform/EmptyPhase.scala index 5554a6564678..9a287b2dd1d9 100644 --- a/compiler/src/dotty/tools/dotc/transform/EmptyPhase.scala +++ b/compiler/src/dotty/tools/dotc/transform/EmptyPhase.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package transform -import core._ +import core.* import Contexts.Context import Phases.Phase diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 79ffdd1fe9f1..84a3987493ea 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -7,36 +7,36 @@ import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.core.Constants import dotty.tools.dotc.core.Flags -import core.Phases._ -import core.DenotTransformers._ -import core.Denotations._ -import core.SymDenotations._ -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Names._ -import core.StdNames._ -import core.NameOps._ +import core.Phases.* +import core.DenotTransformers.* +import core.Denotations.* +import core.SymDenotations.* +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Names.* +import core.StdNames.* +import core.NameOps.* import core.NameKinds.{AdaptedClosureName, BodyRetainerName, DirectMethName} import core.Scopes.newScopeWith -import core.Decorators._ -import core.Constants._ -import core.Definitions._ +import core.Decorators.* +import core.Constants.* +import core.Definitions.* import core.Annotations.BodyAnnotation import typer.NoChecking import inlines.Inlines -import typer.ProtoTypes._ +import typer.ProtoTypes.* import typer.ErrorReporting.errorTree import typer.Checking.checkValue -import core.TypeErasure._ -import core.Decorators._ +import core.TypeErasure.* +import core.Decorators.* import ast.TreeTypeMap -import ValueClasses._ -import ContextFunctionResults._ -import ExplicitOuter._ +import ValueClasses.* +import ContextFunctionResults.* +import ExplicitOuter.* import core.Mode import util.Property -import reporting._ +import reporting.* class Erasure extends Phase with DenotTransformer { diff --git a/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala b/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala index 11a0c6d7c6e8..78334ce98925 100644 --- a/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala +++ b/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala @@ -3,11 +3,11 @@ package dotc package transform import MegaPhase.MiniPhase -import core._ -import Symbols._ -import Contexts._ -import Types._ -import Decorators._ +import core.* +import Symbols.* +import Contexts.* +import Types.* +import Decorators.* import StdNames.nme import NameKinds.AdaptedClosureName diff --git a/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala b/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala index 8a3068dfd2f8..432089b6f5f1 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala @@ -5,14 +5,14 @@ import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer import java.io.File.separatorChar -import core._ -import Contexts._ -import Symbols._ -import Flags._ -import SymDenotations._ -import Decorators._ -import MegaPhase._ -import ValueClasses._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* +import SymDenotations.* +import Decorators.* +import MegaPhase.* +import ValueClasses.* /** Make private term members that are accessed from another class * non-private by resetting the Private flag and expanding their name. diff --git a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala index c6b698b90dcc..a0cdfe6c5b37 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala @@ -2,18 +2,18 @@ package dotty.tools package dotc package transform -import core._ +import core.* import Scopes.newScope -import Contexts._ -import Symbols._ -import Types._ -import Flags._ -import Decorators._ -import StdNames._ -import Constants._ -import MegaPhase._ +import Contexts.* +import Symbols.* +import Types.* +import Flags.* +import Decorators.* +import StdNames.* +import Constants.* +import MegaPhase.* import Names.TypeName -import NullOpsDecorator._ +import NullOpsDecorator.* import ast.untpd /** Expand SAM closures that cannot be represented by the JVM as lambdas to anonymous classes. diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 5b6b8b09d196..b7c9c841c323 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -6,17 +6,17 @@ import dotty.tools.dotc.ast.tpd import scala.annotation.tailrec -import MegaPhase._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Phases._ -import core.Types._ -import core.Flags._ -import core.Decorators._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Phases.* +import core.Types.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme -import core.Names._ -import core.NameOps._ +import core.Names.* +import core.NameOps.* import core.NameKinds.SuperArgName import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala index eb09810eeb53..740473d71b6f 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ -import Types._ -import MegaPhase._ -import ast.Trees._ -import Symbols._ -import Decorators._ -import Flags._ +import core.* +import Contexts.* +import Types.* +import MegaPhase.* +import ast.Trees.* +import Symbols.* +import Decorators.* +import Flags.* /** Transform references of the form diff --git a/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala b/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala index 42f96af17922..93eb99216943 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala @@ -6,25 +6,25 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* import scala.collection.mutable -import ValueClasses._ -import core._ -import Types._ -import Contexts._ -import Names._ -import Flags._ -import DenotTransformers._ -import Phases._ -import SymDenotations._ -import Symbols._ -import StdNames._ -import Denotations._ +import ValueClasses.* +import core.* +import Types.* +import Contexts.* +import Names.* +import Flags.* +import DenotTransformers.* +import Phases.* +import SymDenotations.* +import Symbols.* +import StdNames.* +import Denotations.* import TypeErasure.{ valueErasure, ErasedValueType } import NameKinds.{ExtMethName, BodyRetainerName} -import Decorators._ +import Decorators.* /** * Perform Step 1 in the inline classes SIP: Creates extension methods for all diff --git a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala index 8d6f4b4e3ece..ae72243cada8 100644 --- a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala @@ -1,23 +1,23 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* import scala.collection.mutable -import core._ -import Names._ +import core.* +import Names.* import ast.untpd -import Flags._ -import Types._ +import Flags.* +import Types.* import Constants.Constant -import Contexts._ -import Symbols._ -import Decorators._ -import DenotTransformers._ -import NameOps._ +import Contexts.* +import Symbols.* +import Decorators.* +import DenotTransformers.* +import NameOps.* import NameKinds.OuterSelectName -import StdNames._ +import StdNames.* import config.Feature import inlines.Inlines.inInlineMethod diff --git a/compiler/src/dotty/tools/dotc/transform/Flatten.scala b/compiler/src/dotty/tools/dotc/transform/Flatten.scala index 836f75733215..4dcbd0bd0000 100644 --- a/compiler/src/dotty/tools/dotc/transform/Flatten.scala +++ b/compiler/src/dotty/tools/dotc/transform/Flatten.scala @@ -3,10 +3,10 @@ package transform import scala.compiletime.uninitialized -import core._ +import core.* import DenotTransformers.SymTransformer -import Contexts._ -import Flags._ +import Contexts.* +import Flags.* import SymDenotations.SymDenotation import collection.mutable import MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/ForwardDepChecks.scala b/compiler/src/dotty/tools/dotc/transform/ForwardDepChecks.scala index 8ca91ef2cbcc..c1a1dde5cbdc 100644 --- a/compiler/src/dotty/tools/dotc/transform/ForwardDepChecks.scala +++ b/compiler/src/dotty/tools/dotc/transform/ForwardDepChecks.scala @@ -4,13 +4,13 @@ package transform import scala.compiletime.uninitialized -import core._ -import Symbols._ -import Types._ -import Contexts._ -import Flags._ -import Decorators._ -import reporting._ +import core.* +import Symbols.* +import Types.* +import Contexts.* +import Flags.* +import Decorators.* +import reporting.* import util.Spans.Span import util.Store import collection.immutable diff --git a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala index ffa5def0be5f..dbb4c72ab311 100644 --- a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala +++ b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package transform -import core._ -import Types._ -import Contexts._ -import Symbols._ -import Decorators._ +import core.* +import Types.* +import Contexts.* +import Symbols.* +import Decorators.* import StdNames.nme -import ast._ +import ast.* /** Provides methods to produce fully parameterized versions of instance methods, * where the `this` of the enclosing class is abstracted out in an extra leading diff --git a/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala b/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala index 9c4f07605d38..4cf176cfda3a 100644 --- a/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala +++ b/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -import core._ +import core.* import Constants.Constant -import Contexts._ -import Flags._ -import Definitions._ -import DenotTransformers._ -import StdNames._ -import Symbols._ -import MegaPhase._ -import Types._ +import Contexts.* +import Flags.* +import Definitions.* +import DenotTransformers.* +import StdNames.* +import Symbols.* +import MegaPhase.* +import Types.* /** This phase adds forwarder for XXL functions `apply` methods that are implemented with a method diff --git a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala index 784e89fdb59a..5d2ded27d231 100644 --- a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala +++ b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala @@ -5,17 +5,17 @@ package transform import java.lang.StringBuilder import scala.collection.mutable.ListBuffer -import core.Annotations._ -import core.Contexts._ -import core.Phases._ -import core.Decorators._ +import core.Annotations.* +import core.Contexts.* +import core.Phases.* +import core.Decorators.* import core.Definitions -import core.Flags._ +import core.Flags.* import core.Names.Name -import core.Symbols._ +import core.Symbols.* import core.TypeApplications.{EtaExpansion, TypeParamInfo} import core.TypeErasure.{erasedGlb, erasure, fullErasure, isGenericArrayElement, tupleArity} -import core.Types._ +import core.Types.* import core.classfile.ClassfileConstants import config.Printers.transforms import reporting.trace diff --git a/compiler/src/dotty/tools/dotc/transform/Getters.scala b/compiler/src/dotty/tools/dotc/transform/Getters.scala index e7baa017a122..a0a3039bc72c 100644 --- a/compiler/src/dotty/tools/dotc/transform/Getters.scala +++ b/compiler/src/dotty/tools/dotc/transform/Getters.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ +import core.* import DenotTransformers.SymTransformer -import Contexts._ +import Contexts.* import SymDenotations.SymDenotation -import Types._ -import Symbols._ -import MegaPhase._ -import Flags._ -import NameOps._ +import Types.* +import Symbols.* +import MegaPhase.* +import Flags.* +import NameOps.* /** Performs the following rewritings for fields of a class: diff --git a/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala b/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala index b38efbe15f52..201c57e480ac 100644 --- a/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala +++ b/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala @@ -1,18 +1,18 @@ package dotty.tools.dotc package transform -import MegaPhase._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* import ast.TreeTypeMap -import core.Types._ -import core.Flags._ -import core.Decorators._ +import core.Types.* +import core.Flags.* +import core.Decorators.* import collection.mutable -import ast.Trees._ +import ast.Trees.* import core.NameKinds.SuperArgName -import core.Decorators._ +import core.Decorators.* object HoistSuperArgs { val name: String = "hoistSuperArgs" diff --git a/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala b/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala index 802d4ed72c62..3a2b15bcca34 100644 --- a/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala +++ b/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala @@ -4,14 +4,14 @@ package transform import scala.collection.mutable.ListBuffer -import core._ -import MegaPhase._ -import Symbols._ -import Contexts._ -import Types._ -import Decorators._ -import NameOps._ -import Names._ +import core.* +import MegaPhase.* +import Symbols.* +import Contexts.* +import Types.* +import Decorators.* +import NameOps.* +import Names.* /** Rewrite an application * diff --git a/compiler/src/dotty/tools/dotc/transform/InlineVals.scala b/compiler/src/dotty/tools/dotc/transform/InlineVals.scala index d451571366e8..680f63310b08 100644 --- a/compiler/src/dotty/tools/dotc/transform/InlineVals.scala +++ b/compiler/src/dotty/tools/dotc/transform/InlineVals.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package transform -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.inlines.Inlines import dotty.tools.dotc.transform.MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/Inlining.scala b/compiler/src/dotty/tools/dotc/transform/Inlining.scala index 748aeeef3a5b..b45b9f67b504 100644 --- a/compiler/src/dotty/tools/dotc/transform/Inlining.scala +++ b/compiler/src/dotty/tools/dotc/transform/Inlining.scala @@ -2,19 +2,19 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.TreeMapWithImplicits -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer import dotty.tools.dotc.inlines.Inlines -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.staging.StagingLevel import scala.collection.mutable.ListBuffer -import core._ -import Flags._ -import Contexts._ -import Symbols._ +import core.* +import Flags.* +import Contexts.* +import Symbols.* /** Inlines all calls to inline methods that are not in an inline method or a quote */ class Inlining extends MacroTransform, IdentityDenotTransformer { diff --git a/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala b/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala index 444798fde4a9..2723f726f064 100644 --- a/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala +++ b/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala @@ -3,17 +3,17 @@ package transform import java.io.File -import ast.tpd._ +import ast.tpd.* import collection.mutable -import core.Flags._ +import core.Flags.* import core.Contexts.{Context, ctx, inContext} import core.DenotTransformers.IdentityDenotTransformer import core.Symbols.{defn, Symbol} import core.Constants.Constant import core.NameOps.isContextFunction import core.StdNames.nme -import core.Types._ -import coverage._ +import core.Types.* +import coverage.* import typer.LiftCoverage import util.{SourcePosition, SourceFile} import util.Spans.Span diff --git a/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala b/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala index b8885432fc20..7504e62febc9 100644 --- a/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala +++ b/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala @@ -4,13 +4,13 @@ package transform import scala.compiletime.uninitialized -import core._ -import Contexts._ -import Symbols._ -import Flags._ -import Decorators._ -import MegaPhase._ -import Names._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* +import Decorators.* +import MegaPhase.* +import Names.* import Constants.Constant diff --git a/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala b/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala index 73da83fd8467..c2fdccc2861e 100644 --- a/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala @@ -3,11 +3,11 @@ package transform import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Constants.Constant -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Names.TermName -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase object InterceptedMethods { diff --git a/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala b/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala index 7404603263c2..db20885191c1 100644 --- a/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala +++ b/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala @@ -3,17 +3,17 @@ package transform import scala.compiletime.uninitialized -import MegaPhase._ +import MegaPhase.* import core.Denotations.NonSymSingleDenotation -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Flags._ -import core.Decorators._ +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme -import core.Names._ -import core.NameOps._ +import core.Names.* +import core.NameOps.* import core.NameKinds.ExpandPrefixName import ExplicitOuter.outer import util.Store diff --git a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala index d36c632c8168..0ff11d7e1fe7 100644 --- a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala +++ b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala @@ -10,14 +10,14 @@ import scala.compiletime.uninitialized import ast.tpd import core.Annotations.Annotation import core.Constants.Constant -import core.Contexts._ -import core.Decorators._ +import core.Contexts.* +import core.Decorators.* import core.DenotTransformers.IdentityDenotTransformer -import core.Flags._ +import core.Flags.* import core.NameKinds.{ExpandedName, LazyBitMapName, LazyLocalInitName, LazyLocalName} import core.StdNames.nme -import core.Symbols._ -import core.Types._ +import core.Symbols.* +import core.Types.* import core.{Names, StdNames} import transform.MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala b/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala index e3962b96f46e..8cdf9ae9e7f6 100644 --- a/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala +++ b/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Symbols._ -import Decorators._ -import MegaPhase._ +import core.* +import Contexts.* +import Symbols.* +import Decorators.* +import MegaPhase.* /** Rewrite `{ stats; expr}.f(args)` to `{ stats; expr.f(args) }` and * `{ stats; expr }(args)` to `{ stats; expr(args) }` before proceeding, diff --git a/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala b/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala index 98ac6a9043fb..95a35e4c00d8 100644 --- a/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala +++ b/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala @@ -1,18 +1,18 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.config.Printers.{macroAnnot => debug} -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.config.Printers.macroAnnot as debug +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.MacroClassLoader -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.util.SrcPos import java.lang.reflect.InvocationTargetException diff --git a/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala b/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala index 2dd13e6fdcff..887a962f7a65 100644 --- a/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import core._ -import Phases._ -import ast.Trees._ -import Contexts._ +import core.* +import Phases.* +import ast.Trees.* +import Contexts.* /** A base class for transforms. * A transform contains a compiler phase which applies a tree transformer. diff --git a/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala b/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala index 825b8f2af160..bb63fa4b4ac3 100644 --- a/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala +++ b/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala @@ -4,13 +4,13 @@ package transform import scala.compiletime.uninitialized -import core._ -import Contexts._ -import Phases._ -import Symbols._ -import Decorators._ +import core.* +import Contexts.* +import Phases.* +import Symbols.* +import Decorators.* import Flags.PackageVal -import staging.StagingLevel._ +import staging.StagingLevel.* /** A MegaPhase combines a number of mini-phases which are all executed in * a single tree traversal. diff --git a/compiler/src/dotty/tools/dotc/transform/Memoize.scala b/compiler/src/dotty/tools/dotc/transform/Memoize.scala index 4dcb2c646a92..217022328e3a 100644 --- a/compiler/src/dotty/tools/dotc/transform/Memoize.scala +++ b/compiler/src/dotty/tools/dotc/transform/Memoize.scala @@ -3,20 +3,20 @@ package transform import scala.compiletime.uninitialized -import core._ -import DenotTransformers._ -import Contexts._ -import Phases._ +import core.* +import DenotTransformers.* +import Contexts.* +import Phases.* import SymDenotations.SymDenotation -import Denotations._ -import Symbols._ -import Constants._ -import MegaPhase._ -import NameOps._ -import Flags._ -import Decorators._ +import Denotations.* +import Symbols.* +import Constants.* +import MegaPhase.* +import NameOps.* +import Flags.* +import Decorators.* import StdNames.nme -import sjs.JSSymUtils._ +import sjs.JSSymUtils.* import util.Store object Memoize { diff --git a/compiler/src/dotty/tools/dotc/transform/Mixin.scala b/compiler/src/dotty/tools/dotc/transform/Mixin.scala index 5a7827be2f49..fdab94808ef1 100644 --- a/compiler/src/dotty/tools/dotc/transform/Mixin.scala +++ b/compiler/src/dotty/tools/dotc/transform/Mixin.scala @@ -2,20 +2,20 @@ package dotty.tools package dotc package transform -import core._ -import MegaPhase._ -import Contexts._ -import Flags._ -import Symbols._ -import SymDenotations._ -import Types._ -import Decorators._ -import DenotTransformers._ -import StdNames._ -import Names._ -import NameKinds._ -import NameOps._ -import ast.Trees._ +import core.* +import MegaPhase.* +import Contexts.* +import Flags.* +import Symbols.* +import SymDenotations.* +import Types.* +import Decorators.* +import DenotTransformers.* +import StdNames.* +import Names.* +import NameKinds.* +import NameOps.* +import ast.Trees.* object Mixin { val name: String = "mixin" diff --git a/compiler/src/dotty/tools/dotc/transform/MixinOps.scala b/compiler/src/dotty/tools/dotc/transform/MixinOps.scala index 7356e3169028..5677667f844e 100644 --- a/compiler/src/dotty/tools/dotc/transform/MixinOps.scala +++ b/compiler/src/dotty/tools/dotc/transform/MixinOps.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ -import Symbols._ -import Types._ -import Contexts._ -import DenotTransformers._ -import Flags._ -import util.Spans._ -import StdNames._ -import NameOps._ +import core.* +import Symbols.* +import Types.* +import Contexts.* +import DenotTransformers.* +import Flags.* +import util.Spans.* +import StdNames.* +import NameOps.* import typer.Nullables class MixinOps(cls: ClassSymbol, thisPhase: DenotTransformer)(using Context) { diff --git a/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala b/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala index 03504f6c1274..fcc1c1802607 100644 --- a/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala +++ b/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala @@ -1,19 +1,19 @@ package dotty.tools.dotc package transform -import core._ -import Flags._ -import Contexts._ -import Symbols._ +import core.* +import Flags.* +import Contexts.* +import Symbols.* import DenotTransformers.SymTransformer import Types.MethodType import Annotations.Annotation import SymDenotations.SymDenotation import Names.Name import StdNames.nme -import NameOps._ -import ast._ -import MegaPhase._ +import NameOps.* +import ast.* +import MegaPhase.* /** Move static methods from companion to the class itself */ class MoveStatics extends MiniPhase with SymTransformer { diff --git a/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala b/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala index 2d10ccb45af3..7223c839e08f 100644 --- a/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala +++ b/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala @@ -3,15 +3,15 @@ package transform import dotty.tools.dotc.config.MigrationVersion -import core._ -import Contexts._ -import Symbols._ -import Types._ -import Flags._ -import StdNames._ -import MegaPhase._ +import core.* +import Contexts.* +import Symbols.* +import Types.* +import Flags.* +import StdNames.* +import MegaPhase.* import NameKinds.NonLocalReturnKeyName -import config.SourceVersion._ +import config.SourceVersion.* import Decorators.em object NonLocalReturns { diff --git a/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala b/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala index 1db17cfd0c40..28634b633e7d 100644 --- a/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala +++ b/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala @@ -5,15 +5,15 @@ package transform import scala.annotation.tailrec import scala.compiletime.uninitialized -import core._ -import Flags._ -import Symbols._ -import Contexts._ -import Scopes._ -import Decorators._ +import core.* +import Flags.* +import Symbols.* +import Contexts.* +import Scopes.* +import Decorators.* import Types.Type import NameKinds.DefaultGetterName -import NullOpsDecorator._ +import NullOpsDecorator.* import collection.immutable.BitSet import cc.isCaptureChecking diff --git a/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala b/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala index 8302b1f417ee..f45c4cbe87bc 100644 --- a/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala +++ b/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Types._ -import Symbols._ -import Flags._ -import DenotTransformers._ -import StdNames._ -import Decorators._ -import MegaPhase._ +import core.* +import Contexts.* +import Types.* +import Symbols.* +import Flags.* +import DenotTransformers.* +import StdNames.* +import Decorators.* +import MegaPhase.* import NameKinds.ParamAccessorName /** For all private parameter accessors diff --git a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala index 5b2370916a90..ae4f2470ea88 100644 --- a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -5,25 +5,25 @@ package transform import scala.annotation.tailrec import scala.collection.mutable -import core._ -import MegaPhase._ -import Symbols._ -import Contexts._ -import Types._ -import StdNames._ -import NameOps._ +import core.* +import MegaPhase.* +import Symbols.* +import Contexts.* +import Types.* +import StdNames.* +import NameOps.* import patmat.SpaceEngine -import util.Spans._ -import typer.Applications._ -import Annotations._ -import Flags._ -import Constants._ -import Decorators._ +import util.Spans.* +import typer.Applications.* +import Annotations.* +import Flags.* +import Constants.* +import Decorators.* import NameKinds.{PatMatStdBinderName, PatMatAltsName, PatMatResultName} import config.Printers.patmatch -import reporting._ -import ast._ -import util.Property._ +import reporting.* +import ast.* +import util.Property.* /** The pattern matching transform. * After this phase, the only Match nodes remaining in the code are simple switches diff --git a/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala b/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala index a41f5e61ad74..f1bd7145cea2 100644 --- a/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala +++ b/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala @@ -3,26 +3,26 @@ package transform import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd -import dotty.tools.dotc.config.ScalaRelease._ -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.StdNames._ +import dotty.tools.dotc.config.ScalaRelease.* +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.inlines.Inlines -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.quoted.* import scala.annotation.constructorOnly import scala.collection.mutable -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import Constants._ -import ast.Trees._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import Constants.* +import ast.Trees.* import ast.untpd import ast.TreeTypeMap -import NameKinds._ +import NameKinds.* /** Translates quoted terms and types to `unpickleExprV2` or `unpickleType` method calls. * diff --git a/compiler/src/dotty/tools/dotc/transform/Pickler.scala b/compiler/src/dotty/tools/dotc/transform/Pickler.scala index 0f503ea444e8..38a991c4b94f 100644 --- a/compiler/src/dotty/tools/dotc/transform/Pickler.scala +++ b/compiler/src/dotty/tools/dotc/transform/Pickler.scala @@ -7,17 +7,17 @@ import dotty.tools.io.JarArchive import java.io.PrintStream -import core._ -import Contexts._ -import Decorators._ -import tasty._ +import core.* +import Contexts.* +import Decorators.* +import tasty.* import config.Printers.{noPrinter, pickling} import config.Feature import io.ClassfileWriterOps import StdNames.{str, nme} -import Periods._ -import Phases._ -import Symbols._ +import Periods.* +import Phases.* +import Symbols.* import Flags.Module import reporting.{ThrowingReporter, Profile, Message} import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/PostInlining.scala b/compiler/src/dotty/tools/dotc/transform/PostInlining.scala index 32e8333e17c0..26c956d85d18 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostInlining.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostInlining.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ +import core.* +import Contexts.* import DenotTransformers.IdentityDenotTransformer -import SyntheticMembers._ -import ast.tpd._ +import SyntheticMembers.* +import ast.tpd.* /** A phase that adds mirror support for anonymous mirrors created at inlining. */ class PostInlining extends MacroTransform, IdentityDenotTransformer: diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala index a77c55043a15..84fb826fb6ab 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala @@ -12,27 +12,27 @@ import dotty.tools.dotc.typer.VarianceChecker import scala.collection.mutable -import core._ +import core.* import typer.ErrorReporting.errorTree -import Types._ -import Contexts._ -import Names._ -import Flags._ -import DenotTransformers._ -import Phases._ -import SymDenotations._ -import StdNames._ -import Annotations._ -import Trees._ -import Scopes._ -import Decorators._ -import Symbols._ -import NameOps._ +import Types.* +import Contexts.* +import Names.* +import Flags.* +import DenotTransformers.* +import Phases.* +import SymDenotations.* +import StdNames.* +import Annotations.* +import Trees.* +import Scopes.* +import Decorators.* +import Symbols.* +import NameOps.* import ContextFunctionResults.annotateContextResults import config.Printers.typr import config.Feature import util.SrcPos -import reporting._ +import reporting.* import NameKinds.WildcardParamName object PostTyper { diff --git a/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala b/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala index 938786e51d2d..7e4904635a5c 100644 --- a/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala @@ -3,11 +3,11 @@ package transform import dotty.tools.dotc.util.Property -import core.Contexts._ -import core.NameKinds._ -import core.Symbols._ -import core.Flags._ -import core.Decorators._ +import core.Contexts.* +import core.NameKinds.* +import core.Symbols.* +import core.Flags.* +import core.Decorators.* import core.Names.TermName import MegaPhase.MiniPhase import config.Printers.transforms diff --git a/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala b/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala index 3aa057375513..b069347e8855 100644 --- a/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala +++ b/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala @@ -3,17 +3,17 @@ package transform import dotty.tools.dotc.core.Types.MethodType -import core._ -import Contexts._ +import core.* +import Contexts.* import DenotTransformers.SymTransformer -import Flags._ -import SymDenotations._ -import Symbols._ +import Flags.* +import SymDenotations.* +import Symbols.* import typer.RefChecks import MegaPhase.MiniPhase import ast.tpd import config.Feature -import Decorators._ +import Decorators.* /** This phase makes all erased term members of classes private so that they cannot * conflict with non-erased members. This is needed so that subsequent phases like diff --git a/compiler/src/dotty/tools/dotc/transform/PureStats.scala b/compiler/src/dotty/tools/dotc/transform/PureStats.scala index e81c3412a369..e7568d6fe7b8 100644 --- a/compiler/src/dotty/tools/dotc/transform/PureStats.scala +++ b/compiler/src/dotty/tools/dotc/transform/PureStats.scala @@ -2,16 +2,16 @@ package dotty.tools.dotc package transform import ast.{Trees, tpd} -import core._ -import core.Decorators._ -import MegaPhase._ -import Types._ -import Contexts._ -import Flags._ -import DenotTransformers._ -import Symbols._ -import StdNames._ -import Trees._ +import core.* +import core.Decorators.* +import MegaPhase.* +import Types.* +import Contexts.* +import Flags.* +import DenotTransformers.* +import Symbols.* +import StdNames.* +import Trees.* object PureStats { val name: String = "pureStats" diff --git a/compiler/src/dotty/tools/dotc/transform/Recheck.scala b/compiler/src/dotty/tools/dotc/transform/Recheck.scala index 5f634fc229cd..7e34cf1a32ab 100644 --- a/compiler/src/dotty/tools/dotc/transform/Recheck.scala +++ b/compiler/src/dotty/tools/dotc/transform/Recheck.scala @@ -2,24 +2,24 @@ package dotty.tools package dotc package transform -import core._ -import Symbols._ -import Contexts._ -import Types._ -import ContextOps._ -import Decorators._ -import SymDenotations._ -import Flags._ -import NameKinds._ +import core.* +import Symbols.* +import Contexts.* +import Types.* +import ContextOps.* +import Decorators.* +import SymDenotations.* +import Flags.* +import NameKinds.* import Denotations.{Denotation, SingleDenotation} -import ast._ +import ast.* import Names.Name import Phases.Phase import DenotTransformers.{DenotTransformer, IdentityDenotTransformer, SymTransformer} import NamerOps.{methodType, linkConstructorParams} import NullOpsDecorator.stripNull import typer.ErrorReporting.err -import typer.ProtoTypes._ +import typer.ProtoTypes.* import typer.TypeAssigner.seqLitType import typer.ConstFold import typer.ErrorReporting.{Addenda, NothingToAdd} diff --git a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala index 61c0d219479e..92ca22d680c0 100644 --- a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala +++ b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala @@ -2,22 +2,22 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.quoted.* import scala.annotation.constructorOnly import scala.collection.mutable -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import NameKinds._ -import tpd._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import NameKinds.* +import tpd.* /** Helper methods to construct trees calling methods in `Quotes.reflect` based on the current `quotes` tree */ trait ReifiedReflect: diff --git a/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala b/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala index 3b1aa8c2e636..9b5473c36522 100644 --- a/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala +++ b/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala @@ -3,16 +3,16 @@ package transform import scala.collection.mutable -import core._ -import ast.tpd._ -import Contexts._ -import MegaPhase._ -import Annotations._ +import core.* +import ast.tpd.* +import Contexts.* +import MegaPhase.* +import Annotations.* import Symbols.defn -import Constants._ -import Types._ -import Decorators._ -import Flags._ +import Constants.* +import Types.* +import Decorators.* +import Flags.* class RepeatableAnnotations extends MiniPhase: diff --git a/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala b/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala index 749bb37202e4..8a15c5b50b12 100644 --- a/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala +++ b/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala @@ -1,18 +1,18 @@ package dotty.tools.dotc package transform -import core._ -import MegaPhase._ -import Contexts._ -import Flags._ -import Symbols._ -import Decorators._ -import DenotTransformers._ -import Names._ -import NameOps._ -import NameKinds._ -import NullOpsDecorator._ -import ResolveSuper._ +import core.* +import MegaPhase.* +import Contexts.* +import Flags.* +import Symbols.* +import Decorators.* +import DenotTransformers.* +import Names.* +import NameOps.* +import NameKinds.* +import NullOpsDecorator.* +import ResolveSuper.* import reporting.IllegalSuperAccessor /** This phase implements super accessors in classes that need them. diff --git a/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala b/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala index 19e754c793a0..e66f5e4b37b8 100644 --- a/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala +++ b/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package transform -import core._ +import core.* import DenotTransformers.IdentityDenotTransformer -import Contexts._ -import Symbols._ -import Scopes._ +import Contexts.* +import Symbols.* +import Scopes.* import MegaPhase.MiniPhase /** The preceding lambda lift and flatten phases move symbols to different scopes diff --git a/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala b/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala index 967286dd9ce6..08cd1eb30d0f 100644 --- a/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala +++ b/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala @@ -2,12 +2,12 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.* +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core._ -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.transform.MegaPhase.* /** Removes `Select`s that would be compiled into `GetStatic`. diff --git a/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala b/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala index b3672e1e7d2a..53efa4863974 100644 --- a/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala +++ b/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* -import core._ -import Contexts._ +import core.* +import Contexts.* /** A transformer that eliminates SeqLiteral's, transforming `SeqLiteral(elems)` to an operation * equivalent to diff --git a/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala b/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala index d17dbbecc555..f62b1f5f01f2 100644 --- a/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala +++ b/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.Phase /** Set the `rootTreeOrProvider` property of class symbols. */ diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala index aaa4d50def03..fcd87d166e59 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala @@ -3,19 +3,19 @@ package transform import scala.collection.mutable -import ast.Trees._ +import ast.Trees.* import ast.tpd -import core._ -import Contexts._ -import Types._ -import Decorators._ -import Symbols._ -import DenotTransformers._ -import SymDenotations._ -import Scopes._ -import StdNames._ -import NameOps._ -import Names._ +import core.* +import Contexts.* +import Types.* +import Decorators.* +import Symbols.* +import DenotTransformers.* +import SymDenotations.* +import Scopes.* +import StdNames.* +import NameOps.* +import Names.* import MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala index 83f74fc50eb1..a80f3572afe8 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala @@ -1,19 +1,19 @@ package dotty.tools.dotc package transform -import ast.Trees._ +import ast.Trees.* import ast.tpd -import core._ -import Contexts._ -import Types._ -import Decorators._ -import Symbols._ -import DenotTransformers._ -import SymDenotations._ -import Scopes._ -import StdNames._ -import NameOps._ -import Names._ +import core.* +import Contexts.* +import Types.* +import Decorators.* +import Symbols.* +import DenotTransformers.* +import SymDenotations.* +import Scopes.* +import StdNames.* +import NameOps.* +import Names.* import MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeTuples.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeTuples.scala index abe2c4c35627..6da2813ca128 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeTuples.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeTuples.scala @@ -2,19 +2,19 @@ package dotty.tools package dotc package transform -import ast.Trees._ +import ast.Trees.* import ast.tpd -import core._ -import Contexts._ -import Types._ -import Decorators._ -import Symbols._ -import DenotTransformers._ -import SymDenotations._ -import Scopes._ -import StdNames._ -import NameOps._ -import Names._ +import core.* +import Contexts.* +import Types.* +import Decorators.* +import Symbols.* +import DenotTransformers.* +import SymDenotations.* +import Scopes.* +import StdNames.* +import NameOps.* +import Names.* import MegaPhase.MiniPhase import inlines.Inliner.isElideableExpr diff --git a/compiler/src/dotty/tools/dotc/transform/Splicer.scala b/compiler/src/dotty/tools/dotc/transform/Splicer.scala index 0169f480d0d3..463511b8becb 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicer.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicer.scala @@ -3,17 +3,17 @@ package transform import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Constants.Constant -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.Denotations.staticRef -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds import dotty.tools.dotc.core.NameKinds.FlatName import dotty.tools.dotc.core.Names.Name -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.TypeErasure -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.quoted.Interpreter import dotty.tools.dotc.quoted.PickledQuotes import dotty.tools.dotc.quoted.QuoteUtils @@ -23,10 +23,10 @@ import dotty.tools.repl.AbstractFileClassLoader import java.io.PrintWriter import java.io.StringWriter import java.lang.reflect.InvocationTargetException -import java.lang.reflect.{Method => JLRMethod} +import java.lang.reflect.Method as JLRMethod import scala.language.unsafeNulls import scala.quoted.Quotes -import scala.quoted.runtime.impl._ +import scala.quoted.runtime.impl.* import scala.reflect.ClassTag import scala.util.control.NonFatal diff --git a/compiler/src/dotty/tools/dotc/transform/Splicing.scala b/compiler/src/dotty/tools/dotc/transform/Splicing.scala index d2abd0c5d572..ccc32c34a957 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicing.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicing.scala @@ -2,29 +2,29 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.config.ScalaRelease._ -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.config.ScalaRelease.* +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.staging.QuoteTypeTags -import dotty.tools.dotc.staging.QuoteTypeTags._ -import dotty.tools.dotc.staging.StagingLevel._ +import dotty.tools.dotc.staging.QuoteTypeTags.* +import dotty.tools.dotc.staging.StagingLevel.* import scala.annotation.constructorOnly import scala.collection.mutable -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import Constants._ -import ast.Trees._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import Constants.* +import ast.Trees.* import ast.{TreeTypeMap, untpd} -import util.Spans._ -import NameKinds._ +import util.Spans.* +import NameKinds.* object Splicing: val name: String = "splicing" diff --git a/compiler/src/dotty/tools/dotc/transform/Staging.scala b/compiler/src/dotty/tools/dotc/transform/Staging.scala index 578fcd0271eb..7b7b7a11c1f1 100644 --- a/compiler/src/dotty/tools/dotc/transform/Staging.scala +++ b/compiler/src/dotty/tools/dotc/transform/Staging.scala @@ -2,16 +2,16 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Phases._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Phases.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.inlines.Inlines import dotty.tools.dotc.staging.CrossStageSafety import dotty.tools.dotc.staging.HealType -import dotty.tools.dotc.staging.StagingLevel._ +import dotty.tools.dotc.staging.StagingLevel.* import dotty.tools.dotc.util.SrcPos /** Checks that staging level consistency holds and heals types used in higher levels. diff --git a/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala b/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala index e1bb7533874c..518ae171161d 100644 --- a/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala @@ -8,18 +8,18 @@ import dotty.tools.dotc.ast.tpd import scala.collection.mutable import ValueClasses.isMethodWithExtension -import core._ -import Contexts._ -import Flags._ -import Symbols._ -import Names._ -import StdNames._ -import NameOps._ -import Trees._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* +import Names.* +import StdNames.* +import NameOps.* +import Trees.* import DenotTransformers.DenotTransformer -import Symbols._ -import util.Spans._ -import Decorators._ +import Symbols.* +import util.Spans.* +import Decorators.* import NameKinds.{ SuperAccessorName, ExpandPrefixName } /** This class adds super accessors for all super calls that either diff --git a/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala b/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala index 27b61c2ad6d5..15018b969aa0 100644 --- a/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala +++ b/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala @@ -1,24 +1,24 @@ package dotty.tools.dotc package transform -import core._ -import Symbols._ -import Types._ -import Contexts._ -import Names._ -import StdNames._ -import Constants._ -import Flags._ -import DenotTransformers._ -import Decorators._ -import NameOps._ +import core.* +import Symbols.* +import Types.* +import Contexts.* +import Names.* +import StdNames.* +import Constants.* +import Flags.* +import DenotTransformers.* +import Decorators.* +import NameOps.* import Annotations.Annotation import typer.ProtoTypes.constrained import ast.untpd import util.Property import util.Spans.Span import config.Printers.derive -import NullOpsDecorator._ +import NullOpsDecorator.* object SyntheticMembers { diff --git a/compiler/src/dotty/tools/dotc/transform/TailRec.scala b/compiler/src/dotty/tools/dotc/transform/TailRec.scala index 326f3195d267..9545e4155a29 100644 --- a/compiler/src/dotty/tools/dotc/transform/TailRec.scala +++ b/compiler/src/dotty/tools/dotc/transform/TailRec.scala @@ -7,15 +7,15 @@ import scala.compiletime.uninitialized import ast.{TreeTypeMap, tpd} import config.Printers.tailrec -import core._ -import Contexts._ -import Flags._ -import Symbols._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* import Decorators.em import Constants.Constant import NameKinds.{TailLabelName, TailLocalName, TailTempName} import StdNames.nme -import reporting._ +import reporting.* import transform.MegaPhase.MiniPhase import util.LinearSet diff --git a/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala b/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala index 68da2077fafb..2be41ba208f1 100644 --- a/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala +++ b/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import MegaPhase._ -import core.DenotTransformers._ -import core.Contexts._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Contexts.* import ast.tpd /** This phase transforms wildcards in valdefs with their default value. diff --git a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala index 1429467541ea..b1bee878fc37 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -7,24 +7,24 @@ import dotty.tools.backend.jvm.DottyBackendInterface.symExtensions import scala.util.control.NonFatal import core.Names.Name -import core.DenotTransformers._ -import core.SymDenotations._ -import core.Contexts._ -import core.Symbols._ -import core.Types._ -import core.Flags._ -import core.StdNames._ +import core.DenotTransformers.* +import core.SymDenotations.* +import core.Contexts.* +import core.Symbols.* +import core.Types.* +import core.Flags.* +import core.StdNames.* import core.NameKinds.{DocArtifactName, OuterSelectName} -import core.Decorators._ -import core.Phases._ +import core.Decorators.* +import core.Phases.* import core.Mode -import typer._ -import reporting._ -import ast.Trees._ +import typer.* +import reporting.* +import ast.Trees.* import ast.{tpd, untpd} -import util.Chars._ +import util.Chars.* import collection.mutable -import ProtoTypes._ +import ProtoTypes.* import staging.StagingLevel import inlines.Inlines.inInlineMethod diff --git a/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala b/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala index d028e695653e..80f380904e1c 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala @@ -2,13 +2,13 @@ package dotty.tools.dotc package transform import ast.{Trees, tpd} -import core._ -import Contexts._ -import Trees._ -import Types._ -import StdNames._ -import Symbols._ -import ValueClasses._ +import core.* +import Contexts.* +import Trees.* +import Types.* +import StdNames.* +import Symbols.* +import ValueClasses.* object TreeExtractors { import tpd.* diff --git a/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala b/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala index 409e93e39b95..42508b4b7fba 100644 --- a/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala +++ b/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Flags import dotty.tools.dotc.transform.MegaPhase.MiniPhase import dotty.tools.dotc.util.Spans.Span -import core.Symbols._ -import core.StdNames._ -import core.Types._ +import core.Symbols.* +import core.StdNames.* +import core.Types.* import core.NameKinds.ExceptionBinderName /** Compiles the cases that can not be handled by primitive catch cases as a common pattern match. diff --git a/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala b/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala index 0525d53fd632..d0b351d55a6a 100644 --- a/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala +++ b/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala @@ -3,15 +3,15 @@ package transform import dotty.tools.dotc.ast.tpd -import core._ -import Contexts._ -import Decorators._ -import Definitions._ -import DenotTransformers._ -import StdNames._ -import Symbols._ -import MegaPhase._ -import Types._ +import core.* +import Contexts.* +import Decorators.* +import Definitions.* +import DenotTransformers.* +import StdNames.* +import Symbols.* +import MegaPhase.* +import Types.* /** Optimize generic operations on tuples */ class TupleOptimizations extends MiniPhase with IdentityDenotTransformer { diff --git a/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala b/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala index e76409b827f7..6e02ea7c227c 100644 --- a/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala +++ b/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import MegaPhase._ +import MegaPhase.* import core.DenotTransformers.{IdentityDenotTransformer} -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Flags._ +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Flags.* import ast.tpd object UncacheGivenAliases: diff --git a/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala b/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala index d6be1e8edcbf..f22fc53e9b6e 100644 --- a/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala +++ b/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ -import Flags._ -import Symbols._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* import MegaPhase.MiniPhase import StdNames.nme import ast.tpd diff --git a/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala b/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala index f8fcf791517e..e1930ef44f0f 100644 --- a/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala +++ b/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala @@ -2,16 +2,16 @@ package dotty.tools.dotc package transform import ast.tpd -import core._ -import Contexts._ -import Symbols._ -import Types._ -import Flags._ -import Phases._ -import DenotTransformers._ -import MegaPhase._ -import TreeExtractors._ -import ValueClasses._ +import core.* +import Contexts.* +import Symbols.* +import Types.* +import Flags.* +import Phases.* +import DenotTransformers.* +import MegaPhase.* +import TreeExtractors.* +import ValueClasses.* /** This phase elides unnecessary value class allocations * diff --git a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala index 1189d46f48b4..975d18791c1c 100644 --- a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala @@ -3,14 +3,14 @@ package dotc package transform import ast.{Trees, tpd} -import core._ -import Contexts._ -import Trees._ -import Types._ -import DenotTransformers._ -import MegaPhase._ -import ExtensionMethods._ -import ValueClasses._ +import core.* +import Contexts.* +import Trees.* +import Types.* +import DenotTransformers.* +import MegaPhase.* +import ExtensionMethods.* +import ValueClasses.* /** This phase inlines calls to methods of value classes. diff --git a/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala b/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala index df9244038c58..5cdd5d8ded43 100644 --- a/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala +++ b/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala @@ -1,13 +1,13 @@ package dotty.tools.dotc package transform -import core._ -import Types._ -import Symbols._ -import Contexts._ -import Phases._ -import Flags._ -import StdNames._ +import core.* +import Types.* +import Symbols.* +import Contexts.* +import Phases.* +import Flags.* +import StdNames.* /** Methods that apply to user-defined value classes */ object ValueClasses { diff --git a/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala b/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala index 2fa5104ec98b..20ad82c72f76 100644 --- a/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala +++ b/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala @@ -3,12 +3,12 @@ package transform import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Phases.Phase import dotty.tools.dotc.core.Phases.postTyperPhase -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.util.SourceFile /** Ycheck inlined positions */ diff --git a/compiler/src/dotty/tools/dotc/transform/init/Cache.scala b/compiler/src/dotty/tools/dotc/transform/init/Cache.scala index c0bd48d4ce05..ed1b93f9d79b 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Cache.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Cache.scala @@ -2,8 +2,8 @@ package dotty.tools.dotc package transform package init -import core._ -import Contexts._ +import core.* +import Contexts.* import ast.tpd import tpd.Tree diff --git a/compiler/src/dotty/tools/dotc/transform/init/Checker.scala b/compiler/src/dotty/tools/dotc/transform/init/Checker.scala index 47ac8ed624b4..b368ee216d1a 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Checker.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Checker.scala @@ -2,21 +2,21 @@ package dotty.tools.dotc package transform package init -import dotty.tools.dotc._ -import dotty.tools.dotc.core._ -import dotty.tools.dotc.transform._ +import dotty.tools.dotc.* +import dotty.tools.dotc.core.* +import dotty.tools.dotc.transform.* import dotty.tools.unsupported import scala.collection.mutable import ast.tpd -import tpd._ -import Contexts._ -import Types._ -import Symbols._ -import StdNames._ -import Phases._ -import Semantic._ +import tpd.* +import Contexts.* +import Types.* +import Symbols.* +import StdNames.* +import Phases.* +import Semantic.* class Checker extends Phase: diff --git a/compiler/src/dotty/tools/dotc/transform/init/Errors.scala b/compiler/src/dotty/tools/dotc/transform/init/Errors.scala index 1f4bd475eebf..198bfceaa7a5 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Errors.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Errors.scala @@ -3,13 +3,13 @@ package dotc package transform package init -import ast.tpd._ -import core._ +import ast.tpd.* +import core.* import util.Property import util.SourcePosition -import Types._ -import Symbols._ -import Contexts._ +import Types.* +import Symbols.* +import Contexts.* import Trace.Trace object Errors: diff --git a/compiler/src/dotty/tools/dotc/transform/init/Trace.scala b/compiler/src/dotty/tools/dotc/transform/init/Trace.scala index ea76f2cac67f..b30f84874969 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Trace.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Trace.scala @@ -4,11 +4,11 @@ package init import scala.collection.mutable -import core._ -import Contexts._ -import ast.tpd._ +import core.* +import Contexts.* +import ast.tpd.* import util.SourcePosition -import Decorators._ +import Decorators.* import printing.SyntaxHighlighting /** Logic related to evaluation trace for showing friendly error messages diff --git a/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala b/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala index c2943236a99b..4cb3cc3f36c5 100644 --- a/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform.localopt -import dotty.tools.dotc.ast.tpd.{Match => _, _} -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.ast.tpd.{Match as _, *} +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.typerPhase -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.util.Spans.Span import scala.annotation.tailrec import scala.collection.mutable.ListBuffer -import scala.util.chaining._ +import scala.util.chaining.* import scala.util.matching.Regex.Match import PartialFunction.cond diff --git a/compiler/src/dotty/tools/dotc/transform/localopt/FormatInterpolatorTransform.scala b/compiler/src/dotty/tools/dotc/transform/localopt/FormatInterpolatorTransform.scala index 282c89687c3e..79d94c26c692 100644 --- a/compiler/src/dotty/tools/dotc/transform/localopt/FormatInterpolatorTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/localopt/FormatInterpolatorTransform.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform.localopt -import dotty.tools.dotc.ast.tpd._ +import dotty.tools.dotc.ast.tpd.* import dotty.tools.dotc.core.Constants.Constant -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* object FormatInterpolatorTransform: