diff --git a/compiler/src/dotty/tools/MainGenericRunner.scala b/compiler/src/dotty/tools/MainGenericRunner.scala index 0a5a1b191a44..1540cc86d7a6 100644 --- a/compiler/src/dotty/tools/MainGenericRunner.scala +++ b/compiler/src/dotty/tools/MainGenericRunner.scala @@ -195,7 +195,7 @@ object MainGenericRunner { case ExecuteMode.PossibleRun => val newClasspath = (settings.classPath :+ ".").flatMap(_.split(classpathSeparator).filter(_.nonEmpty)).map(File(_).toURI.toURL) - import dotty.tools.runner.RichClassLoader._ + import dotty.tools.runner.RichClassLoader.* val newClassLoader = ScalaClassLoader.fromURLsParallelCapable(newClasspath) val targetToRun = settings.possibleEntryPaths.to(LazyList).find { entryPath => newClassLoader.tryToLoadClass(entryPath).orElse { diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala b/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala index d95638be2695..4027cf9fb564 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala @@ -4,8 +4,8 @@ package jvm import scala.language.unsafeNulls -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 /** diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala index 3e9bbce2c0ae..f1029b702ee5 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala @@ -13,16 +13,16 @@ import BCodeHelpers.InvokeStyle import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.CompilationUnit -import dotty.tools.dotc.core.Constants._ +import dotty.tools.dotc.core.Constants.* import dotty.tools.dotc.core.Flags.{Label => LabelFlag, _} -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.core.StdNames.{nme, str} -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.transform.Erasure -import dotty.tools.dotc.transform.SymUtils._ -import dotty.tools.dotc.util.Spans._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Phases._ +import dotty.tools.dotc.transform.SymUtils.* +import dotty.tools.dotc.util.Spans.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Phases.* import dotty.tools.dotc.core.Decorators.em import dotty.tools.dotc.report @@ -33,13 +33,13 @@ import dotty.tools.dotc.report * */ trait BCodeBodyBuilder extends BCodeSkelBuilder { - // import global._ - // import definitions._ - import tpd._ + // import global.* + // import definitions.* + import tpd.* import int.{_, given} import DottyBackendInterface.symExtensions - import bTypes._ - import coreBTypes._ + import bTypes.* + import coreBTypes.* protected val primitives: DottyPrimitives @@ -126,7 +126,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { assert(resKind.isNumericType || (resKind == BOOL), s"$resKind is not a numeric or boolean type [operation: ${fun.symbol}]") - import ScalaPrimitivesOps._ + import ScalaPrimitivesOps.* args match { // unary operation @@ -179,7 +179,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { def genArrayOp(tree: Tree, code: Int, expectedType: BType): BType = tree match{ case Apply(DesugaredSelect(arrayObj, _), args) => - import ScalaPrimitivesOps._ + import ScalaPrimitivesOps.* val k = tpeTK(arrayObj) genLoad(arrayObj, k) val elementType = typeOfArrayOp.getOrElse[bTypes.BType](code, abort(s"Unknown operation on arrays: $tree code: $code")) @@ -262,7 +262,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { val code = primitives.getPrimitive(tree, receiver.tpe) - import ScalaPrimitivesOps._ + import ScalaPrimitivesOps.* if (isArithmeticOp(code)) genArithmeticOp(tree, code) else if (code == CONCAT) genStringConcat(tree) @@ -1267,7 +1267,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { /* Generate coercion denoted by "code" */ def genCoercion(code: Int): Unit = { - import ScalaPrimitivesOps._ + import ScalaPrimitivesOps.* (code: @switch) match { case B2B | S2S | C2C | I2I | L2L | F2F | D2D => () case _ => @@ -1443,7 +1443,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { val mdescr = bmType.descriptor val isInterface = isEmittedInterface(receiverClass) - import InvokeStyle._ + import InvokeStyle.* if (style == Super) { if (isInterface && !method.is(JavaDefined)) { val args = new Array[BType](bmType.argumentTypes.length + 1) @@ -1497,7 +1497,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { } else if (tk.isRef) { // REFERENCE(_) | ARRAY(_) bc.emitIF_ACMP(op, success) } else { - import Primitives._ + import Primitives.* def useCmpG = if (negated) op == GT || op == GE else op == LT || op == LE (tk: @unchecked) match { case LONG => emit(asm.Opcodes.LCMP) @@ -1512,7 +1512,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { /* Emits code to compare (and consume) stack-top and zero using the 'op' operator */ private def genCZJUMP(success: asm.Label, failure: asm.Label, op: TestOp, tk: BType, targetIfNoJump: asm.Label, negated: Boolean = false): Unit = { - import Primitives._ + import Primitives.* if (targetIfNoJump == success) genCZJUMP(failure, success, op.negate(), tk, targetIfNoJump, negated = !negated) else { if (tk.isIntSizedType) { // BOOL, BYTE, CHAR, SHORT, or INT diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala b/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala index 3085c9411222..3779f59d33b0 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala @@ -14,20 +14,20 @@ import scala.compiletime.uninitialized import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.Trees -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Constants._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Phases._ -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.Phases.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Names.Name import dotty.tools.dotc.core.NameKinds.ExpandedName import dotty.tools.dotc.core.Signature -import dotty.tools.dotc.core.StdNames._ +import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.NameKinds -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Types -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.core.TypeErasure import dotty.tools.dotc.transform.GenericSignatures import dotty.tools.dotc.transform.ElimErasedValueType @@ -45,12 +45,12 @@ import dotty.tools.backend.jvm.DottyBackendInterface.symExtensions */ trait BCodeHelpers extends BCodeIdiomatic { // for some reason singleton types aren't allowed in constructor calls. will need several casts in code to enforce - //import global._ - import bTypes._ - import tpd._ - import coreBTypes._ + //import global.* + import bTypes.* + import tpd.* + import coreBTypes.* import int.{_, given} - import DottyBackendInterface._ + import DottyBackendInterface.* // We need to access GenBCode phase to get access to post-processor components. // At this point it should always be initialized already. @@ -701,10 +701,10 @@ trait BCodeHelpers extends BCodeIdiomatic { * classes. */ private def typeToTypeKind(tp: Type)(ct: BCodeHelpers)(storage: ct.BCInnerClassGen): ct.bTypes.BType = { - import ct.bTypes._ + import ct.bTypes.* val defn = ctx.definitions - import coreBTypes._ - import Types._ + import coreBTypes.* + import Types.* /** * Primitive types are represented as TypeRefs to the class symbol of, for example, scala.Int. * The `primitiveTypeMap` maps those class symbols to the corresponding PrimitiveBType. @@ -852,7 +852,7 @@ trait BCodeHelpers extends BCodeIdiomatic { object BCodeHelpers { class InvokeStyle(val style: Int) extends AnyVal { - import InvokeStyle._ + import InvokeStyle.* def isVirtual: Boolean = this == Virtual def isStatic : Boolean = this == Static def isSpecial: Boolean = this == Special diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala b/compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala index efd1ab19764d..9938b7415da7 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala @@ -22,8 +22,8 @@ trait BCodeIdiomatic { val bTypes: BTypesFromSymbols[int.type] import int.{_, given} - import bTypes._ - import coreBTypes._ + import bTypes.* + import coreBTypes.* lazy val JavaStringBuilderClassName = jlStringBuilderRef.internalName @@ -617,7 +617,7 @@ trait BCodeIdiomatic { /* Constant-valued val-members of JCodeMethodN at the companion object, so as to avoid re-initializing them multiple times. */ object JCodeMethodN { - import asm.Opcodes._ + import asm.Opcodes.* // ---------------- conversions ---------------- @@ -651,7 +651,7 @@ trait BCodeIdiomatic { * can-multi-thread */ final def coercionFrom(code: Int): BType = { - import ScalaPrimitivesOps._ + import ScalaPrimitivesOps.* (code: @switch) match { case B2B | B2C | B2S | B2I | B2L | B2F | B2D => BYTE case S2B | S2S | S2C | S2I | S2L | S2F | S2D => SHORT @@ -668,7 +668,7 @@ trait BCodeIdiomatic { * can-multi-thread */ final def coercionTo(code: Int): BType = { - import ScalaPrimitivesOps._ + import ScalaPrimitivesOps.* (code: @switch) match { case B2B | C2B | S2B | I2B | L2B | F2B | D2B => BYTE case B2C | C2C | S2C | I2C | L2C | F2C | D2C => CHAR diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala index 073cc44e76b7..61383d2000d1 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala @@ -31,10 +31,10 @@ import dotty.tools.dotc.transform.SymUtils.* trait BCodeSkelBuilder extends BCodeHelpers { import int.{_, given} import DottyBackendInterface.{symExtensions, _} - import tpd._ - import bTypes._ - import coreBTypes._ - import bCodeAsmCommon._ + import tpd.* + import bTypes.* + import coreBTypes.* + import bCodeAsmCommon.* lazy val NativeAttr: Symbol = requiredClass[scala.native] diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala b/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala index 74e1c5812b14..4e2ea6dd52b8 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala @@ -9,7 +9,7 @@ import scala.tools.asm import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.core.StdNames.nme -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.ast.tpd /* @@ -20,9 +20,9 @@ import dotty.tools.dotc.ast.tpd */ trait BCodeSyncAndTry extends BCodeBodyBuilder { import int.given - import tpd._ - import bTypes._ - import coreBTypes._ + import tpd.* + import bTypes.* + import coreBTypes.* /* * Functionality to lower `synchronized` and `try` expressions. */ diff --git a/compiler/src/dotty/tools/backend/jvm/BTypes.scala b/compiler/src/dotty/tools/backend/jvm/BTypes.scala index ba5e3e360e88..8b4c2834ed19 100644 --- a/compiler/src/dotty/tools/backend/jvm/BTypes.scala +++ b/compiler/src/dotty/tools/backend/jvm/BTypes.scala @@ -39,7 +39,7 @@ abstract class BTypes { self => def classBTypeFromInternalName(internalName: String) = classBTypeFromInternalNameMap(internalName) val coreBTypes: CoreBTypes { val bTypes: self.type} - import coreBTypes._ + import coreBTypes.* /** * A BType is either a primitve type, a ClassBType, an ArrayBType of one of these, or a MethodType diff --git a/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala b/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala index dc5cf48de6fe..0743465b7b3b 100644 --- a/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala +++ b/compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala @@ -7,12 +7,12 @@ import scala.annotation.threadUnsafe import scala.collection.mutable import scala.collection.mutable.Clearable -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Phases._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Phases.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.core.StdNames import dotty.tools.dotc.core.Phases @@ -29,12 +29,12 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I, val frontendAcce lazy val VolatileAttr = requiredClass[scala.volatile] val bCodeAsmCommon: BCodeAsmCommon[int.type ] = new BCodeAsmCommon(int) - import bCodeAsmCommon._ + import bCodeAsmCommon.* val coreBTypes = new CoreBTypesFromSymbols[I]{ val bTypes: BTypesFromSymbols.this.type = BTypesFromSymbols.this } - import coreBTypes._ + import coreBTypes.* @threadUnsafe protected lazy val classBTypeFromInternalNameMap = collection.concurrent.TrieMap.empty[String, ClassBType] @@ -286,7 +286,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I, val frontendAcce val finalFlag = sym.is(Final) && !toDenot(sym).isClassConstructor && !sym.is(Mutable, butNot = Accessor) && !sym.enclosingClass.is(Trait) - import asm.Opcodes._ + import asm.Opcodes.* import GenBCodeOps.addFlagIf 0 .addFlagIf(privateFlag, ACC_PRIVATE) .addFlagIf(!privateFlag, ACC_PUBLIC) @@ -312,7 +312,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I, val frontendAcce } def javaFieldFlags(sym: Symbol) = { - import asm.Opcodes._ + import asm.Opcodes.* import GenBCodeOps.addFlagIf javaFlags(sym) .addFlagIf(sym.hasAnnotation(TransientAttr), ACC_TRANSIENT) diff --git a/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala b/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala index 840c58cb2314..2f8a469169cc 100644 --- a/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala +++ b/compiler/src/dotty/tools/backend/jvm/BackendUtils.scala @@ -5,7 +5,7 @@ import scala.tools.asm.Handle import scala.tools.asm.tree.InvokeDynamicInsnNode import asm.tree.ClassNode import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import dotty.tools.dotc.report import scala.language.unsafeNulls @@ -92,9 +92,9 @@ class BackendUtils(val postProcessor: PostProcessor) { * methods. */ def addLambdaDeserialize(classNode: ClassNode, implMethodsArray: Array[Handle]): Unit = { - import asm.Opcodes._ - import bTypes._ - import coreBTypes._ + import asm.Opcodes.* + import bTypes.* + import coreBTypes.* val cw = classNode diff --git a/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala b/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala index 50b5d0e122e9..ec251b4aa3f0 100644 --- a/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala +++ b/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala @@ -4,7 +4,7 @@ import java.io.{DataOutputStream, IOException, BufferedOutputStream, FileOutputS import java.nio.ByteBuffer import java.nio.channels.{ClosedByInterruptException, 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 @@ -15,7 +15,7 @@ import dotty.tools.dotc.core.Decorators.em import dotty.tools.io.{AbstractFile, PlainFile} import dotty.tools.io.PlainFile.toPlainFile import BTypes.InternalName -import scala.util.chaining._ +import scala.util.chaining.* import dotty.tools.io.JarArchive import scala.language.unsafeNulls @@ -146,7 +146,7 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) { val storeOnly = compressionLevel == Deflater.NO_COMPRESSION val jarWriter: JarOutputStream = { - import scala.util.Properties._ + import scala.util.Properties.* val manifest = new Manifest val attrs = manifest.getMainAttributes.nn attrs.put(MANIFEST_VERSION, "1.0") diff --git a/compiler/src/dotty/tools/backend/jvm/CodeGen.scala b/compiler/src/dotty/tools/backend/jvm/CodeGen.scala index 4bf305f3387c..a477e55e2b68 100644 --- a/compiler/src/dotty/tools/backend/jvm/CodeGen.scala +++ b/compiler/src/dotty/tools/backend/jvm/CodeGen.scala @@ -8,17 +8,17 @@ import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Phases.Phase import scala.collection.mutable -import scala.jdk.CollectionConverters._ -import dotty.tools.dotc.transform.SymUtils._ +import scala.jdk.CollectionConverters.* +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.interfaces import dotty.tools.dotc.report import java.util.Optional import dotty.tools.dotc.sbt.ExtractDependencies -import dotty.tools.dotc.core._ -import Contexts._ -import Phases._ -import Symbols._ +import dotty.tools.dotc.core.* +import Contexts.* +import Phases.* +import Symbols.* import StdNames.nme import java.io.DataOutputStream @@ -28,8 +28,8 @@ import dotty.tools.tasty.{ TastyBuffer, TastyHeaderUnpickler } import dotty.tools.dotc.core.tasty.TastyUnpickler import scala.tools.asm -import scala.tools.asm.tree._ -import tpd._ +import scala.tools.asm.tree.* +import tpd.* import dotty.tools.io.AbstractFile import dotty.tools.dotc.util import dotty.tools.dotc.util.NoSourcePosition @@ -37,7 +37,7 @@ import dotty.tools.dotc.util.NoSourcePosition class CodeGen(val int: DottyBackendInterface, val primitives: DottyPrimitives)( val bTypes: BTypesFromSymbols[int.type]) { self => import DottyBackendInterface.symExtensions - import bTypes._ + import bTypes.* import int.given private lazy val mirrorCodeGen = Impl.JMirrorBuilder() diff --git a/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala b/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala index 299c1c75d6cf..94a946989d23 100644 --- a/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala +++ b/compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala @@ -1,9 +1,9 @@ package dotty.tools.backend.jvm import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Phases._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Phases.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Flags.Trait import dotty.tools.dotc.transform.MegaPhase.MiniPhase @@ -18,7 +18,7 @@ import dotty.tools.dotc.transform.MegaPhase.MiniPhase * the redundant mixin class could be required as a parent by the JVM. */ class CollectSuperCalls extends MiniPhase { - import tpd._ + import tpd.* override def phaseName: String = CollectSuperCalls.name diff --git a/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala b/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala index 070de4b1b0e2..5a3980347bcb 100644 --- a/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala +++ b/compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala @@ -3,7 +3,7 @@ package backend package jvm -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.transform.Erasure import scala.tools.asm.{Handle, Opcodes} import dotty.tools.dotc.core.StdNames @@ -11,7 +11,7 @@ import BTypes.InternalName abstract class CoreBTypes { val bTypes: BTypes - import bTypes._ + import bTypes.* def primitiveTypeMap: Map[Symbol, PrimitiveBType] @@ -55,9 +55,9 @@ abstract class CoreBTypes { abstract class CoreBTypesFromSymbols[I <: DottyBackendInterface] extends CoreBTypes { val bTypes: BTypesFromSymbols[I] - import bTypes._ + import bTypes.* import int.given - import DottyBackendInterface._ + import DottyBackendInterface.* import frontendAccess.frontendSynch import dotty.tools.dotc.core.Contexts.Context @@ -223,7 +223,7 @@ abstract class CoreBTypesFromSymbols[I <: DottyBackendInterface] extends CoreBTy ) lazy val typeOfArrayOp: Map[Int, BType] = { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* Map( (List(ZARRAY_LENGTH, ZARRAY_GET, ZARRAY_SET) map (_ -> BOOL)) ++ (List(BARRAY_LENGTH, BARRAY_GET, BARRAY_SET) map (_ -> BYTE)) ++ diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index c005a6d38403..30568ef92b2d 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -3,23 +3,23 @@ package dotty.tools.backend.jvm import scala.language.unsafeNulls import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.transform.SymUtils.* import java.io.{File => _} import scala.reflect.ClassTag import dotty.tools.io.AbstractFile -import dotty.tools.dotc.core._ -import Contexts._ -import Types._ -import Symbols._ -import Phases._ +import dotty.tools.dotc.core.* +import Contexts.* +import Types.* +import Symbols.* +import Phases.* import Decorators.em import dotty.tools.dotc.util.ReadOnlyMap import dotty.tools.dotc.report -import tpd._ +import tpd.* import StdNames.nme import NameKinds.{LazyBitMapName, LazyLocalName} diff --git a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala index 6dcaaa23c61d..d5c111259f01 100644 --- a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala +++ b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala @@ -3,11 +3,11 @@ package dotty.tools.backend.jvm import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.core.Phases.Phase import dotty.tools.dotc.report -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* import dotty.tools.dotc.interfaces.CompilerCallback -import Contexts._ -import Symbols._ -import dotty.tools.io._ +import Contexts.* +import Symbols.* +import dotty.tools.io.* import scala.collection.mutable import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala b/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala index f17f9d620d90..bf2ae9a131aa 100644 --- a/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala +++ b/compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala @@ -2,7 +2,7 @@ package dotty.tools.backend.jvm import java.nio.channels.ClosedByInterruptException import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy -import java.util.concurrent._ +import java.util.concurrent.* import scala.collection.mutable.ListBuffer import scala.concurrent.duration.Duration diff --git a/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala b/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala index 71bf307266c5..00d7dc598509 100644 --- a/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala +++ b/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala @@ -3,12 +3,12 @@ package dotty.tools.backend.jvm import scala.language.unsafeNulls import scala.tools.asm.{ClassReader, Type, Handle } -import scala.tools.asm.tree._ +import scala.tools.asm.tree.* import scala.collection.mutable import scala.util.control.{NoStackTrace, NonFatal} -import scala.annotation._ -import scala.jdk.CollectionConverters._ +import scala.annotation.* +import scala.jdk.CollectionConverters.* // Backported from scala/scala, commit sha: 724be0e9425b9ad07c244d25efdad695d75abbcf // https://github.com/scala/scala/blob/724be0e9425b9ad07c244d25efdad695d75abbcf/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala#L928 diff --git a/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala b/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala index e6911c766655..4e3438f3d78a 100644 --- a/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala +++ b/compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala @@ -14,7 +14,7 @@ import dotty.tools.dotc.core.Phases * frontend. All methods are synchronized. */ sealed abstract class PostProcessorFrontendAccess { - import PostProcessorFrontendAccess._ + import PostProcessorFrontendAccess.* def compilerSettings: CompilerSettings diff --git a/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala b/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala index bc453aec17af..262b5df43362 100644 --- a/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala +++ b/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala @@ -2,10 +2,10 @@ package dotty.tools package backend.jvm import dotc.ast.Trees.Select -import dotc.ast.tpd._ -import dotc.core._ -import Contexts._ -import Names.TermName, StdNames._ +import dotc.ast.tpd.* +import dotc.core.* +import Contexts.* +import Names.TermName, StdNames.* import Types.{JavaArrayType, UnspecifiedErrorType, Type} import Symbols.{Symbol, NoSymbol} import Decorators.em @@ -32,7 +32,7 @@ import scala.annotation.threadUnsafe * Inspired from the `scalac` compiler. */ class DottyPrimitives(ictx: Context) { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* @threadUnsafe private lazy val primitives: ReadOnlyMap[Symbol, Int] = init diff --git a/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala b/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala index 1579b4577933..2c5a6639dc8b 100644 --- a/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala +++ b/compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala @@ -1,8 +1,8 @@ package dotty.tools.backend.sjs -import dotty.tools.dotc.core._ -import Contexts._ -import Phases._ +import dotty.tools.dotc.core.* +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 fa8f99fc0e03..d0694617f61e 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala @@ -8,20 +8,20 @@ import scala.collection.mutable import dotty.tools.FatalError import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core._ -import Contexts._ -import Decorators._ -import Flags._ -import Names._ +import dotty.tools.dotc.core.* +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 dotty.tools.dotc.transform.{Erasure, ValueClasses} -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.util.SourcePosition import dotty.tools.dotc.report @@ -32,9 +32,9 @@ import org.scalajs.ir.OriginalName import org.scalajs.ir.OriginalName.NoOriginalName import org.scalajs.ir.Trees.OptimizerHints -import dotty.tools.dotc.transform.sjs.JSSymUtils._ +import dotty.tools.dotc.transform.sjs.JSSymUtils.* -import JSEncoding._ +import JSEncoding.* import ScopedVar.withScopedVars /** Main codegen for Scala.js IR. @@ -54,15 +54,15 @@ import ScopedVar.withScopedVars * - `genStatOrExpr()` and everything else generate the bodies of methods. */ class JSCodeGen()(using genCtx: Context) { - import JSCodeGen._ - import tpd._ + import JSCodeGen.* + import tpd.* val sjsPlatform = dotty.tools.dotc.config.SJSPlatform.sjsPlatform val jsdefn = JSDefinitions.jsdefn private val primitives = new JSPrimitives(genCtx) val positionConversions = new JSPositions()(using genCtx) - import positionConversions._ + import positionConversions.* private val jsExportsGen = new JSExportsGen(this) @@ -1827,7 +1827,7 @@ class JSCodeGen()(using genCtx: Context) { } case Literal(value) => - import Constants._ + import Constants.* value.tag match { case UnitTag => js.Skip() @@ -2525,7 +2525,7 @@ class JSCodeGen()(using genCtx: Context) { /** Gen JS code for a primitive method call. */ private def genPrimitiveOp(tree: Apply, isStat: Boolean): js.Tree = { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* implicit val pos = tree.span @@ -2565,7 +2565,7 @@ class JSCodeGen()(using genCtx: Context) { /** Gen JS code for a simple unary operation. */ private def genSimpleUnaryOp(tree: Apply, arg: Tree, code: Int): js.Tree = { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* implicit val pos = tree.span @@ -2606,7 +2606,7 @@ class JSCodeGen()(using genCtx: Context) { /** Gen JS code for a simple binary operation. */ private def genSimpleBinaryOp(tree: Apply, lhs: Tree, rhs: Tree, code: Int): js.Tree = { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* implicit val pos: SourcePosition = tree.sourcePos @@ -2646,7 +2646,7 @@ class JSCodeGen()(using genCtx: Context) { } else if (code == ZAND) { js.If(lsrc, rsrc, js.BooleanLiteral(false))(jstpe.BooleanType) } else { - import js.BinaryOp._ + import js.BinaryOp.* (opType: @unchecked) match { case jstpe.IntType => @@ -2768,7 +2768,7 @@ class JSCodeGen()(using genCtx: Context) { */ private def genConversion(from: jstpe.Type, to: jstpe.Type, value: js.Tree)( implicit pos: Position): js.Tree = { - import js.UnaryOp._ + import js.UnaryOp.* if (from == to || from == jstpe.NothingType) { value @@ -2823,7 +2823,7 @@ class JSCodeGen()(using genCtx: Context) { private def genUniversalEqualityOp(ltpe: Type, rtpe: Type, lhs: js.Tree, rhs: js.Tree, code: Int)( implicit pos: SourcePosition): js.Tree = { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* val bypassEqEq = { // Do not call equals if we have a literal null at either side. @@ -2931,7 +2931,7 @@ class JSCodeGen()(using genCtx: Context) { /** Gen JS code for an array operation (get, set or length) */ private def genArrayOp(tree: Tree, code: Int): js.Tree = { - import dotty.tools.backend.ScalaPrimitivesOps._ + import dotty.tools.backend.ScalaPrimitivesOps.* implicit val pos = tree.span @@ -3766,7 +3766,7 @@ class JSCodeGen()(using genCtx: Context) { private def genJSPrimitive(tree: Apply, args: List[Tree], code: Int, isStat: Boolean): js.Tree = { - import JSPrimitives._ + import JSPrimitives.* implicit val pos = tree.span @@ -4696,7 +4696,7 @@ class JSCodeGen()(using genCtx: Context) { } private def computeJSNativeLoadSpecOfInPhase(sym: Symbol)(using Context): js.JSNativeLoadSpec = { - import js.JSNativeLoadSpec._ + import js.JSNativeLoadSpec.* val symOwner = sym.owner diff --git a/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala b/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala index 49755a8ee83e..ab7f9a89f9c5 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala @@ -4,12 +4,12 @@ import scala.language.unsafeNulls import scala.annotation.threadUnsafe -import dotty.tools.dotc.core._ -import Names._ -import Types._ -import Contexts._ -import Symbols._ -import StdNames._ +import dotty.tools.dotc.core.* +import Names.* +import Types.* +import Contexts.* +import Symbols.* +import StdNames.* import dotty.tools.dotc.config.SJSPlatform import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala b/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala index 73a150c60290..f2b90d5b1161 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSEncoding.scala @@ -4,16 +4,16 @@ import scala.language.unsafeNulls import scala.collection.mutable -import dotty.tools.dotc.core._ -import Contexts._ -import Flags._ -import Types._ -import Symbols._ -import NameOps._ -import Names._ -import StdNames._ +import dotty.tools.dotc.core.* +import Contexts.* +import Flags.* +import Types.* +import Symbols.* +import NameOps.* +import Names.* +import StdNames.* -import dotty.tools.dotc.transform.sjs.JSSymUtils._ +import dotty.tools.dotc.transform.sjs.JSSymUtils.* import org.scalajs.ir import org.scalajs.ir.{Trees => js, Types => jstpe} @@ -61,7 +61,7 @@ object JSEncoding { // Fresh local name generator ---------------------------------------------- class LocalNameGenerator { - import LocalNameGenerator._ + import LocalNameGenerator.* private val usedLocalNames = mutable.Set.empty[LocalName] private val localSymbolNames = mutable.Map.empty[Symbol, LocalName] diff --git a/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala b/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala index 78412999bb34..8c72f03e7cc4 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala @@ -5,18 +5,18 @@ import scala.language.unsafeNulls import scala.annotation.tailrec import scala.collection.mutable -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* -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 dotty.tools.dotc.util.{SourcePosition, SrcPos} @@ -28,14 +28,14 @@ import org.scalajs.ir.OriginalName.NoOriginalName import org.scalajs.ir.Position.NoPosition import org.scalajs.ir.Trees.OptimizerHints -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 JSEncoding._ +import JSEncoding.* final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) { - import jsCodeGen._ - import positionConversions._ + import jsCodeGen.* + import positionConversions.* /** Info for a non-member export. */ sealed trait ExportInfo { @@ -154,7 +154,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) { (info, tups) <- exports.groupBy(_._1) kind <- checkSameKind(tups) } yield { - import ExportKind._ + import ExportKind.* implicit val pos = info.pos @@ -201,7 +201,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) { implicit val pos = info.pos - import ExportKind._ + import ExportKind.* kind match { case Method => diff --git a/compiler/src/dotty/tools/backend/sjs/JSPositions.scala b/compiler/src/dotty/tools/backend/sjs/JSPositions.scala index 2fd007165952..3b25187b0acd 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSPositions.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSPositions.scala @@ -4,8 +4,8 @@ import scala.language.unsafeNulls import java.net.{URI, URISyntaxException} -import dotty.tools.dotc.core._ -import Contexts._ +import dotty.tools.dotc.core.* +import Contexts.* import Decorators.em import dotty.tools.dotc.report @@ -17,7 +17,7 @@ import org.scalajs.ir /** Conversion utilities from dotty Positions to IR Positions. */ class JSPositions()(using Context) { - import JSPositions._ + import JSPositions.* private val sourceURIMaps: List[URIMap] = { ctx.settings.scalajsMapSourceURI.value.flatMap { option => @@ -64,7 +64,7 @@ class JSPositions()(using Context) { sourceAndSpan2irPos(sourcePos.source, sourcePos.span) private object span2irPosCache { - import dotty.tools.dotc.util._ + import dotty.tools.dotc.util.* private var lastDotcSource: SourceFile = null private var lastIRSource: ir.Position.SourceFile = null diff --git a/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala b/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala index 029273aed54b..a3a37795826a 100644 --- a/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala +++ b/compiler/src/dotty/tools/backend/sjs/JSPrimitives.scala @@ -1,13 +1,13 @@ package dotty.tools.backend.sjs -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.* import Names.TermName -import Types._ -import Contexts._ -import Symbols._ +import Types.* +import Contexts.* +import Symbols.* import Decorators.em -import dotty.tools.dotc.ast.tpd._ +import dotty.tools.dotc.ast.tpd.* import dotty.tools.backend.jvm.DottyPrimitives import dotty.tools.dotc.report import dotty.tools.dotc.util.ReadOnlyMap @@ -64,7 +64,7 @@ object JSPrimitives { } class JSPrimitives(ictx: Context) extends DottyPrimitives(ictx) { - import JSPrimitives._ + import JSPrimitives.* private lazy val jsPrimitives: ReadOnlyMap[Symbol, Int] = initJSPrimitives(using ictx) diff --git a/compiler/src/dotty/tools/dotc/Bench.scala b/compiler/src/dotty/tools/dotc/Bench.scala index 40ad66a0a9e6..cbc490919cfe 100644 --- a/compiler/src/dotty/tools/dotc/Bench.scala +++ b/compiler/src/dotty/tools/dotc/Bench.scala @@ -1,7 +1,7 @@ package dotty.tools package dotc -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 a906d52ccd4e..686414a4fd9b 100644 --- a/compiler/src/dotty/tools/dotc/CompilationUnit.scala +++ b/compiler/src/dotty/tools/dotc/CompilationUnit.scala @@ -1,10 +1,10 @@ package dotty.tools package dotc -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 @@ -12,8 +12,8 @@ import ast.{tpd, untpd} import tpd.{Tree, TreeTraverser} import ast.Trees.{Import, Ident} import typer.Nullables -import transform.SymUtils._ -import core.Decorators._ +import transform.SymUtils.* +import core.Decorators.* import config.{SourceVersion, Feature} import StdNames.nme import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index 22150afad1e8..aaa14a052936 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -1,12 +1,12 @@ package dotty.tools package dotc -import core._ -import Contexts._ +import core.* +import Contexts.* import typer.{TyperPhase, RefChecks} import parsing.Parser import Phases.Phase -import transform._ +import transform.* import dotty.tools.backend 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 e548cae55ddd..4207baa57470 100644 --- a/compiler/src/dotty/tools/dotc/Driver.scala +++ b/compiler/src/dotty/tools/dotc/Driver.scala @@ -3,12 +3,12 @@ package dotty.tools.dotc import dotty.tools.FatalError import config.CompilerCommand import core.Comments.{ContextDoc, ContextDocstrings} -import core.Contexts._ +import core.Contexts.* import core.{MacroClassLoader, TypeError} import dotty.tools.dotc.ast.Positioned import dotty.tools.io.AbstractFile -import reporting._ -import core.Decorators._ +import reporting.* +import core.Decorators.* import config.Feature import scala.util.control.NonFatal diff --git a/compiler/src/dotty/tools/dotc/Resident.scala b/compiler/src/dotty/tools/dotc/Resident.scala index 0b9bca0dc75b..481d321773c6 100644 --- a/compiler/src/dotty/tools/dotc/Resident.scala +++ b/compiler/src/dotty/tools/dotc/Resident.scala @@ -1,7 +1,7 @@ package dotty.tools package dotc -import core.Contexts._ +import core.Contexts.* import reporting.Reporter import java.io.EOFException import scala.annotation.tailrec diff --git a/compiler/src/dotty/tools/dotc/Run.scala b/compiler/src/dotty/tools/dotc/Run.scala index 7b09e7ef833a..bec1c89d7216 100644 --- a/compiler/src/dotty/tools/dotc/Run.scala +++ b/compiler/src/dotty/tools/dotc/Run.scala @@ -1,22 +1,22 @@ package dotty.tools package dotc -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/CheckTrees.scala.disabled b/compiler/src/dotty/tools/dotc/ast/CheckTrees.scala.disabled index 6bf7530faf24..08d409772331 100644 --- a/compiler/src/dotty/tools/dotc/ast/CheckTrees.scala.disabled +++ b/compiler/src/dotty/tools/dotc/ast/CheckTrees.scala.disabled @@ -2,14 +2,14 @@ package dotty.tools package dotc package ast -import core._ -import util.Spans._, Types._, Contexts._, Constants._, Names._, Flags._ -import SymDenotations._, Symbols._, StdNames._, Annotations._, Trees._ +import core.* +import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, Flags.* +import SymDenotations.*, Symbols.*, StdNames.*, Annotations.*, Trees.* // TODO: revise, integrate in a checking phase. object CheckTrees { - import tpd._ + import tpd.* def check(p: Boolean, msg: => String = "")(using Context): Unit = assert(p, msg) diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index 471d7f6af0dc..0607b3729654 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -2,18 +2,18 @@ package dotty.tools package dotc package ast -import core._ -import util.Spans._, Types._, Contexts._, Constants._, Names._, NameOps._, Flags._ -import Symbols._, StdNames._, Trees._, ContextOps._ -import Decorators._, transform.SymUtils._ +import core.* +import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, NameOps.*, Flags.* +import Symbols.*, StdNames.*, Trees.*, ContextOps.* +import Decorators.*, transform.SymUtils.* 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 @@ -22,8 +22,8 @@ import scala.annotation.internal.sharable import scala.annotation.threadUnsafe object desugar { - import untpd._ - import DesugarEnums._ + import untpd.* + import DesugarEnums.* /** An attachment for companion modules of classes that have a `derives` clause. * The position value indicates the start position of the template of the diff --git a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala index a1c3c0ed0775..4b00f72bf21e 100644 --- a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala +++ b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala @@ -2,19 +2,19 @@ package dotty.tools package dotc package ast -import core._ -import util.Spans._, Types._, Contexts._, Constants._, Names._, Flags._ -import Symbols._, StdNames._, Trees._ -import Decorators._ +import core.* +import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, Flags.* +import Symbols.*, StdNames.*, Trees.* +import Decorators.* import util.{Property, SourceFile} -import typer.ErrorReporting._ +import typer.ErrorReporting.* import transform.SyntheticMembers.ExtendsSingletonMirror import scala.annotation.internal.sharable /** Helper methods to desugar enums */ object DesugarEnums { - import untpd._ + import untpd.* enum CaseKind: case Simple, Object, Class diff --git a/compiler/src/dotty/tools/dotc/ast/MainProxies.scala b/compiler/src/dotty/tools/dotc/ast/MainProxies.scala index c0cf2c0d1b81..8ee75cbf364b 100644 --- a/compiler/src/dotty/tools/dotc/ast/MainProxies.scala +++ b/compiler/src/dotty/tools/dotc/ast/MainProxies.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package ast -import core._ -import Symbols._, Types._, Contexts._, Decorators._, util.Spans._, Flags._, Constants._ +import core.* +import Symbols.*, Types.*, Contexts.*, Decorators.*, util.Spans.*, Flags.*, Constants.* import StdNames.{nme, tpnme} -import ast.Trees._ +import ast.Trees.* import Names.Name import Comments.Comment import NameKinds.DefaultGetterName @@ -24,7 +24,7 @@ object MainProxies { * * would be translated to something like * - * import CommandLineParser._ + * import CommandLineParser.* * class f { * @static def main(args: Array[String]): Unit = * try @@ -36,7 +36,7 @@ object MainProxies { * } */ private def mainProxies(stats: List[tpd.Tree])(using Context): List[untpd.Tree] = { - import tpd._ + import tpd.* def mainMethods(stats: List[Tree]): List[Symbol] = stats.flatMap { case stat: DefDef if stat.symbol.hasAnnotation(defn.MainAnnot) => stat.symbol :: Nil @@ -48,7 +48,7 @@ object MainProxies { mainMethods(stats).flatMap(mainProxy) } - import untpd._ + import untpd.* private def mainProxy(mainFun: Symbol)(using Context): List[TypeDef] = { val mainAnnotSpan = mainFun.getAnnotation(defn.MainAnnot).get.tree.span def pos = mainFun.sourcePos @@ -172,7 +172,7 @@ object MainProxies { * } */ private def mainAnnotationProxies(stats: List[tpd.Tree])(using Context): List[untpd.Tree] = { - import tpd._ + import tpd.* /** * Computes the symbols of the default values of the function. Since they cannot be inferred anymore at this @@ -405,7 +405,7 @@ object MainProxies { /** A class responsible for extracting the docstrings of a method. */ private class Documentation(docComment: Option[Comment]): - import util.CommentParsing._ + import util.CommentParsing.* /** The main part of the documentation. */ lazy val mainDoc: String = _mainDoc diff --git a/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala b/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala index ace396d1e583..2960af8fcdec 100644 --- a/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala +++ b/compiler/src/dotty/tools/dotc/ast/NavigateAST.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package ast -import core.Contexts._ -import core.Decorators._ -import util.Spans._ +import core.Contexts.* +import core.Decorators.* +import util.Spans.* import Trees.{MemberDef, DefTree, WithLazyFields} import dotty.tools.dotc.core.Types.AnnotatedType import dotty.tools.dotc.core.Types.ImportType diff --git a/compiler/src/dotty/tools/dotc/ast/Positioned.scala b/compiler/src/dotty/tools/dotc/ast/Positioned.scala index 980042f8292e..d8017783f47f 100644 --- a/compiler/src/dotty/tools/dotc/ast/Positioned.scala +++ b/compiler/src/dotty/tools/dotc/ast/Positioned.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package ast -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 @@ -165,7 +165,7 @@ abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Src * - If item is a non-empty tree, it has a position */ def checkPos(nonOverlapping: Boolean)(using Context): Unit = try { - import untpd._ + import untpd.* val last = LastPosRef() def check(p: Any): Unit = p match { case p: Positioned => diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index 7616ef220d7f..9b841e8458ec 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package ast -import core._ -import Flags._, Trees._, Types._, Contexts._ -import Names._, StdNames._, NameOps._, Symbols._ +import core.* +import Flags.*, Trees.*, Types.*, Contexts.* +import Names.*, StdNames.*, NameOps.*, Symbols.* import typer.ConstFold import reporting.trace -import dotty.tools.dotc.transform.SymUtils._ -import Decorators._ +import dotty.tools.dotc.transform.SymUtils.* +import Decorators.* import Constants.Constant import scala.collection.mutable @@ -390,7 +390,7 @@ trait TreeInfo[T <: Untyped] { self: Trees.Instance[T] => } trait UntypedTreeInfo extends TreeInfo[Untyped] { self: Trees.Instance[Untyped] => - import untpd._ + import untpd.* /** The underlying tree when stripping any TypedSplice or Parens nodes */ override def unsplice(tree: Tree): Tree = tree match { @@ -495,8 +495,8 @@ trait UntypedTreeInfo extends TreeInfo[Untyped] { self: Trees.Instance[Untyped] } trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] => - import TreeInfo._ - import tpd._ + import TreeInfo.* + import tpd.* /** The purity level of this statement. * @return Pure if statement has no side effects diff --git a/compiler/src/dotty/tools/dotc/ast/TreeMapWithImplicits.scala b/compiler/src/dotty/tools/dotc/ast/TreeMapWithImplicits.scala index ae674c25dc3d..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 @@ -14,7 +14,7 @@ import core.TypeError * This incudes implicits defined in scope as well as imported implicits. */ class TreeMapWithImplicits extends tpd.TreeMapWithPreciseStatContexts { - import tpd._ + import tpd.* def transformSelf(vd: ValDef)(using Context): ValDef = cpy.ValDef(vd)(tpt = transform(vd.tpt)) diff --git a/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala index d2e18729836b..15c61bc2b8d4 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package ast -import core._ -import Types._, Contexts._, Flags._ -import Symbols._, Annotations._, Trees._, Symbols._, Constants.Constant -import Decorators._ -import dotty.tools.dotc.transform.SymUtils._ +import core.* +import Types.*, Contexts.*, Flags.* +import Symbols.*, Annotations.*, Trees.*, Symbols.*, Constants.Constant +import Decorators.* +import dotty.tools.dotc.transform.SymUtils.* /** A map that applies three functions and a substitution together to a tree and * makes sure they are coordinated so that the result is well-typed. The functions are @@ -39,7 +39,7 @@ class TreeTypeMap( val substFrom: List[Symbol] = Nil, val substTo: List[Symbol] = Nil, cpy: tpd.TreeCopier = tpd.cpy)(using Context) extends tpd.TreeMap(cpy) { - import tpd._ + import tpd.* def copy( typeMap: Type => Type, diff --git a/compiler/src/dotty/tools/dotc/ast/Trees.scala b/compiler/src/dotty/tools/dotc/ast/Trees.scala index 1ad8bf520830..4ec41b95a90b 100644 --- a/compiler/src/dotty/tools/dotc/ast/Trees.scala +++ b/compiler/src/dotty/tools/dotc/ast/Trees.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package ast -import core._ -import Types._, Names._, NameOps._, Flags._, util.Spans._, Contexts._, Constants._ +import core.* +import Types.*, Names.*, NameOps.*, Flags.*, util.Spans.*, Contexts.*, Constants.* import typer.{ ConstFold, ProtoTypes } -import SymDenotations._, Symbols._, Denotations._, StdNames._, Comments._ +import SymDenotations.*, Symbols.*, Denotations.*, StdNames.*, Comments.* import collection.mutable.ListBuffer import printing.Printer import printing.Texts.Text @@ -16,7 +16,7 @@ import annotation.internal.sharable import annotation.unchecked.uncheckedVariance import annotation.constructorOnly import compiletime.uninitialized -import Decorators._ +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 7625a61d48aa..acffb1e89972 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -4,13 +4,13 @@ package ast import dotty.tools.dotc.transform.{ExplicitOuter, Erasure} import typer.ProtoTypes -import transform.SymUtils._ -import transform.TypeUtils._ -import core._ +import transform.SymUtils.* +import transform.TypeUtils.* +import core.* import Scopes.newScope -import util.Spans._, Types._, Contexts._, Constants._, Names._, Flags._, NameOps._ -import Symbols._, StdNames._, Annotations._, Trees._, Symbols._ -import Decorators._, DenotTransformers._ +import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, Flags.*, NameOps.* +import Symbols.*, StdNames.*, Annotations.*, Trees.*, Symbols.* +import Decorators.*, 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 41ba452fa80a..8cdc6f710ac9 100644 --- a/compiler/src/dotty/tools/dotc/ast/untpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/untpd.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package ast -import core._ -import Types._, Contexts._, Constants._, Names._, Flags._ +import core.* +import Types.*, Contexts.*, Constants.*, Names.*, Flags.* import dotty.tools.dotc.typer.ProtoTypes -import Symbols._, StdNames._, Trees._ +import Symbols.*, StdNames.*, 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/Setup.scala b/compiler/src/dotty/tools/dotc/cc/Setup.scala index 8ba53693870c..270fd9322a88 100644 --- a/compiler/src/dotty/tools/dotc/cc/Setup.scala +++ b/compiler/src/dotty/tools/dotc/cc/Setup.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package cc -import core._ +import core.* import Phases.*, DenotTransformers.*, SymDenotations.* import Contexts.*, Names.*, Flags.*, Symbols.*, Decorators.* import Types.*, StdNames.* diff --git a/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala b/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala index ac8b69381938..0b66f339bf53 100644 --- a/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala +++ b/compiler/src/dotty/tools/dotc/classpath/ClassPathFactory.scala @@ -4,9 +4,9 @@ package dotty.tools.dotc.classpath import dotty.tools.io.{AbstractFile, VirtualDirectory} -import FileUtils._ +import FileUtils.* import dotty.tools.io.ClassPath -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* /** * 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 da1276f10dd7..26ed2734890e 100644 --- a/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala +++ b/compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala @@ -11,10 +11,10 @@ import java.nio.file.{FileSystems, Files} import dotty.tools.dotc.classpath.PackageNameUtils.{packageContains, separatePkgAndClassNames} import dotty.tools.io.{AbstractFile, PlainFile, ClassPath, ClassRepresentation, EfficientClassPath, JDK9Reflectors} -import FileUtils._ +import FileUtils.* import PlainFile.toPlainFile -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.collection.immutable.ArraySeq import scala.util.control.NonFatal @@ -126,9 +126,9 @@ trait JFileDirectoryLookup[FileEntryType <: ClassRepresentation] extends Directo } object JrtClassPath { - import java.nio.file._, java.net.URI + import java.nio.file.*, java.net.URI def apply(release: Option[String]): Option[ClassPath] = { - import scala.util.Properties._ + import scala.util.Properties.* if (!isJavaAtLeast("9")) None else { // Longer term we'd like an official API for this in the JDK @@ -165,7 +165,7 @@ object JrtClassPath { * The implementation assumes that no classes exist in the empty package. */ final class JrtClassPath(fs: java.nio.file.FileSystem) extends ClassPath with NoSourcePaths { - import java.nio.file.Path, java.nio.file._ + import java.nio.file.Path, java.nio.file.* type F = Path private val dir: Path = fs.getPath("/packages") @@ -214,7 +214,7 @@ final class JrtClassPath(fs: java.nio.file.FileSystem) extends ClassPath with No * Implementation `ClassPath` based on the \$JAVA_HOME/lib/ct.sym backing http://openjdk.java.net/jeps/247 */ final class CtSymClassPath(ctSym: java.nio.file.Path, release: Int) extends ClassPath with NoSourcePaths { - import java.nio.file.Path, java.nio.file._ + import java.nio.file.Path, java.nio.file.* private val fileSystem: FileSystem = FileSystems.newFileSystem(ctSym, null: ClassLoader) private val root: Path = fileSystem.getRootDirectories.iterator.next diff --git a/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala b/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala index 4b777444c3bf..f520cd97767e 100644 --- a/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala +++ b/compiler/src/dotty/tools/dotc/classpath/VirtualDirectoryClassPath.scala @@ -4,7 +4,7 @@ import scala.language.unsafeNulls import dotty.tools.io.{ClassPath, ClassRepresentation} import dotty.tools.io.{AbstractFile, VirtualDirectory} -import FileUtils._ +import FileUtils.* import java.net.{URI, URL} case class VirtualDirectoryClassPath(dir: VirtualDirectory) extends ClassPath with DirectoryLookup[ClassFileEntryImpl] with NoSourcePaths { diff --git a/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala b/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala index b38e1841728d..0ca996db4812 100644 --- a/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala +++ b/compiler/src/dotty/tools/dotc/classpath/ZipAndJarFileLookupFactory.scala @@ -13,8 +13,8 @@ import java.nio.file.attribute.{BasicFileAttributes, FileTime} import scala.annotation.tailrec import dotty.tools.io.{AbstractFile, ClassPath, ClassRepresentation, FileZipArchive, ManifestResources} -import dotty.tools.dotc.core.Contexts._ -import FileUtils._ +import dotty.tools.dotc.core.Contexts.* +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 8033291f5dd3..ca8636e3884f 100644 --- a/compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala +++ b/compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala @@ -9,7 +9,7 @@ import java.io.File import java.net.URL import dotty.tools.io.{ AbstractFile, FileZipArchive } -import FileUtils._ +import FileUtils.* import dotty.tools.io.{EfficientClassPath, ClassRepresentation} /** diff --git a/compiler/src/dotty/tools/dotc/config/CliCommand.scala b/compiler/src/dotty/tools/dotc/config/CliCommand.scala index 914df040fbf7..b76af885765c 100644 --- a/compiler/src/dotty/tools/dotc/config/CliCommand.scala +++ b/compiler/src/dotty/tools/dotc/config/CliCommand.scala @@ -3,8 +3,8 @@ package config import scala.language.unsafeNulls -import Settings._ -import core.Contexts._ +import Settings.* +import core.Contexts.* import printing.Highlighting import scala.util.chaining.given diff --git a/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala b/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala index 41e123472a75..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 @@ -21,6 +21,6 @@ abstract class CompilerCommand extends CliCommand: else "" final def isHelpFlag(using settings: ScalaSettings)(using SettingsState): Boolean = - import settings._ + import settings.* val flags = Set(help, Vhelp, Whelp, Xhelp, Yhelp, showPlugins, XshowPhases) flags.exists(_.value) || allSettings.exists(isHelping) diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 9492f02abbf1..74966d89295e 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -2,12 +2,12 @@ package dotty.tools package dotc package config -import core._ -import Contexts._, Symbols._, Names._ +import core.* +import Contexts.*, Symbols.*, Names.* import StdNames.nme 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 f611360dd4ca..ed8ef6c8372e 100644 --- a/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala +++ b/compiler/src/dotty/tools/dotc/config/JavaPlatform.scala @@ -2,12 +2,12 @@ package dotty.tools package dotc package config -import io._ +import io.* import classpath.AggregateClassPath -import core._ -import Symbols._, Types._, Contexts._, StdNames._ -import Flags._ -import transform.ExplicitOuter, transform.SymUtils._ +import core.* +import Symbols.*, Types.*, Contexts.*, StdNames.* +import Flags.* +import transform.ExplicitOuter, transform.SymUtils.* class JavaPlatform extends Platform { @@ -52,7 +52,7 @@ class JavaPlatform extends Platform { */ def isMaybeBoxed(sym: ClassSymbol)(using Context): Boolean = { val d = defn - import d._ + import d.* (sym == ObjectClass) || (sym == JavaSerializableClass) || (sym == ComparableClass) || 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 8b4eedb0e9d2..29e6e35855c8 100644 --- a/compiler/src/dotty/tools/dotc/config/PathResolver.scala +++ b/compiler/src/dotty/tools/dotc/config/PathResolver.scala @@ -9,15 +9,15 @@ 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.* import dotty.tools.io.File object PathResolver { // Imports property/environment functions which suppress // security exceptions. - import AccessControl._ + import AccessControl.* def firstNonEmpty(xs: String*): String = xs find (_ != "") getOrElse "" @@ -208,7 +208,7 @@ class PathResolver(using c: Context) { if (!settings.classpath.isDefault) settings.classpath.value else sys.env.getOrElse("CLASSPATH", ".") - import classPathFactory._ + import classPathFactory.* // Assemble the elements! def basis: List[Iterable[ClassPath]] = diff --git a/compiler/src/dotty/tools/dotc/config/Platform.scala b/compiler/src/dotty/tools/dotc/config/Platform.scala index 73a05fbd41c1..2a0b207e68c1 100644 --- a/compiler/src/dotty/tools/dotc/config/Platform.scala +++ b/compiler/src/dotty/tools/dotc/config/Platform.scala @@ -3,7 +3,7 @@ package dotc package config import io.{ClassPath, AbstractFile} -import core.Contexts._, core.Symbols._ +import core.Contexts.*, core.Symbols.* import core.SymbolLoader import core.StdNames.nme import core.Flags.Module diff --git a/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala b/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala index 0275e0d6a227..f6e29754ef94 100644 --- a/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala +++ b/compiler/src/dotty/tools/dotc/config/SJSPlatform.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc.config -import dotty.tools.dotc.core._ -import Contexts._ -import Symbols._ +import dotty.tools.dotc.core.* +import Contexts.* +import Symbols.* import dotty.tools.backend.sjs.JSDefinitions diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index b10c9859e4d0..bd33a075c584 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -6,12 +6,12 @@ import scala.language.unsafeNulls import dotty.tools.dotc.config.PathResolver.Defaults import dotty.tools.dotc.config.Settings.{Setting, 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, Directory, JDK9Reflectors, PlainDirectory} import Setting.ChoiceWithHelp -import scala.util.chaining._ +import scala.util.chaining.* import java.util.zip.Deflater diff --git a/compiler/src/dotty/tools/dotc/config/ScalaVersion.scala b/compiler/src/dotty/tools/dotc/config/ScalaVersion.scala index 7fdf57478f1a..9f603e6792be 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaVersion.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaVersion.scala @@ -89,7 +89,7 @@ case class SpecificScalaVersion(major: Int, minor: Int, rev: Int, build: ScalaBu def isInt(s: String) = Try(toInt(s)).isSuccess - import ScalaBuild._ + import ScalaBuild.* def toBuild(s: String) = s match { case null | "FINAL" => Final diff --git a/compiler/src/dotty/tools/dotc/config/Settings.scala b/compiler/src/dotty/tools/dotc/config/Settings.scala index 5199c6727b41..79eb2b882f8f 100644 --- a/compiler/src/dotty/tools/dotc/config/Settings.scala +++ b/compiler/src/dotty/tools/dotc/config/Settings.scala @@ -3,7 +3,7 @@ package config import scala.language.unsafeNulls -import core.Contexts._ +import core.Contexts.* import dotty.tools.io.{AbstractFile, Directory, JarArchive, PlainDirectory} diff --git a/compiler/src/dotty/tools/dotc/config/WrappedProperties.scala b/compiler/src/dotty/tools/dotc/config/WrappedProperties.scala index 5b79432a97e7..20304b74c1da 100644 --- a/compiler/src/dotty/tools/dotc/config/WrappedProperties.scala +++ b/compiler/src/dotty/tools/dotc/config/WrappedProperties.scala @@ -22,7 +22,7 @@ trait WrappedProperties extends PropertiesTrait { override def envOrNone(name: String): Option[String] = wrap(super.envOrNone(name)).flatten def systemProperties: Iterator[(String, String)] = { - import scala.jdk.CollectionConverters._ + import scala.jdk.CollectionConverters.* wrap(System.getProperties.asScala.iterator) getOrElse Iterator.empty } } diff --git a/compiler/src/dotty/tools/dotc/core/Annotations.scala b/compiler/src/dotty/tools/dotc/core/Annotations.scala index 202f3eb26e41..43c753458f6e 100644 --- a/compiler/src/dotty/tools/dotc/core/Annotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Annotations.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package core -import Symbols._, Types._, Contexts._, Constants._, Phases.* +import Symbols.*, Types.*, Contexts.*, Constants.*, Phases.* import ast.tpd, tpd.* import util.Spans.Span import printing.{Showable, Printer} 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 a61701eee2d7..060189016828 100644 --- a/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala +++ b/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala @@ -2,9 +2,9 @@ package dotty.tools package dotc package core -import Contexts._, Types._, Symbols._, Names._, Flags._ +import Contexts.*, Types.*, Symbols.*, Names.*, Flags.* import Denotations.SingleDenotation -import Decorators._ +import Decorators.* import collection.mutable import config.SourceVersion.future import config.Feature.sourceVersion @@ -62,7 +62,7 @@ object CheckRealizable { * Type.isStable). */ class CheckRealizable(using Context) { - import CheckRealizable._ + import CheckRealizable.* /** A set of all fields that have already been checked. Used * to avoid infinite recursions when analyzing recursive types. diff --git a/compiler/src/dotty/tools/dotc/core/Comments.scala b/compiler/src/dotty/tools/dotc/core/Comments.scala index 1b20b75ad8ac..80e9a105d658 100644 --- a/compiler/src/dotty/tools/dotc/core/Comments.scala +++ b/compiler/src/dotty/tools/dotc/core/Comments.scala @@ -5,10 +5,10 @@ package core import scala.language.unsafeNulls import ast.{ untpd, tpd } -import Symbols._, Contexts._ +import Symbols.*, 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 f45e9e5217de..63acfbe55701 100644 --- a/compiler/src/dotty/tools/dotc/core/Constants.scala +++ b/compiler/src/dotty/tools/dotc/core/Constants.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package core -import Types._, Symbols._, Contexts._ +import Types.*, Symbols.*, Contexts.* import printing.Printer import printing.Texts.Text @@ -210,7 +210,7 @@ object Constants { } override def hashCode: Int = { - import scala.util.hashing.MurmurHash3._ + import scala.util.hashing.MurmurHash3.* val seed = 17 var h = seed h = mix(h, tag.##) // include tag in the hash, otherwise 0, 0d, 0L, 0f collide. diff --git a/compiler/src/dotty/tools/dotc/core/Constraint.scala b/compiler/src/dotty/tools/dotc/core/Constraint.scala index c634f847e510..59f3aa9838c2 100644 --- a/compiler/src/dotty/tools/dotc/core/Constraint.scala +++ b/compiler/src/dotty/tools/dotc/core/Constraint.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package core -import Types._, Contexts._ +import Types.*, 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 bbe46c344890..d43739019f2f 100644 --- a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala +++ b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala @@ -2,11 +2,11 @@ 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} diff --git a/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala b/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala index 412b4228677d..8ec38d52e725 100644 --- a/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala +++ b/compiler/src/dotty/tools/dotc/core/ConstraintRunInfo.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package core -import Contexts._ +import Contexts.* import config.Printers.{default, typr} import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/dotc/core/ContextOps.scala b/compiler/src/dotty/tools/dotc/core/ContextOps.scala index aa85f714a8e5..8e0b022b891e 100644 --- a/compiler/src/dotty/tools/dotc/core/ContextOps.scala +++ b/compiler/src/dotty/tools/dotc/core/ContextOps.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc package core -import Contexts._, Symbols._, Types._, Flags._ -import Denotations._, SymDenotations._ +import Contexts.*, Symbols.*, Types.*, Flags.* +import Denotations.*, SymDenotations.* import Names.Name, 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 78d23ed6eac6..c575f7bc72f7 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -3,28 +3,28 @@ package dotc package core 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 scala.io.Codec import collection.mutable -import printing._ +import printing.* import config.{JavaPlatform, SJSPlatform, Platform, ScalaSettings} import classfile.ReusableDataReader import StdNames.nme @@ -37,7 +37,7 @@ import dotty.tools.dotc.profile.Profiler import dotty.tools.dotc.sbt.interfaces.{IncrementalCallback, ProgressCallback} import util.Property.Key import util.Store -import plugins._ +import plugins.* import java.util.concurrent.atomic.AtomicInteger import java.nio.file.InvalidPathException @@ -915,7 +915,7 @@ object Contexts { def next()(using Context): FreshContext = val base = ctx.base - import base._ + import base.* val nestedCtx = if inUse < pool.size then pool(inUse).reuseIn(ctx) diff --git a/compiler/src/dotty/tools/dotc/core/Decorators.scala b/compiler/src/dotty/tools/dotc/core/Decorators.scala index fc2b6a852216..29d4b3fa4052 100644 --- a/compiler/src/dotty/tools/dotc/core/Decorators.scala +++ b/compiler/src/dotty/tools/dotc/core/Decorators.scala @@ -6,8 +6,8 @@ import scala.annotation.tailrec import scala.collection.mutable.ListBuffer import scala.util.control.NonFatal -import Contexts._, Names._, Phases._, Symbols._ -import printing.{ Printer, Showable }, printing.Formatting._, printing.Texts._ +import Contexts.*, Names.*, Phases.*, Symbols.* +import printing.{ Printer, Showable }, printing.Formatting.*, 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 40370973ebf0..f86eab71bc07 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -3,8 +3,8 @@ package dotc package core import scala.annotation.{threadUnsafe => tu} -import Types._, Contexts._, Symbols._, SymDenotations._, StdNames._, Names._, Phases._ -import Flags._, Scopes._, Decorators._, NameOps._, Periods._, NullOpsDecorator._ +import Types.*, Contexts.*, Symbols.*, SymDenotations.*, StdNames.*, Names.*, Phases.* +import Flags.*, Scopes.*, Decorators.*, NameOps.*, Periods.*, NullOpsDecorator.* import unpickleScala2.Scala2Unpickler.ensureConstructor import scala.collection.mutable import collection.mutable @@ -43,7 +43,7 @@ object Definitions { * */ class Definitions { - import Definitions._ + import Definitions.* private var initCtx: Context = uninitialized private given currentContext[Dummy_so_its_a_def]: Context = initCtx 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 1969c87d7a86..efbdfeb49246 100644 --- a/compiler/src/dotty/tools/dotc/core/Denotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Denotations.scala @@ -3,24 +3,24 @@ package dotc package core 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 ab0611b89b22..1cbfabc08958 100644 --- a/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala +++ b/compiler/src/dotty/tools/dotc/core/GadtConstraint.scala @@ -6,7 +6,7 @@ import Contexts.*, Decorators.*, Symbols.*, Types.* import NameKinds.UniqueName import config.Printers.{gadts, gadtsConstr} import util.{SimpleIdentitySet, SimpleIdentityMap} -import printing._ +import printing.* import scala.annotation.tailrec import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/core/Hashable.scala b/compiler/src/dotty/tools/dotc/core/Hashable.scala index 79da5f1dcd6f..5ab2d4a2af03 100644 --- a/compiler/src/dotty/tools/dotc/core/Hashable.scala +++ b/compiler/src/dotty/tools/dotc/core/Hashable.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package core -import Types._ +import Types.* import scala.util.hashing.{ MurmurHash3 => hashing } import annotation.tailrec @@ -40,7 +40,7 @@ object Hashable { } trait Hashable { - import Hashable._ + import Hashable.* protected def hashSeed: Int = getClass.hashCode 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 d8f41ef99b11..b6b316ac14d9 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.util.Property import dotty.tools.dotc.reporting.trace 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 2109a5839380..5fc1b3137e90 100644 --- a/compiler/src/dotty/tools/dotc/core/MatchTypeTrace.scala +++ b/compiler/src/dotty/tools/dotc/core/MatchTypeTrace.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package core -import Types._, Contexts._, Symbols._, Decorators._ +import Types.*, Contexts.*, Symbols.*, Decorators.* import util.Property import Names.Name @@ -15,7 +15,7 @@ object MatchTypeTrace: case Stuck(scrut: Type, stuckCase: Type, otherCases: List[Type]) case NoInstance(scrut: Type, stuckCase: Type, fails: List[(Name, TypeBounds)]) case EmptyScrutinee(scrut: Type) - import TraceEntry._ + import TraceEntry.* private class MatchTrace: var entries: List[TraceEntry] = Nil diff --git a/compiler/src/dotty/tools/dotc/core/Mode.scala b/compiler/src/dotty/tools/dotc/core/Mode.scala index da578e9bf0b0..133d110cabda 100644 --- a/compiler/src/dotty/tools/dotc/core/Mode.scala +++ b/compiler/src/dotty/tools/dotc/core/Mode.scala @@ -10,7 +10,7 @@ package dotty.tools.dotc.core * Also, a setting is externally settable, while a mode isn't. */ case class Mode(val bits: Int) extends AnyVal { - import Mode._ + import Mode.* def | (that: Mode): Mode = Mode(bits | that.bits) def & (that: Mode): Mode = Mode(bits & that.bits) def &~ (that: Mode): Mode = Mode(bits & ~that.bits) diff --git a/compiler/src/dotty/tools/dotc/core/NameKinds.scala b/compiler/src/dotty/tools/dotc/core/NameKinds.scala index 3e8d398d05d6..d4f009cbbbd5 100644 --- a/compiler/src/dotty/tools/dotc/core/NameKinds.scala +++ b/compiler/src/dotty/tools/dotc/core/NameKinds.scala @@ -2,12 +2,12 @@ package dotty.tools package dotc package core -import Names._ -import NameOps._ -import StdNames._ -import NameTags._ -import Contexts._ -import Decorators._ +import Names.* +import NameOps.* +import StdNames.* +import NameTags.* +import Contexts.* +import Decorators.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index bdb01a079148..415aa049c587 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -6,11 +6,11 @@ import java.security.MessageDigest import java.nio.CharBuffer import scala.io.Codec import Int.MaxValue -import Names._, StdNames._, Contexts._, Symbols._, Flags._, NameKinds._, Types._ +import Names.*, StdNames.*, Contexts.*, Symbols.*, Flags.*, NameKinds.*, Types.* import util.Chars.{isOperatorPart, digit2int} import Decorators.* -import Definitions._ -import nme._ +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 dc09edd79781..e4364d168267 100644 --- a/compiler/src/dotty/tools/dotc/core/NamerOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NamerOps.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package core -import Contexts._, Symbols._, Types._, Flags._, Scopes._, Decorators._, Names._, NameOps._ +import Contexts.*, Symbols.*, Types.*, Flags.*, Scopes.*, Decorators.*, Names.*, NameOps.* import SymDenotations.{LazyType, SymDenotation}, StdNames.nme import TypeApplications.EtaExpansion diff --git a/compiler/src/dotty/tools/dotc/core/Names.scala b/compiler/src/dotty/tools/dotc/core/Names.scala index 1e08379b57f0..3f9667b08067 100644 --- a/compiler/src/dotty/tools/dotc/core/Names.scala +++ b/compiler/src/dotty/tools/dotc/core/Names.scala @@ -13,7 +13,7 @@ import util.{LinearMap, HashSet} import scala.annotation.internal.sharable object Names { - import NameKinds._ + import NameKinds.* /** Things that can be turned into names with `toTermName` and `toTypeName`. * Decorators implements these as extension methods for strings. diff --git a/compiler/src/dotty/tools/dotc/core/NullOpsDecorator.scala b/compiler/src/dotty/tools/dotc/core/NullOpsDecorator.scala index e18271772ff1..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: @@ -49,7 +49,7 @@ object NullOpsDecorator: } end extension - import ast.tpd._ + import ast.tpd.* extension (self: Tree) // cast the type of the tree to a non-nullable type diff --git a/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala b/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala index 0f05778266fd..29e665956091 100644 --- a/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala +++ b/compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package core -import Types._, Contexts._, Symbols._, Decorators._, TypeApplications._ +import Types.*, Contexts.*, Symbols.*, Decorators.*, 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 @@ -126,7 +126,7 @@ object OrderingConstraint { val empty = new OrderingConstraint(SimpleIdentityMap.empty, SimpleIdentityMap.empty, SimpleIdentityMap.empty, SimpleIdentitySet.empty) } -import OrderingConstraint._ +import OrderingConstraint.* /** Constraint over undetermined type parameters that keeps separate maps to * reflect parameter orderings. 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 5e8a960608e6..4e3596ea8814 100644 --- a/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala +++ b/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package core -import Decorators._ -import Symbols._ -import Types._ -import Flags._ +import Decorators.* +import Symbols.* +import Types.* +import Flags.* import Contexts.ctx import dotty.tools.dotc.reporting.trace import config.Feature.migrateTo3 -import config.Printers._ +import config.Printers.* trait PatternTypeConstrainer { self: TypeComparer => @@ -76,7 +76,7 @@ trait PatternTypeConstrainer { self: TypeComparer => def constrainPatternType(pat: Type, scrut: Type, forceInvariantRefinement: Boolean = false): Boolean = trace(i"constrainPatternType($scrut, $pat)", gadts) { def classesMayBeCompatible: Boolean = { - import Flags._ + import Flags.* val patCls = pat.classSymbol val scrCls = scrut.classSymbol !patCls.exists || !scrCls.exists || { 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 dd354b66cb4a..e04d829d1e60 100644 --- a/compiler/src/dotty/tools/dotc/core/Phases.scala +++ b/compiler/src/dotty/tools/dotc/core/Phases.scala @@ -2,17 +2,17 @@ package dotty.tools package dotc package core -import Periods._ -import Contexts._ +import Periods.* +import Contexts.* import dotty.tools.backend.jvm.GenBCode -import DenotTransformers._ -import Denotations._ -import Decorators._ +import DenotTransformers.* +import Denotations.* +import Decorators.* import config.Printers.config import scala.collection.mutable.ListBuffer -import dotty.tools.dotc.transform.MegaPhase._ -import dotty.tools.dotc.transform._ -import Periods._ +import dotty.tools.dotc.transform.MegaPhase.* +import dotty.tools.dotc.transform.* +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 7762ce8da339..7df5a7fa3c09 100644 --- a/compiler/src/dotty/tools/dotc/core/Scopes.scala +++ b/compiler/src/dotty/tools/dotc/core/Scopes.scala @@ -7,14 +7,14 @@ package dotty.tools package dotc package core -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 diff --git a/compiler/src/dotty/tools/dotc/core/Signature.scala b/compiler/src/dotty/tools/dotc/core/Signature.scala index bd744ec01846..f62d594d639d 100644 --- a/compiler/src/dotty/tools/dotc/core/Signature.scala +++ b/compiler/src/dotty/tools/dotc/core/Signature.scala @@ -3,9 +3,9 @@ package core import scala.annotation.tailrec -import Names._, Types._, Contexts._, StdNames._, Decorators._ +import Names.*, Types.*, Contexts.*, StdNames.*, 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 4fc7ea4185d8..1436b41b521c 100644 --- a/compiler/src/dotty/tools/dotc/core/StdNames.scala +++ b/compiler/src/dotty/tools/dotc/core/StdNames.scala @@ -4,9 +4,9 @@ package core import scala.collection.mutable import scala.annotation.switch import scala.annotation.internal.sharable -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 bd30177adcb4..96da91293d91 100644 --- a/compiler/src/dotty/tools/dotc/core/Substituters.scala +++ b/compiler/src/dotty/tools/dotc/core/Substituters.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package core -import Types._, Symbols._, Contexts._ +import Types.*, Symbols.*, 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 c2e0e6f717dd..e18e1463f3ae 100644 --- a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package core -import Periods._, Contexts._, Symbols._, Denotations._, Names._, NameOps._, Annotations._ -import Types._, Flags._, Decorators._, DenotTransformers._, StdNames._, Scopes._ -import NameOps._, NameKinds._ +import Periods.*, Contexts.*, Symbols.*, Denotations.*, Names.*, NameOps.*, Annotations.* +import Types.*, Flags.*, Decorators.*, DenotTransformers.*, StdNames.*, Scopes.* +import NameOps.*, NameKinds.* import Phases.{Phase, typerPhase, unfusedPhases} import Constants.Constant import TypeApplications.TypeParamInfo import Scopes.Scope import dotty.tools.io.AbstractFile -import Decorators._ -import ast._ +import Decorators.* +import ast.* import ast.Trees.{LambdaTypeTree, TypeBoundsTree} import Trees.Literal import Variances.Variance @@ -21,9 +21,9 @@ import util.Stats import java.util.WeakHashMap import scala.util.control.NonFatal import config.Config -import reporting._ +import reporting.* import collection.mutable -import transform.TypeUtils._ +import transform.TypeUtils.* import cc.{CapturingType, derivedCapturingType} import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala index 12eea3a26df4..5f6078a14625 100644 --- a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala +++ b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala @@ -11,11 +11,11 @@ import dotty.tools.dotc.classpath.FileUtils.isTasty import dotty.tools.io.{ ClassPath, ClassRepresentation, AbstractFile } import dotty.tools.backend.jvm.DottyBackendInterface.symExtensions -import Contexts._, Symbols._, Flags._, SymDenotations._, Types._, Scopes._, Names._ -import NameOps._ -import StdNames._ +import Contexts.*, Symbols.*, Flags.*, SymDenotations.*, Types.*, Scopes.*, Names.* +import NameOps.* +import StdNames.* import classfile.{ClassfileParser, ClassfileTastyUUIDParser} -import Decorators._ +import Decorators.* import util.Stats import reporting.trace @@ -29,7 +29,7 @@ import dotty.tools.dotc.core.tasty.TastyUnpickler object SymbolLoaders { - import ast.untpd._ + import ast.untpd.* /** A marker trait for a completer that replaces the original * Symbol loader for an unpickled root. diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index 9c7c6a9a18bf..a41d194693e6 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -2,23 +2,23 @@ package dotty.tools package dotc package core -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 transform.SymUtils._ +import Types.* +import util.Spans.* +import DenotTransformers.* +import StdNames.* +import NameOps.* +import transform.SymUtils.* 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 1cd1a3ad4d39..e725df199476 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package core -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} import dotty.tools.dotc.config.Config @@ -154,7 +154,7 @@ object TypeApplications { } } -import TypeApplications._ +import TypeApplications.* /** A decorator that provides methods for modeling type application */ class TypeApplications(val self: Type) extends AnyVal { diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index d5b97dca6164..f853d28e6361 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package core -import Types._, Contexts._, Symbols._, Flags._, Names._, NameOps._, Denotations._ -import Decorators._ +import Types.*, Contexts.*, Symbols.*, Flags.*, Names.*, NameOps.*, Denotations.* +import Decorators.* import Phases.{gettersPhase, elimByNamePhase} import StdNames.nme import TypeOps.refineUsingParent @@ -13,11 +13,11 @@ import config.Config import config.Feature.migrateTo3 import config.Printers.{subtyping, gadts, matchTypes, noPrinter} import TypeErasure.{erasedLub, erasedGlb} -import TypeApplications._ +import TypeApplications.* import Variances.{Variance, variancesConform} import Constants.Constant -import transform.TypeUtils._ -import transform.SymUtils._ +import transform.TypeUtils.* +import transform.SymUtils.* import scala.util.control.NonFatal import typer.ProtoTypes.constrained import typer.Applications.productSelectorTypes @@ -29,7 +29,7 @@ import NameKinds.WildcardParamName /** Provides methods to compare types. */ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling, PatternTypeConstrainer { - import TypeComparer._ + import TypeComparer.* Stats.record("TypeComparer") private var myContext: Context = initctx @@ -3342,7 +3342,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) { * subtraces; never print backtraces starting with `<==`. */ class ExplainingTypeComparer(initctx: Context, short: Boolean) extends TypeComparer(initctx) { - import TypeComparer._ + import TypeComparer.* init(initctx) diff --git a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala index c914dcdf7e5c..9dfa33b739c7 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala @@ -2,17 +2,17 @@ package dotty.tools package dotc package core -import Symbols._, Types._, Contexts._, Flags._, Names._, StdNames._, Phases._ +import Symbols.*, Types.*, Contexts.*, Flags.*, Names.*, StdNames.*, Phases.* import Flags.JavaDefined import Uniques.unique import TypeOps.makePackageObjPrefixExplicit import backend.sjs.JSDefinitions -import transform.ExplicitOuter._ -import transform.ValueClasses._ -import transform.TypeUtils._ -import transform.ContextFunctionResults._ +import transform.ExplicitOuter.* +import transform.ValueClasses.* +import transform.TypeUtils.* +import transform.ContextFunctionResults.* import unpickleScala2.Scala2Erasure -import Decorators._ +import Decorators.* import Definitions.MaxImplementedFunctionArity import scala.annotation.tailrec @@ -404,7 +404,7 @@ object TypeErasure { tp1 // After erasure, T | Nothing is just T and C | Null is just C, if C is a reference type. else tp1 match { case JavaArrayType(elem1) => - import dotty.tools.dotc.transform.TypeUtils._ + import dotty.tools.dotc.transform.TypeUtils.* tp2 match { case JavaArrayType(elem2) => if (elem1.isPrimitiveValueType || elem2.isPrimitiveValueType) @@ -571,7 +571,7 @@ object TypeErasure { erasure(functionType(applyInfo)) } -import TypeErasure._ +import TypeErasure.* /** * @param sourceLanguage Adapt our erasure rules to mimic what the given language diff --git a/compiler/src/dotty/tools/dotc/core/TypeErrors.scala b/compiler/src/dotty/tools/dotc/core/TypeErrors.scala index dcc4874bc34f..2fa769e25852 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErrors.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErrors.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package core -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 config.Printers.{cyclicErrors, noPrinter} diff --git a/compiler/src/dotty/tools/dotc/core/TypeOps.scala b/compiler/src/dotty/tools/dotc/core/TypeOps.scala index 5f63f4871c5f..7f9f7099d805 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeOps.scala @@ -2,21 +2,21 @@ package dotty.tools package dotc package core -import Contexts._, Types._, Symbols._, Names._, NameKinds.*, Flags._ -import SymDenotations._ -import util.Spans._ +import Contexts.*, Types.*, Symbols.*, Names.*, NameKinds.*, 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 transform.SymUtils.* -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/TyperState.scala b/compiler/src/dotty/tools/dotc/core/TyperState.scala index 54ddd4c0eb6b..ef7329c3698d 100644 --- a/compiler/src/dotty/tools/dotc/core/TyperState.scala +++ b/compiler/src/dotty/tools/dotc/core/TyperState.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package core -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 java.lang.ref.WeakReference import util.{Stats, SimpleIdentityMap} -import Decorators._ +import Decorators.* import scala.annotation.internal.sharable import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index b7090862dbea..61e16f1be668 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -2,32 +2,32 @@ package dotty.tools package dotc package core -import Symbols._ -import Flags._ -import Names._ -import StdNames._, NameOps._ -import NullOpsDecorator._ +import Symbols.* +import Flags.* +import Names.* +import StdNames.*, NameOps.* +import NullOpsDecorator.* import NameKinds.SkolemName -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 annotation.{tailrec, constructorOnly} @@ -42,7 +42,7 @@ import CaptureSet.{CompareResult, IdempotentCaptRefMap, IdentityCaptRefMap} import scala.annotation.internal.sharable import scala.annotation.threadUnsafe -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.transform.TypeUtils.isErasedClass object Types { @@ -3882,7 +3882,7 @@ object Types { } trait TermLambda extends LambdaType { thisLambdaType => - import DepStatus._ + import DepStatus.* type ThisName = TermName type PInfo = Type type This >: this.type <: TermLambda diff --git a/compiler/src/dotty/tools/dotc/core/Uniques.scala b/compiler/src/dotty/tools/dotc/core/Uniques.scala index 4078a2b1051a..da6b0aba88bd 100644 --- a/compiler/src/dotty/tools/dotc/core/Uniques.scala +++ b/compiler/src/dotty/tools/dotc/core/Uniques.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package core -import Types._, Contexts._, util.Stats._, Hashable._, Names._ +import Types.*, Contexts.*, util.Stats.*, Hashable.*, Names.* import config.Config -import Decorators._ +import Decorators.* import util.{WeakHashSet, Stats} import WeakHashSet.Entry import scala.annotation.tailrec diff --git a/compiler/src/dotty/tools/dotc/core/Variances.scala b/compiler/src/dotty/tools/dotc/core/Variances.scala index 2401b43c8e17..e18a31e46769 100644 --- a/compiler/src/dotty/tools/dotc/core/Variances.scala +++ b/compiler/src/dotty/tools/dotc/core/Variances.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package core -import Types._, Contexts._, Flags._, Symbols._, Annotations._ +import Types.*, Contexts.*, Flags.*, Symbols.*, Annotations.* import TypeApplications.TypeParamInfo -import Decorators._ +import Decorators.* object Variances { diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileConstants.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileConstants.scala index 4aa60d973264..6ad71c5fd1ce 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileConstants.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileConstants.scala @@ -331,7 +331,7 @@ object ClassfileConstants { inline val impdep1 = 0xfe inline val impdep2 = 0xff - import Flags._ + import Flags.* abstract class FlagTranslation { protected def baseFlags(jflags: Int): FlagSet = EmptyFlags diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index a56ac695b57a..93ebcfeee62a 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -7,11 +7,11 @@ import scala.language.unsafeNulls import dotty.tools.tasty.{ TastyReader, TastyHeaderUnpickler } -import Contexts._, Symbols._, Types._, Names._, StdNames._, NameOps._, Scopes._, Decorators._ -import SymDenotations._, unpickleScala2.Scala2Unpickler._, Constants._, Annotations._, util.Spans._ -import Phases._ +import Contexts.*, Symbols.*, Types.*, Names.*, StdNames.*, NameOps.*, Scopes.*, Decorators.* +import SymDenotations.*, unpickleScala2.Scala2Unpickler.*, Constants.*, Annotations.*, util.Spans.* +import Phases.* import ast.{ tpd, untpd } -import ast.tpd._, util._ +import ast.tpd.*, util.* import java.io.IOException import java.lang.Integer.toHexString @@ -51,7 +51,7 @@ object ClassfileParser { def majorVersion: Int = (version >> 32).toInt def minorVersion: Int = (version & 0xFFFFFFFFL).toInt - import ClassfileConstants._ + import ClassfileConstants.* /** Marker trait for unpicklers that can be embedded in classfiles. */ trait Embedded @@ -270,8 +270,8 @@ class ClassfileParser( classRoot: ClassDenotation, moduleRoot: ClassDenotation)(ictx: Context) { - import ClassfileConstants._ - import ClassfileParser._ + import ClassfileConstants.* + import ClassfileParser.* protected val staticModule: Symbol = moduleRoot.sourceModule(using ictx) diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala index 0393744dde5c..e2220e40c6b4 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileTastyUUIDParser.scala @@ -4,13 +4,13 @@ package core.classfile import scala.language.unsafeNulls import scala.compiletime.uninitialized -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 @@ -22,7 +22,7 @@ import java.util.UUID class ClassfileTastyUUIDParser(classfile: AbstractFile)(ictx: Context) { - import ClassfileConstants._ + import ClassfileConstants.* private var pool: ConstantPool = uninitialized // the classfile's constant pool private var classfileVersion: Header.Version = Header.Version.Unknown diff --git a/compiler/src/dotty/tools/dotc/core/tasty/CommentUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/CommentUnpickler.scala index eb0d140df51e..1bbea6447bf3 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/CommentUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/CommentUnpickler.scala @@ -13,7 +13,7 @@ import TastyBuffer.Addr import java.nio.charset.StandardCharsets class CommentUnpickler(reader: TastyReader) { - import reader._ + import reader.* private[tasty] lazy val comments: HashMap[Addr, Comment] = { val comments = new HashMap[Addr, Comment] diff --git a/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala index b35c5c9f1acc..bb818edc1f82 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala @@ -5,9 +5,9 @@ package tasty import scala.language.unsafeNulls -import Contexts._, SymDenotations._, Decorators._ +import Contexts.*, SymDenotations.*, Decorators.* import dotty.tools.dotc.ast.tpd -import TastyUnpickler._ +import TastyUnpickler.* import classfile.ClassfileParser import Names.SimpleName import TreeUnpickler.UnpickleMode @@ -42,8 +42,8 @@ object DottyUnpickler { * @param mode the tasty file contains package (TopLevel), an expression (Term) or a type (TypeTree) */ class DottyUnpickler(bytes: Array[Byte], mode: UnpickleMode = UnpickleMode.TopLevel) extends ClassfileParser.Embedded with tpd.TreeProvider { - import tpd._ - import DottyUnpickler._ + import tpd.* + import DottyUnpickler.* val unpickler: TastyUnpickler = new TastyUnpickler(bytes) private val posUnpicklerOpt = unpickler.unpickle(new PositionsSectionUnpickler) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala index 1ddcf9afe1dc..5e2aee33859c 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala @@ -4,17 +4,17 @@ package core package tasty import dotty.tools.tasty.TastyBuffer -import TastyBuffer._ +import TastyBuffer.* import collection.mutable import Names.{Name, chrs, SimpleName, DerivedName, TypeName} -import NameKinds._ -import NameOps._ +import NameKinds.* +import NameOps.* import scala.io.Codec import NameTags.{SIGNED, TARGETSIGNED} class NameBuffer extends TastyBuffer(10000) { - import NameBuffer._ + import NameBuffer.* private val nameRefs = new mutable.LinkedHashMap[Name, NameRef] diff --git a/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala index 924b87bec003..86076517021a 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala @@ -5,19 +5,19 @@ package tasty import dotty.tools.tasty.TastyFormat.{SOURCE, PositionsSection} import dotty.tools.tasty.TastyBuffer -import TastyBuffer._ +import TastyBuffer.* -import ast._ +import ast.* import Trees.WithLazyFields import util.{SourceFile, NoSource} -import core._ -import Annotations._, Decorators._ +import core.* +import Annotations.*, Decorators.* import collection.mutable -import util.Spans._ +import util.Spans.* import reporting.Message object PositionPickler: - import ast.tpd._ + import ast.tpd.* // Note: This could be just TreeToAddr => Addr if functions are specialized to value classes. // We use a SAM type to avoid boxing of Addr diff --git a/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala index bc58138f2db6..b7f88155e3c8 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala @@ -9,12 +9,12 @@ import dotty.tools.tasty.{TastyFormat, TastyBuffer, TastyReader} import TastyFormat.SOURCE import TastyBuffer.{Addr, NameRef} -import util.Spans._ +import util.Spans.* import Names.TermName /** Unpickler for tree positions */ class PositionUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName) { - import reader._ + import reader.* private var myLineSizes: Array[Int] = uninitialized private var mySpans: util.HashMap[Addr, Span] = uninitialized diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala index c938868a3c48..0a7068b65445 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala @@ -5,10 +5,10 @@ package tasty import dotty.tools.tasty.{TastyBuffer, TastyReader} import TastyBuffer.NameRef -import Contexts._, Decorators._ +import Contexts.*, Decorators.* import Names.TermName import StdNames.nme -import TastyUnpickler._ +import TastyUnpickler.* import dotty.tools.tasty.TastyFormat.ASTsSection /** Reads the package and class name of the class contained in this TASTy */ @@ -21,9 +21,9 @@ class TastyClassName(bytes: Array[Byte]) { def readName(): Option[(TermName, TermName)] = unpickle(new TreeSectionUnpickler) class TreeSectionUnpickler extends SectionUnpickler[(TermName, TermName)](ASTsSection) { - import dotty.tools.tasty.TastyFormat._ + import dotty.tools.tasty.TastyFormat.* def unpickle(reader: TastyReader, tastyName: NameTable): (TermName, TermName) = { - import reader._ + import reader.* def readNames(packageName: TermName): (TermName, TermName) = { val tag = readByte() if (tag >= firstLengthTreeTag) { diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala index 4f1e84ac9184..556265c66ce9 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala @@ -6,12 +6,12 @@ package tasty import scala.language.unsafeNulls import dotty.tools.tasty.{TastyBuffer, TastyFormat, TastyHash} -import TastyFormat._ -import TastyBuffer._ +import TastyFormat.* +import TastyBuffer.* import collection.mutable import core.Symbols.ClassSymbol -import Decorators._ +import Decorators.* object TastyPickler { diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala index 5876b69edfde..9fe3fb282aa2 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala @@ -5,9 +5,9 @@ package tasty import dotty.tools.tasty.{TastyBuffer, TastyReader} import TastyBuffer.NameRef -import Contexts._, Decorators._ +import Contexts.*, Decorators.* import Names.Name -import TastyUnpickler._ +import TastyUnpickler.* import util.Spans.offsetToInt import dotty.tools.tasty.TastyFormat.{ASTsSection, PositionsSection, CommentsSection} import java.nio.file.{Files, Paths} @@ -98,12 +98,12 @@ class TastyPrinter(bytes: Array[Byte]) { } class TreeSectionUnpickler extends SectionUnpickler[String](ASTsSection) { - import dotty.tools.tasty.TastyFormat._ + import dotty.tools.tasty.TastyFormat.* private val sb: StringBuilder = new StringBuilder def unpickle(reader: TastyReader, tastyName: NameTable): String = { - import reader._ + import reader.* var indent = 0 def newLine() = { val length = treeStr("%5d".format(index(currentAddr) - index(startAddr))) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala index 679df42daca8..3a6f1e02a705 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala @@ -6,12 +6,12 @@ import scala.language.unsafeNulls import dotty.tools.tasty.{TastyFormat, TastyBuffer, TastyReader, TastyHeaderUnpickler, UnpicklerConfig} import TastyHeaderUnpickler.TastyVersion -import TastyFormat.NameTags._, TastyFormat.nameTagToString +import TastyFormat.NameTags.*, TastyFormat.nameTagToString import TastyBuffer.NameRef import scala.collection.mutable import Names.{TermName, termName, EmptyTermName} -import NameKinds._ +import NameKinds.* object TastyUnpickler { @@ -60,10 +60,10 @@ object TastyUnpickler { } -import TastyUnpickler._ +import TastyUnpickler.* class TastyUnpickler(reader: TastyReader) { - import reader._ + import reader.* def this(bytes: Array[Byte]) = this(new TastyReader(bytes)) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala index a04f05cb820c..2e4fe9967d6a 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -5,16 +5,16 @@ package tasty import scala.language.unsafeNulls -import dotty.tools.tasty.TastyFormat._ -import dotty.tools.tasty.TastyBuffer._ +import dotty.tools.tasty.TastyFormat.* +import dotty.tools.tasty.TastyBuffer.* -import ast.Trees._ +import ast.Trees.* import ast.{untpd, tpd} -import Contexts._, Symbols._, Types._, Names._, Constants._, Decorators._, Annotations._, Flags._ +import Contexts.*, Symbols.*, Types.*, Names.*, Constants.*, Decorators.*, Annotations.*, Flags.* import Comments.{Comment, CommentsContext} -import NameKinds._ +import NameKinds.* import StdNames.nme -import transform.SymUtils._ +import transform.SymUtils.* import config.Config import collection.mutable import reporting.{Profile, NoProfile} @@ -27,9 +27,9 @@ object TreePickler: class TreePickler(pickler: TastyPickler) { val buf: TreeBuffer = new TreeBuffer pickler.newSection(ASTsSection, buf) - import buf._ + import buf.* import pickler.nameBuffer.nameIndex - import tpd._ + import tpd.* import TreePickler.* private val symRefs = Symbols.MutableSymbolMap[Addr](256) @@ -734,7 +734,7 @@ class TreePickler(pickler: TastyPickler) { } def pickleModifiers(sym: Symbol, mdef: MemberDef)(using Context): Unit = { - import Flags._ + import Flags.* var flags = sym.flags val privateWithin = sym.privateWithin if (privateWithin.exists) { @@ -749,7 +749,7 @@ class TreePickler(pickler: TastyPickler) { } def pickleFlags(flags: FlagSet, isTerm: Boolean)(using Context): Unit = { - import Flags._ + import Flags.* def writeModTag(tag: Int) = { assert(isModifierTag(tag)) writeByte(tag) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index 840bb3bd94fb..6a02605b6ed7 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -6,43 +6,43 @@ package tasty import scala.language.unsafeNulls import Comments.CommentsContext -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 transform.SymUtils._ +import Trees.* +import Decorators.* +import transform.SymUtils.* import dotty.tools.dotc.quoted.QuotePatterns import dotty.tools.tasty.{TastyBuffer, TastyReader} -import TastyBuffer._ +import TastyBuffer.* import scala.annotation.{switch, tailrec} import scala.collection.mutable.ListBuffer import scala.collection.mutable import config.Printers.pickling -import dotty.tools.tasty.TastyFormat._ +import dotty.tools.tasty.TastyFormat.* import scala.annotation.constructorOnly import scala.annotation.internal.sharable @@ -57,8 +57,8 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameTable, posUnpicklerOpt: Option[PositionUnpickler], commentUnpicklerOpt: Option[CommentUnpickler]) { - import TreeUnpickler._ - import tpd._ + import TreeUnpickler.* + import tpd.* /** A map from addresses of definition entries to the symbols they define */ private val symAtAddr = new mutable.HashMap[Addr, Symbol] @@ -124,7 +124,7 @@ class TreeUnpickler(reader: TastyReader, } class Completer(reader: TastyReader)(using @constructorOnly _ctx: Context) extends LazyType { - import reader._ + import reader.* val owner = ctx.owner val mode = ctx.mode val source = ctx.source @@ -151,7 +151,7 @@ class TreeUnpickler(reader: TastyReader, } class TreeReader(val reader: TastyReader) { - import reader._ + import reader.* def forkAt(start: Addr): TreeReader = new TreeReader(subReader(start, endAddr)) def fork: TreeReader = forkAt(currentAddr) diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala index 2aeb1bdeefcc..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. * @@ -195,7 +195,7 @@ object PickleBuffer { private type FlagMap = Array[Array[Long]] private val (scalaTermFlagMap, scalaTypeFlagMap) = { - import Scala2Flags._ + import Scala2Flags.* val corr = Map( PROTECTED_PKL -> Protected, diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala index cc2d7dd7ee56..78d1666ad580 100644 --- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala +++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala @@ -3,8 +3,8 @@ package dotc package core package unpickleScala2 -import Symbols._, Types._, Contexts._, Flags._, Names._, StdNames._, Phases._ -import Decorators._ +import Symbols.*, Types.*, Contexts.*, Flags.*, Names.*, StdNames.*, Phases.* +import Decorators.* import scala.collection.mutable.ListBuffer /** Erasure logic specific to Scala 2 symbols. */ diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala index 3e211e75b73b..3b51496e4ff1 100644 --- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala @@ -9,30 +9,30 @@ import java.io.IOException import java.lang.Float.intBitsToFloat import java.lang.Double.longBitsToDouble -import Contexts._, Symbols._, Types._, Scopes._, SymDenotations._, Names._, NameOps._ -import StdNames._, Denotations._, NameOps._, Flags._, Constants._, Annotations._, Phases._ +import Contexts.*, Symbols.*, Types.*, Scopes.*, SymDenotations.*, Names.*, NameOps.* +import StdNames.*, Denotations.*, NameOps.*, Flags.*, Constants.*, Annotations.*, Phases.* import NameKinds.{Scala2MethodNameKinds, SuperAccessorName, ExpandedName} -import util.Spans._ -import dotty.tools.dotc.ast.{tpd, untpd}, ast.tpd._ +import util.Spans.* +import dotty.tools.dotc.ast.{tpd, untpd}, 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 transform.SymUtils._ -import PickleBuffer._ -import PickleFormat._ -import Decorators._ -import TypeApplications._ +import typer.Nullables.* +import transform.SymUtils.* +import PickleBuffer.* +import PickleFormat.* +import Decorators.* +import TypeApplications.* import classfile.ClassfileParser import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.annotation.switch -import reporting._ +import reporting.* object Scala2Unpickler { @@ -146,7 +146,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas // print("unpickling "); showPickled() // !!! DEBUG - import Scala2Unpickler._ + import Scala2Unpickler.* val moduleRoot: SymDenotation = inContext(ictx) { moduleClassRoot.sourceModule.denot } assert(moduleRoot.isTerm) diff --git a/compiler/src/dotty/tools/dotc/coverage/Location.scala b/compiler/src/dotty/tools/dotc/coverage/Location.scala index aa7a586d4b57..88893709b8bd 100644 --- a/compiler/src/dotty/tools/dotc/coverage/Location.scala +++ b/compiler/src/dotty/tools/dotc/coverage/Location.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package coverage -import ast.tpd._ +import ast.tpd.* import dotty.tools.dotc.core.Contexts.Context import dotty.tools.dotc.core.Flags.* import java.nio.file.Path diff --git a/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala b/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala index 85a56b9f1d15..16e7cc9c7adc 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/DecompilationPrinter.scala @@ -8,7 +8,7 @@ import java.nio.charset.StandardCharsets import scala.io.Codec -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 c148ff5f9bca..c1bd6b6778fd 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala @@ -4,10 +4,10 @@ package decompiler import scala.language.unsafeNulls -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.* import dotty.tools.dotc.core.tasty.TastyHTMLPrinter -import dotty.tools.dotc.reporting._ +import dotty.tools.dotc.reporting.* import dotty.tools.io.AbstractFile import scala.quoted.runtime.impl.QuotesImpl diff --git a/compiler/src/dotty/tools/dotc/decompiler/Main.scala b/compiler/src/dotty/tools/dotc/decompiler/Main.scala index 3cc94f782793..ecd067d3debf 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/Main.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/Main.scala @@ -3,7 +3,7 @@ package dotty.tools.dotc.decompiler import java.nio.file.Files import dotty.tools.dotc -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.io.AbstractFile /** Main class of the `dotc -decompiler` decompiler. diff --git a/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala b/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala index 62f3e75d2001..7f396654749e 100644 --- a/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala +++ b/compiler/src/dotty/tools/dotc/decompiler/TASTYDecompiler.scala @@ -1,6 +1,6 @@ package dotty.tools.dotc.decompiler -import dotty.tools.dotc.fromtasty._ +import dotty.tools.dotc.fromtasty.* import dotty.tools.dotc.core.Phases.Phase /** Compiler from tasty to user readable high text representation diff --git a/compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala b/compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala index f032f8d4d065..4969882b7766 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 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 fb0abe3332ed..2f4ecad8859d 100644 --- a/compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala +++ b/compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala @@ -5,7 +5,7 @@ package fromtasty import scala.language.unsafeNulls import io.{JarArchive, AbstractFile, Path} -import core.Contexts._ +import core.Contexts.* import core.Decorators.em import java.io.File diff --git a/compiler/src/dotty/tools/dotc/inlines/Inliner.scala b/compiler/src/dotty/tools/dotc/inlines/Inliner.scala index 8d594448dc2a..07472ee9b4dd 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inliner.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inliner.scala @@ -28,7 +28,7 @@ import scala.annotation.constructorOnly /** General support for inlining */ object Inliner: - import tpd._ + import tpd.* private[inlines] type DefBuffer = mutable.ListBuffer[ValOrDefDef] @@ -143,8 +143,8 @@ end Inliner * @param rhsToInline the body of the inlineable method that replaces the call. */ class Inliner(val call: tpd.Tree)(using Context): - import tpd._ - import Inliner._ + import tpd.* + import Inliner.* private val methPart = funPart(call) protected val callTypeArgs = typeArgss(call).flatten @@ -734,7 +734,7 @@ class Inliner(val call: tpd.Tree)(using Context): */ class InlineTyper(initialErrorCount: Int, @constructorOnly nestingLevel: Int = ctx.nestingLevel + 1) extends ReTyper(nestingLevel): - import reducer._ + import reducer.* override def ensureAccessible(tpe: Type, superAccess: Boolean, pos: SrcPos)(using Context): Type = { tpe match { diff --git a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala index 25e9b1480370..0accbad5b473 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala @@ -5,7 +5,7 @@ package inlines import ast.*, core.* import Flags.*, Symbols.*, Types.*, Decorators.*, Constants.*, Contexts.* import StdNames.{tpnme, nme} -import transform.SymUtils._ +import transform.SymUtils.* import typer.* import NameKinds.BodyRetainerName import SymDenotations.SymDenotation @@ -22,7 +22,7 @@ import util.Spans.Span /** Support for querying inlineable methods and for inlining calls to such methods */ object Inlines: - import tpd._ + import tpd.* /** An exception signalling that an inline info cannot be computed due to a * cyclic reference. i14772.scala shows a case where this happens. @@ -395,7 +395,7 @@ object Inlines: * @param rhsToInline the body of the inlineable method that replaces the call. */ private class InlineCall(call: tpd.Tree)(using Context) extends Inliner(call): - import tpd._ + import tpd.* import Inlines.* /** The Inlined node representing the inlined call */ diff --git a/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala b/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala index 060c8d21f390..10b55d69bf37 100644 --- a/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala +++ b/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala @@ -3,20 +3,20 @@ package dotc package inlines import dotty.tools.dotc.ast.{Trees, tpd, untpd} -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 transform.SymUtils.* @@ -25,7 +25,7 @@ import util.Property import staging.StagingLevel object PrepareInlineable { - import tpd._ + import tpd.* private val InlineAccessorsKey = new Property.Key[InlineAccessors] diff --git a/compiler/src/dotty/tools/dotc/interactive/Completion.scala b/compiler/src/dotty/tools/dotc/interactive/Completion.scala index 8fb844f1f333..6e91254c2d72 100644 --- a/compiler/src/dotty/tools/dotc/interactive/Completion.scala +++ b/compiler/src/dotty/tools/dotc/interactive/Completion.scala @@ -3,15 +3,15 @@ package dotty.tools.dotc.interactive import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.ast.NavigateAST import dotty.tools.dotc.config.Printers.interactiv -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.Names.{Name, TermName} import dotty.tools.dotc.core.NameKinds.SimpleNameKind -import dotty.tools.dotc.core.NameOps._ +import dotty.tools.dotc.core.NameOps.* import dotty.tools.dotc.core.Phases -import dotty.tools.dotc.core.Scopes._ +import dotty.tools.dotc.core.Scopes.* import dotty.tools.dotc.core.Symbols.{NoSymbol, Symbol, defn, newSymbol} import dotty.tools.dotc.core.StdNames.nme import dotty.tools.dotc.core.SymDenotations.SymDenotation @@ -42,7 +42,7 @@ case class Completion(label: String, description: String, symbols: List[Symbol]) object Completion: - import dotty.tools.dotc.ast.tpd._ + import dotty.tools.dotc.ast.tpd.* /** Get possible completions from tree at `pos` * diff --git a/compiler/src/dotty/tools/dotc/interactive/Interactive.scala b/compiler/src/dotty/tools/dotc/interactive/Interactive.scala index fd6d426f39bb..6c8e3b61cd01 100644 --- a/compiler/src/dotty/tools/dotc/interactive/Interactive.scala +++ b/compiler/src/dotty/tools/dotc/interactive/Interactive.scala @@ -4,21 +4,21 @@ package interactive import scala.language.unsafeNulls -import scala.collection._ +import scala.collection.* import ast.{NavigateAST, Trees, tpd, untpd} -import core._ -import Decorators._, ContextOps._ -import Contexts._, Flags._, Names._, NameOps._, Symbols._, Trees._, Types._ -import transform.SymUtils._ -import util.Spans._, util.SourceFile, util.SourcePosition +import core.* +import Decorators.*, ContextOps.* +import Contexts.*, Flags.*, Names.*, NameOps.*, Symbols.*, Trees.*, Types.* +import transform.SymUtils.* +import util.Spans.*, util.SourceFile, util.SourcePosition /** High-level API to get information out of typed trees, designed to be used by IDEs. * * @see `InteractiveDriver` to get typed trees from code. */ object Interactive { - import ast.tpd._ + import ast.tpd.* object Include { case class Set private[Include] (val bits: Int) extends AnyVal { 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 2a2860cd1ba3..b00cd1036018 100644 --- a/compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala +++ b/compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala @@ -5,28 +5,28 @@ package interactive import scala.language.unsafeNulls import java.net.URI -import java.io._ -import java.nio.file._ +import java.io.* +import java.nio.file.* import java.nio.file.attribute.BasicFileAttributes import java.nio.charset.StandardCharsets -import java.util.zip._ +import java.util.zip.* -import scala.collection._ +import scala.collection.* import scala.io.Codec import dotty.tools.io.AbstractFile import ast.{Trees, tpd} -import core._, core.Decorators._ -import Contexts._, Names._, NameOps._, Symbols._, SymDenotations._, Trees._, Types._ +import core.*, core.Decorators.* +import Contexts.*, Names.*, NameOps.*, Symbols.*, SymDenotations.*, Trees.*, 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 { - import tpd._ + import tpd.* override def sourcesRequired: Boolean = false @@ -148,7 +148,7 @@ class InteractiveDriver(val settings: List[String]) extends Driver { def run(uri: URI, sourceCode: String): List[Diagnostic] = run(uri, SourceFile.virtual(uri, sourceCode)) def run(uri: URI, source: SourceFile): List[Diagnostic] = { - import typer.ImportInfo._ + import typer.ImportInfo.* val previousCtx = myCtx try { diff --git a/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala b/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala index 60f01396e91e..5480d4a43043 100644 --- a/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala +++ b/compiler/src/dotty/tools/dotc/interactive/SourceTree.scala @@ -4,9 +4,9 @@ package interactive import ast.tpd -import core._ -import Contexts._, NameOps._, Symbols._, StdNames._ -import util._, util.Spans._ +import core.* +import Contexts.*, NameOps.*, Symbols.*, StdNames.* +import util.*, util.Spans.* /** * A `tree` coming from `source` @@ -55,7 +55,7 @@ object SourceTree { !sym.source.exists) // FIXME: We cannot deal with external projects yet Nil else { - import ast.Trees._ + import ast.Trees.* def sourceTreeOfClass(tree: tpd.Tree): Option[SourceTree] = tree match { case PackageDef(_, stats) => stats.flatMap(sourceTreeOfClass).headOption diff --git a/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala b/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala index a3769f4f813d..aa0e9a47f775 100644 --- a/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala +++ b/compiler/src/dotty/tools/dotc/parsing/CharArrayReader.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package parsing -import util.Chars._ +import util.Chars.* import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala index 6ec896dcb200..8e075acdf5e3 100644 --- a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala @@ -6,31 +6,31 @@ import dotty.tools.dotc.core.Constants.Constant import dotty.tools.dotc.core.Flags import dotty.tools.dotc.core.Flags.FlagSet -import JavaTokens._ -import JavaScanners._ +import JavaTokens.* +import JavaScanners.* import Scanners.Offset -import Parsers._ -import core._ -import Contexts._ -import Names._ -import Types._ -import ast.Trees._ -import Decorators._ -import StdNames._ -import reporting._ +import Parsers.* +import core.* +import Contexts.* +import Names.* +import Types.* +import ast.Trees.* +import Decorators.* +import StdNames.* +import reporting.* import dotty.tools.dotc.util.SourceFile -import util.Spans._ +import util.Spans.* import scala.collection.mutable.{ListBuffer, LinkedHashMap} object JavaParsers { - import ast.untpd._ + import ast.untpd.* class JavaParser(source: SourceFile)(using Context) extends ParserCommon(source) { val definitions: Definitions = ctx.definitions - import definitions._ + import definitions.* val in: JavaScanner = new JavaScanner(source) diff --git a/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala b/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala index 6a1d5d8b216c..f50dcdda438c 100644 --- a/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala +++ b/compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package parsing -import core.Contexts._ +import core.Contexts.* import core.Names.SimpleName -import Scanners._ +import Scanners.* import util.SourceFile -import JavaTokens._ +import JavaTokens.* import scala.annotation.{switch, tailrec} -import util.Chars._ +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 c845ea8f74c7..a1fb5632d77f 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -8,35 +8,35 @@ import scala.annotation.internal.sharable import scala.collection.mutable.ListBuffer import scala.collection.immutable.BitSet 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 scala.annotation.tailrec 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 { - import ast.untpd._ + import ast.untpd.* case class OpInfo(operand: Tree, operator: Ident, offset: Offset) @@ -1233,7 +1233,7 @@ object Parsers { case EXPOLIT => return Number(digits, NumberKind.Floating) case _ => } - import scala.util.FromDigits._ + import scala.util.FromDigits.* val value = try token match { case INTLIT => intFromDigits(digits, in.base) diff --git a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala index 0339fc0531f4..44b0c43e545b 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala @@ -4,14 +4,14 @@ package parsing import scala.language.unsafeNulls -import core.Names._, core.Contexts._, core.Decorators._, util.Spans._ -import core.StdNames._, core.Comments._ +import core.Names.*, core.Contexts.*, core.Decorators.*, util.Spans.* +import core.StdNames.*, 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 scala.annotation.{switch, tailrec} import scala.collection.mutable import scala.collection.immutable.SortedMap diff --git a/compiler/src/dotty/tools/dotc/parsing/ScriptParsers.scala b/compiler/src/dotty/tools/dotc/parsing/ScriptParsers.scala index d11db73b0455..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:
@@ -45,7 +45,7 @@ import Parsers._ */ object ScriptParsers { - import ast.untpd._ + import ast.untpd.* class ScriptParser(source: SourceFile)(using Context) extends Parser(source) { @@ -118,7 +118,7 @@ object ScriptParsers { * } * } */ - import definitions._ + import definitions.* def emptyPkg = atPos(0, 0, 0) { Ident(nme.EMPTY_PACKAGE_NAME) } def emptyInit = DefDef( 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 0f7d426fbd28..803470fe85a5 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParserCommon.scala @@ -9,7 +9,7 @@ package dotty.tools.dotc package parsing package xml -import Utility._ +import Utility.* import util.Chars.SU import scala.collection.BufferedIterator diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala index 0f0a2a3ee61f..5567b4f569d5 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 core.Contexts.Context import mutable.{ Buffer, ArrayBuffer, ListBuffer } import scala.util.control.ControlThrowable 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 @@ -39,7 +39,7 @@ import Utility._ */ object MarkupParsers { - import ast.untpd._ + import ast.untpd.* case object MissingEndTagControl extends ControlThrowable { override def getMessage: String = "start tag was here: " diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala index 6af2250a5dd4..d1f2875064d4 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala @@ -7,12 +7,12 @@ import scala.language.unsafeNulls import scala.compiletime.uninitialized import scala.collection.mutable -import core._ -import Decorators._ +import core.* +import Decorators.* import Flags.Mutable -import Names._, StdNames._, ast.Trees._, ast.{tpd, untpd} -import Symbols._, Contexts._ -import util.Spans._ +import Names.*, StdNames.*, ast.Trees.*, ast.{tpd, untpd} +import Symbols.*, Contexts.* +import util.Spans.* import Parsers.Parser /** This class builds instance of `Tree` that represent XML. @@ -29,7 +29,7 @@ import Parsers.Parser class SymbolicXMLBuilder(parser: Parser, preserveWS: Boolean)(using Context) { import Constants.Constant - import untpd._ + import untpd.* import parser.atSpan diff --git a/compiler/src/dotty/tools/dotc/parsing/xml/Utility.scala b/compiler/src/dotty/tools/dotc/parsing/xml/Utility.scala index 87412cf6d69c..6577030ec671 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/Utility.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/Utility.scala @@ -130,7 +130,7 @@ object Utility { * See [4] and Appendix B of XML 1.0 specification. */ def isNameChar(ch: Char): Boolean = { - import java.lang.Character._ + import java.lang.Character.* // The constants represent groups Mc, Me, Mn, Lm, and Nd. isNameStart(ch) || (getType(ch).toByte match { @@ -151,7 +151,7 @@ object Utility { * See [3] and Appendix B of XML 1.0 specification */ def isNameStart(ch: Char): Boolean = { - import java.lang.Character._ + import java.lang.Character.* getType(ch).toByte match { case LOWERCASE_LETTER | diff --git a/compiler/src/dotty/tools/dotc/plugins/Plugin.scala b/compiler/src/dotty/tools/dotc/plugins/Plugin.scala index 30ef94239ac1..ce77a5b9d97a 100644 --- a/compiler/src/dotty/tools/dotc/plugins/Plugin.scala +++ b/compiler/src/dotty/tools/dotc/plugins/Plugin.scala @@ -3,10 +3,10 @@ package plugins import scala.language.unsafeNulls -import core._ -import Contexts._ -import Phases._ -import dotty.tools.io._ +import core.* +import Contexts.* +import Phases.* +import dotty.tools.io.* import transform.MegaPhase.MiniPhase import java.io.InputStream diff --git a/compiler/src/dotty/tools/dotc/plugins/Plugins.scala b/compiler/src/dotty/tools/dotc/plugins/Plugins.scala index 12acc3d7b4c3..4d6e44a3bea7 100644 --- a/compiler/src/dotty/tools/dotc/plugins/Plugins.scala +++ b/compiler/src/dotty/tools/dotc/plugins/Plugins.scala @@ -3,12 +3,12 @@ package plugins import scala.language.unsafeNulls -import core._ -import Contexts._ +import core.* +import Contexts.* import Decorators.em import config.{ PathResolver, Feature } -import dotty.tools.io._ -import Phases._ +import dotty.tools.io.* +import Phases.* import config.Printers.plugins.{ println => debug } import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/dotc/printing/Formatting.scala b/compiler/src/dotty/tools/dotc/printing/Formatting.scala index c0be888955e9..02f470324e8a 100644 --- a/compiler/src/dotty/tools/dotc/printing/Formatting.scala +++ b/compiler/src/dotty/tools/dotc/printing/Formatting.scala @@ -6,12 +6,12 @@ import scala.language.unsafeNulls import scala.collection.mutable -import core._ -import Texts._, Types._, Flags._, Symbols._, Contexts._ -import Decorators._ +import core.* +import Texts.*, Types.*, Flags.*, Symbols.*, 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 ceb5afdea750..c9b3e2a5aa83 100644 --- a/compiler/src/dotty/tools/dotc/printing/Highlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/Highlighting.scala @@ -3,7 +3,7 @@ package dotc 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/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index 60a25413d8e5..d5c60cf44579 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package printing -import core._ -import Texts._, Types._, Flags._, Names._, Symbols._, NameOps._, Constants._, Denotations._ -import StdNames._ -import Contexts._ +import core.* +import Texts.*, Types.*, Flags.*, Names.*, Symbols.*, NameOps.*, Constants.*, Denotations.* +import StdNames.* +import Contexts.* import Scopes.Scope, Denotations.Denotation, 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 eafa399313da..8687925ed5fb 100644 --- a/compiler/src/dotty/tools/dotc/printing/Printer.scala +++ b/compiler/src/dotty/tools/dotc/printing/Printer.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package printing -import core._ -import Texts._, ast.Trees._ +import core.* +import Texts.*, ast.Trees.* import Types.{Type, SingletonType, LambdaParam, NamedType}, Symbols.Symbol, Scopes.Scope, Constants.Constant, Names.Name, Denotations._, Annotations.Annotation, Contexts.Context diff --git a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala index 70bb6f89663c..9426842363a7 100644 --- a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -2,29 +2,29 @@ package dotty.tools package dotc package printing -import core._ +import core.* import Constants.* -import Texts._ -import Types._ -import Flags._ -import Names._ -import Symbols._ -import NameOps._ +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 transform.TypeUtils._ -import transform.SymUtils._ +import transform.TypeUtils.* +import transform.SymUtils.* import config.{Config, Feature} import dotty.tools.dotc.util.SourcePosition @@ -345,7 +345,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { } protected def toTextCore[T <: Untyped](tree: Tree[T]): Text = { - import untpd._ + import untpd.* def isLocalThis(tree: Tree) = tree.typeOpt match { case tp: ThisType => tp.cls == ctx.owner.enclosingClass @@ -781,7 +781,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { super.toTextCapturing(tp, refsText, boxText) override def toText[T <: Untyped](tree: Tree[T]): Text = controlled { - import untpd._ + import untpd.* var txt = toTextCore(tree) @@ -924,7 +924,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { } protected def defDefToText[T <: Untyped](tree: DefDef[T]): Text = { - import untpd._ + import untpd.* dclTextOr(tree) { val defKeyword = modText(tree.mods, tree.symbol, keywordStr("def"), isType = false) val isExtension = tree.hasType && tree.symbol.is(ExtensionMethod) 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 4a0e68861a1a..4480aa9c76a4 100644 --- a/compiler/src/dotty/tools/dotc/printing/Showable.scala +++ b/compiler/src/dotty/tools/dotc/printing/Showable.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package printing -import core._ +import core.* -import Contexts._, Texts._, Decorators._ +import Contexts.*, Texts.*, 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 7030776dd06c..6f65320d2c8e 100644 --- a/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala +++ b/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala @@ -4,11 +4,11 @@ package printing import scala.language.unsafeNulls 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.Spans.Span import dotty.tools.dotc.util.SourceFile @@ -87,7 +87,7 @@ object SyntaxHighlighting { highlightPosition(comment.span, CommentColor) object TreeHighlighter extends untpd.UntypedTreeTraverser { - import untpd._ + import untpd.* def ignored(tree: NameTree) = { val name = tree.name.toTermName diff --git a/compiler/src/dotty/tools/dotc/profile/Profiler.scala b/compiler/src/dotty/tools/dotc/profile/Profiler.scala index 64cc08160701..a13c9d41b529 100644 --- a/compiler/src/dotty/tools/dotc/profile/Profiler.scala +++ b/compiler/src/dotty/tools/dotc/profile/Profiler.scala @@ -11,7 +11,7 @@ import javax.management.openmbean.CompositeData import javax.management.{Notification, NotificationEmitter, NotificationListener} import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.io.AbstractFile import annotation.internal.sharable @@ -83,7 +83,7 @@ private [profile] object NoOpProfiler extends Profiler { override def finished(): Unit = () } private [profile] object RealProfiler { - import scala.jdk.CollectionConverters._ + import scala.jdk.CollectionConverters.* val runtimeMx: RuntimeMXBean = ManagementFactory.getRuntimeMXBean val memoryMx: MemoryMXBean = ManagementFactory.getMemoryMXBean val gcMx: List[GarbageCollectorMXBean] = ManagementFactory.getGarbageCollectorMXBeans.asScala.toList @@ -106,7 +106,7 @@ private [profile] class RealProfiler(reporter : ProfileReporter)(using Context) @nowarn("cat=deprecation") private[profile] def snapThread(idleTimeNanos: Long): ProfileSnap = { - import RealProfiler._ + import RealProfiler.* val current = Thread.currentThread() ProfileSnap( diff --git a/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala b/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala index 1e9969e0bc65..e3ea69d9be06 100644 --- a/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala +++ b/compiler/src/dotty/tools/dotc/profile/ThreadPoolFactory.scala @@ -3,11 +3,11 @@ package dotty.tools.dotc.profile import scala.language.unsafeNulls import java.util.concurrent.ThreadPoolExecutor.AbortPolicy -import java.util.concurrent._ +import java.util.concurrent.* import java.util.concurrent.atomic.AtomicInteger import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* sealed trait ThreadPoolFactory { diff --git a/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala b/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala index ef1ab91e3e2a..c124e12077fe 100644 --- a/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala +++ b/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala @@ -11,19 +11,19 @@ import java.lang.reflect.{InvocationTargetException, Method => JLRMethod} import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.TreeMapWithImplicits -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.Annotations.* +import dotty.tools.dotc.core.Constants.* +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.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.typer.ImportInfo.withRootImports import dotty.tools.dotc.util.SrcPos import dotty.tools.dotc.reporting.Message @@ -32,8 +32,8 @@ import dotty.tools.dotc.core.CyclicReference /** Tree interpreter for metaprogramming constructs */ class Interpreter(pos: SrcPos, classLoader0: ClassLoader)(using Context): - import Interpreter._ - import tpd._ + import Interpreter.* + import tpd.* val classLoader = if ctx.owner.topLevelClass.name.startsWith(str.REPL_SESSION_LINE) then @@ -328,7 +328,7 @@ object Interpreter: class StopInterpretation(val msg: Message, val pos: SrcPos) extends Exception object Call: - import tpd._ + import tpd.* /** Matches an expression that is either a field access or an application * It returns a TermRef containing field accessed or a method reference and the arguments passed to it. */ diff --git a/compiler/src/dotty/tools/dotc/quoted/MacroExpansion.scala b/compiler/src/dotty/tools/dotc/quoted/MacroExpansion.scala index 141b349826b4..d8ba1b72ce3b 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, SourcePosition} diff --git a/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala b/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala index 1b354abf929f..a9b66fc056e2 100644 --- a/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala +++ b/compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc.quoted -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.{TreeTypeMap, 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.{ PositionPickler, TastyPickler, TastyPrinter, TreePickler } import dotty.tools.dotc.core.tasty.DottyUnpickler import dotty.tools.dotc.core.tasty.TreeUnpickler.UnpickleMode @@ -16,14 +16,14 @@ import dotty.tools.dotc.report import dotty.tools.dotc.reporting.Message import scala.quoted.Quotes -import scala.quoted.runtime.impl._ +import scala.quoted.runtime.impl.* import scala.collection.mutable -import QuoteUtils._ +import QuoteUtils.* object PickledQuotes { - import tpd._ + import tpd.* /** Pickle the tree of the quote into strings */ def pickleQuote(tree: Tree)(using Context): List[String] = diff --git a/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala b/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala index 48884f6b2d6e..eb5395194d11 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala @@ -18,12 +18,12 @@ 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 dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import scala.collection.mutable object QuotePatterns: - import tpd._ + import tpd.* /** Check for restricted patterns */ def checkPattern(quotePattern: QuotePattern)(using Context): Unit = new tpd.TreeTraverser { diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala b/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala index 604c8da3420a..a015c726c59f 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuoteUtils.scala @@ -1,11 +1,11 @@ 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._ + import tpd.* /** Get the owner of a tree if it has one */ def treeOwner(tree: Tree)(using Context): Option[Symbol] = { diff --git a/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala b/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala index c063e437cb19..4147e49b87ce 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuotesCache.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc.quoted -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.util.Property import dotty.tools.dotc.ast.tpd object QuotesCache { - import tpd._ + import tpd.* /** A key to be used in a context property that caches the unpickled trees */ private val QuotesCacheKey = new Property.Key[collection.mutable.Map[String | List[String], Tree]] 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 75261fb6890e..142561dcbbee 100644 --- a/compiler/src/dotty/tools/dotc/report.scala +++ b/compiler/src/dotty/tools/dotc/report.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc -import reporting._ -import Diagnostic._ +import reporting.* +import Diagnostic.* import util.{SourcePosition, NoSourcePosition, SrcPos} -import core._ -import Contexts._, Flags.*, Symbols._, Decorators._ +import core.* +import Contexts.*, Flags.*, Symbols.*, Decorators.* import config.SourceVersion -import ast._ +import ast.* import config.Feature.sourceVersion import java.lang.System.currentTimeMillis diff --git a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala index a95af962c053..ce7477f4da70 100644 --- a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala @@ -2,7 +2,7 @@ package dotty.tools package dotc package reporting -import core.Contexts._ +import core.Contexts.* import java.io.{ BufferedReader, PrintWriter } import Diagnostic.Error diff --git a/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala b/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala index 624aa93924e8..7a8edb233aee 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala @@ -5,12 +5,12 @@ package reporting import scala.language.unsafeNulls 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, INFO, WARNING} import dotty.tools.dotc.util.SourcePosition import java.util.{Collections, Optional, List => JList} -import scala.util.chaining._ +import scala.util.chaining.* import core.Decorators.toMessage object Diagnostic: diff --git a/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala b/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala index f78fd3bd190b..a9b2f68d07d6 100644 --- a/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala +++ b/compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package reporting -import core._ -import Contexts._ +import core.* +import Contexts.* import Decorators.*, Symbols.*, Names.*, Types.*, Flags.* import typer.ProtoTypes.{FunProto, SelectionProto} import transform.SymUtils.isNoValue 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 9b6a3c75ba5d..5910d9b4d656 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/MessageRendering.scala b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala index f53359fb8b19..6881235e3dc1 100644 --- a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala +++ b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala @@ -6,11 +6,11 @@ import scala.language.unsafeNulls import java.lang.System.{lineSeparator => EOL} -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 } import scala.annotation.switch @@ -210,7 +210,7 @@ trait MessageRendering { } private def appendFilterHelp(dia: Diagnostic, sb: mutable.StringBuilder): Unit = - import dia._ + import dia.* val hasId = msg.errorId.errorNumber >= 0 val category = dia match { case _: UncheckedWarning => "unchecked" @@ -228,7 +228,7 @@ trait MessageRendering { /** The whole message rendered from `msg` */ def messageAndPos(dia: Diagnostic)(using Context): String = { - import dia._ + import dia.* val pos1 = pos.nonInlined val inlineStack = inlinePosStack(pos).filter(_ != pos1) val maxLineNumber = diff --git a/compiler/src/dotty/tools/dotc/reporting/Reporter.scala b/compiler/src/dotty/tools/dotc/reporting/Reporter.scala index 3be1a159c55c..f567e094e831 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Reporter.scala @@ -4,11 +4,11 @@ package reporting import scala.language.unsafeNulls -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, 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, PrintWriter} @@ -63,7 +63,7 @@ object Reporter { * error messages. */ abstract class Reporter extends interfaces.ReporterResult { - import Reporter._ + import Reporter.* /** Report a diagnostic */ def doReport(dia: Diagnostic)(using Context): Unit @@ -179,7 +179,7 @@ abstract class Reporter extends interfaces.ReporterResult { case _ => dia def go() = - import Action._ + import Action.* dia match case w: Warning => WConf.parsed.action(dia) match case Error => issueUnconfigured(w.toError) 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 71b2636ab8ed..d8426aa8781e 100644 --- a/compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala +++ b/compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala @@ -4,7 +4,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 5303ccd7f219..29b5bccb7714 100644 --- a/compiler/src/dotty/tools/dotc/reporting/WConf.scala +++ b/compiler/src/dotty/tools/dotc/reporting/WConf.scala @@ -4,7 +4,7 @@ package reporting import scala.language.unsafeNulls -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.util.SourcePosition import java.util.regex.PatternSyntaxException @@ -36,8 +36,8 @@ final case class WConf(confs: List[(List[MessageFilter], Action)]): }.getOrElse(Action.Warning) object WConf: - import Action._ - import MessageFilter._ + import Action.* + import MessageFilter.* private type Conf = (List[MessageFilter], Action) diff --git a/compiler/src/dotty/tools/dotc/reporting/messages.scala b/compiler/src/dotty/tools/dotc/reporting/messages.scala index 919b23cee8a2..5c7eb1d0f775 100644 --- a/compiler/src/dotty/tools/dotc/reporting/messages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/messages.scala @@ -2,17 +2,17 @@ package dotty.tools package dotc package reporting -import core._ -import Contexts._ -import Decorators._, Symbols._, Names._, NameOps._, Types._, Flags._, Phases._ +import core.* +import Contexts.* +import Decorators.*, Symbols.*, Names.*, NameOps.*, Types.*, Flags.*, 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} @@ -22,10 +22,10 @@ import typer.Inferencing import scala.util.control.NonFatal import StdNames.nme import printing.Formatting.hl -import ast.Trees._ +import ast.Trees.* import ast.untpd import ast.tpd -import transform.SymUtils._ +import transform.SymUtils.* import scala.util.matching.Regex import java.util.regex.Matcher.quoteReplacement import cc.CaptureSet.IdentityCaptRefMap @@ -1699,7 +1699,7 @@ class JavaEnumParentArgs(parent: Type)(using Context) class CannotHaveSameNameAs(sym: Symbol, cls: Symbol, reason: CannotHaveSameNameAs.Reason)(using Context) extends NamingMsg(CannotHaveSameNameAsID) { - import CannotHaveSameNameAs._ + import CannotHaveSameNameAs.* def reasonMessage(using Context): String = reason match { case CannotBeOverridden => "class definitions cannot be overridden" case DefinedInSelf(self) => @@ -2268,7 +2268,7 @@ extends NamingMsg(DoubleDefinitionID) { def erasedType = if ctx.erasedTypes then i" ${decl.info}" else "" def details(using Context): String = if (decl.isRealMethod && previousDecl.isRealMethod) { - import Signature.MatchDegree._ + import Signature.MatchDegree.* // compare the signatures when both symbols represent methods decl.signature.matchDegree(previousDecl.signature) match { diff --git a/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala b/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala index 5bea0fb66ed0..2586ad8604c3 100644 --- a/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala +++ b/compiler/src/dotty/tools/dotc/rewrites/Rewrites.scala @@ -3,7 +3,7 @@ package rewrites import util.{SourceFile, Spans} import Spans.Span -import core.Contexts._ +import core.Contexts.* import collection.mutable import scala.annotation.tailrec import dotty.tools.dotc.reporting.Reporter @@ -114,6 +114,6 @@ object Rewrites { * as an optional setting. */ class Rewrites { - import Rewrites._ + import Rewrites.* private val patched = new PatchedFiles } diff --git a/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala b/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala index 833cf7f2e0ff..07fa2027fbe6 100644 --- a/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala +++ b/compiler/src/dotty/tools/dotc/sbt/APIUtils.scala @@ -3,11 +3,11 @@ package sbt import scala.language.unsafeNulls -import core._ -import Contexts._ -import Flags._ -import Symbols._ -import NameOps._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* +import NameOps.* import xsbti.api import xsbti.api.SafeLazy.strict @@ -24,7 +24,7 @@ object APIUtils { val EmptyType = api.EmptyType.of() } - import Constants._ + import Constants.* /** Registers a dummy class for sbt's incremental compilation. * diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala index a1b43e463316..5561a241c975 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala @@ -5,20 +5,20 @@ import scala.language.unsafeNulls 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 -import transform.SymUtils._ +import transform.SymUtils.* import dotty.tools.io.File import java.io.PrintWriter @@ -135,7 +135,7 @@ object ExtractAPI: * http://www.scala-sbt.org/0.13/docs/Understanding-Recompilation.html#Hashing+an+API+representation */ private class ExtractAPICollector(using Context) extends ThunkHolder { - import tpd._ + import tpd.* import xsbti.api /** This cache is necessary for correctness, see the comment about inherited @@ -614,7 +614,7 @@ private class ExtractAPICollector(using Context) extends ThunkHolder { apiType(lo), apiType(hi)) def apiVariance(v: Int): api.Variance = { - import api.Variance._ + import api.Variance.* if (v < 0) Contravariant else if (v > 0) Covariant else Invariant diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala index 60cfeeced209..fbf6e08f8b60 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala @@ -9,22 +9,22 @@ import java.util.{Arrays, EnumSet} import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.classpath.FileUtils.{isTasty, hasClassExtension, hasTastyExtension} -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -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.Contexts.* +import dotty.tools.dotc.core.Decorators.* +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.Denotations.StaleSymbol -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.util.{SrcPos, NoSourcePosition} import dotty.tools.io import dotty.tools.io.{AbstractFile, PlainFile, ZipArchive, NoAbstractFile} import xsbti.UseScope import xsbti.api.DependencyContext -import xsbti.api.DependencyContext._ +import xsbti.api.DependencyContext.* import scala.jdk.CollectionConverters.* @@ -51,7 +51,7 @@ import scala.compiletime.uninitialized * @see ExtractAPI */ class ExtractDependencies extends Phase { - import ExtractDependencies._ + import ExtractDependencies.* override def phaseName: String = ExtractDependencies.name @@ -119,7 +119,7 @@ object ExtractDependencies { * inheritance" in the "Name hashing algorithm" section. */ private class ExtractDependenciesCollector(rec: DependencyRecorder) extends tpd.TreeTraverser { thisTreeTraverser => - import tpd._ + import tpd.* private def addMemberRefDependency(sym: Symbol)(using Context): Unit = if (!ignoreDependency(sym)) { diff --git a/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala b/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala index cacb10cf98bc..61baebbe9517 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ShowAPI.scala @@ -11,7 +11,7 @@ package sbt import scala.language.unsafeNulls -import xsbti.api._ +import xsbti.api.* 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..784b23cfc78c 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/ConstantOps.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/ConstantOps.scala @@ -5,7 +5,7 @@ package semanticdb import dotty.tools.dotc.{semanticdb => 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/ExtractSemanticDB.scala b/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala index 07f3fcea2e88..75805d4aed17 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala @@ -4,24 +4,24 @@ package semanticdb import scala.language.unsafeNulls -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 -import transform.SymUtils._ +import transform.SymUtils.* import scala.collection.mutable import scala.annotation.{ threadUnsafe => tu, tailrec } -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.PartialFunction.condOpt import typer.ImportInfo.withRootImports diff --git a/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala b/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala index b53ee787f501..fdf159836878 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala @@ -4,7 +4,7 @@ import dotty.tools.dotc.{semanticdb => s} import scala.collection.mutable import dotty.tools.dotc.semanticdb.Scala3.given -import SymbolInformation.Kind._ +import SymbolInformation.Kind.* import dotty.tools.dotc.util.SourceFile class SymbolInformationPrinter (symtab: PrinterSymtab): val notes = InfoNotes() diff --git a/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala b/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala index f1302330bd8b..f49b00089712 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala @@ -2,11 +2,11 @@ package dotty.tools.dotc.semanticdb import dotty.tools.dotc.core 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} @@ -20,8 +20,8 @@ import scala.annotation.internal.sharable import scala.annotation.switch object Scala3: - import Symbols._ - import core.NameOps._ + import Symbols.* + import core.NameOps.* @sharable private val unicodeEscape = raw"\$$u(\p{XDigit}{4})".r @sharable private val locals = raw"local(\d+)".r diff --git a/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala b/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala index 0b92ebddb02c..6376fb86d6c5 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package semanticdb -import core._ -import Contexts._ -import Symbols._ -import Flags._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* import Names.Name import scala.annotation.tailrec diff --git a/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala b/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala index b2f26e3e992f..af38315a857e 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala @@ -1,8 +1,8 @@ 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.StdNames.nme import dotty.tools.dotc.core.NameKinds import dotty.tools.dotc.{semanticdb => s} diff --git a/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala b/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala index 6c6e69f12578..ea95e34a57b9 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/Tools.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc.semanticdb -import java.nio.file._ +import java.nio.file.* import java.nio.charset.StandardCharsets -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import dotty.tools.dotc.util.SourceFile import dotty.tools.dotc.semanticdb.Scala3.given @@ -92,7 +92,7 @@ object Tools: end metac private def schemaString(schema: Schema) = - import Schema._ + import Schema.* schema match case SEMANTICDB3 => "SemanticDB v3" case SEMANTICDB4 => "SemanticDB v4" @@ -101,7 +101,7 @@ object Tools: end schemaString private def languageString(language: Language) = - import Language._ + import Language.* language match case SCALA => "Scala" case JAVA => "Java" diff --git a/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala b/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala index b0d032c7d83b..4293ecd6ca43 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala @@ -2,9 +2,9 @@ package dotty.tools package dotc package semanticdb -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 @@ -18,7 +18,7 @@ import Scala3.{FakeSymbol, SemanticSymbol, WildcardTypeSymbol, TypeParamRefSymbo import dotty.tools.dotc.core.Names.Designator class TypeOps: - import SymbolScopeOps._ + import SymbolScopeOps.* import Scala3.given private val paramRefSymtab = mutable.Map[(LambdaType, Name), Symbol]() private val refinementSymtab = mutable.Map[(RefinedType, Name), Symbol]() @@ -245,7 +245,7 @@ class TypeOps: loop(tpe) def toSemanticType(sym: Symbol)(using LinkMode, SemanticSymbolBuilder, Context): s.Type = - import ConstantOps._ + import ConstantOps.* def loop(tpe: Type): s.Type = tpe match { case t if t.isFromJavaObject => loop(defn.AnyType) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala index c646e67b69ad..2d2621c34390 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 sealed trait Access extends SemanticdbGeneratedSealedOneof derives CanEqual { @@ -18,10 +18,10 @@ sealed trait Access extends SemanticdbGeneratedSealedOneof derives CanEqual { object Access { case object Empty extends dotty.tools.dotc.semanticdb.Access - + sealed trait NonEmpty extends dotty.tools.dotc.semanticdb.Access def defaultInstance: dotty.tools.dotc.semanticdb.Access = Empty - + implicit val AccessTypeMapper: SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.AccessMessage, dotty.tools.dotc.semanticdb.Access] = new SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.AccessMessage, dotty.tools.dotc.semanticdb.Access] { override def toCustom(__base: dotty.tools.dotc.semanticdb.AccessMessage): dotty.tools.dotc.semanticdb.Access = __base.sealedValue match { case __v: dotty.tools.dotc.semanticdb.AccessMessage.SealedValue.PrivateAccess => __v.value @@ -90,7 +90,7 @@ final case class AccessMessage( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { sealedValue.privateAccess.foreach { __v => @@ -152,10 +152,10 @@ final case class AccessMessage( def withPublicAccess(__v: dotty.tools.dotc.semanticdb.PublicAccess): AccessMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.AccessMessage.SealedValue.PublicAccess(__v)) def clearSealedValue: AccessMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.AccessMessage.SealedValue.Empty) def withSealedValue(__v: dotty.tools.dotc.semanticdb.AccessMessage.SealedValue): AccessMessage = copy(sealedValue = __v) - - - - + + + + def toAccess: dotty.tools.dotc.semanticdb.Access = dotty.tools.dotc.semanticdb.Access.AccessTypeMapper.toCustom(this) // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Access]) } @@ -190,12 +190,12 @@ object AccessMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools.do sealedValue = __sealedValue ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.AccessMessage( sealedValue = dotty.tools.dotc.semanticdb.AccessMessage.SealedValue.Empty ) @@ -226,7 +226,7 @@ object AccessMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools.do override def number: _root_.scala.Int = 0 override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") } - + @SerialVersionUID(0L) final case class PrivateAccess(value: dotty.tools.dotc.semanticdb.PrivateAccess) extends dotty.tools.dotc.semanticdb.AccessMessage.SealedValue derives CanEqual { type ValueType = dotty.tools.dotc.semanticdb.PrivateAccess @@ -298,10 +298,10 @@ final case class PrivateAccess( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.PrivateAccess]) } @@ -319,12 +319,12 @@ object PrivateAccess extends SemanticdbGeneratedMessageCompanion[dotty.tools.do dotty.tools.dotc.semanticdb.PrivateAccess( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.PrivateAccess( ) def of( @@ -339,10 +339,10 @@ final case class PrivateThisAccess( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.PrivateThisAccess]) } @@ -360,12 +360,12 @@ object PrivateThisAccess extends SemanticdbGeneratedMessageCompanion[dotty.tool dotty.tools.dotc.semanticdb.PrivateThisAccess( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.PrivateThisAccess( ) def of( @@ -382,7 +382,7 @@ final case class PrivateWithinAccess( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = symbol if (!__value.isEmpty) { @@ -398,7 +398,7 @@ final case class PrivateWithinAccess( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -409,10 +409,10 @@ final case class PrivateWithinAccess( }; } def withSymbol(__v: _root_.scala.Predef.String): PrivateWithinAccess = copy(symbol = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.PrivateWithinAccess]) } @@ -434,12 +434,12 @@ object PrivateWithinAccess extends SemanticdbGeneratedMessageCompanion[dotty.to symbol = __symbol ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.PrivateWithinAccess( symbol = "" ) @@ -458,10 +458,10 @@ final case class ProtectedAccess( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ProtectedAccess]) } @@ -479,12 +479,12 @@ object ProtectedAccess extends SemanticdbGeneratedMessageCompanion[dotty.tools. dotty.tools.dotc.semanticdb.ProtectedAccess( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ProtectedAccess( ) def of( @@ -499,10 +499,10 @@ final case class ProtectedThisAccess( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ProtectedThisAccess]) } @@ -520,12 +520,12 @@ object ProtectedThisAccess extends SemanticdbGeneratedMessageCompanion[dotty.to dotty.tools.dotc.semanticdb.ProtectedThisAccess( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ProtectedThisAccess( ) def of( @@ -542,7 +542,7 @@ final case class ProtectedWithinAccess( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = symbol if (!__value.isEmpty) { @@ -558,7 +558,7 @@ final case class ProtectedWithinAccess( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -569,10 +569,10 @@ final case class ProtectedWithinAccess( }; } def withSymbol(__v: _root_.scala.Predef.String): ProtectedWithinAccess = copy(symbol = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ProtectedWithinAccess]) } @@ -594,12 +594,12 @@ object ProtectedWithinAccess extends SemanticdbGeneratedMessageCompanion[dotty. symbol = __symbol ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ProtectedWithinAccess( symbol = "" ) @@ -618,10 +618,10 @@ final case class PublicAccess( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.PublicAccess]) } @@ -639,12 +639,12 @@ object PublicAccess extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot dotty.tools.dotc.semanticdb.PublicAccess( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.PublicAccess( ) def of( diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala index 2cb478d89e2d..a4f076585a50 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 @SerialVersionUID(0L) @@ -16,7 +16,7 @@ final case class Annotation( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.Annotation._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -32,7 +32,7 @@ final case class Annotation( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -45,10 +45,10 @@ final case class Annotation( }; } def withTpe(__v: dotty.tools.dotc.semanticdb.Type): Annotation = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Annotation]) } @@ -70,12 +70,12 @@ object Annotation extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. tpe = dotty.tools.dotc.semanticdb.Annotation._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Annotation( tpe = dotty.tools.dotc.semanticdb.Annotation._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) ) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala index 0ca96d9ae8c6..91bbaa75e654 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 sealed trait Constant extends SemanticdbGeneratedSealedOneof derives CanEqual { @@ -18,10 +18,10 @@ sealed trait Constant extends SemanticdbGeneratedSealedOneof derives CanEqual object Constant { case object Empty extends dotty.tools.dotc.semanticdb.Constant - + sealed trait NonEmpty extends dotty.tools.dotc.semanticdb.Constant def defaultInstance: dotty.tools.dotc.semanticdb.Constant = Empty - + implicit val ConstantTypeMapper: SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.ConstantMessage, dotty.tools.dotc.semanticdb.Constant] = new SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.ConstantMessage, dotty.tools.dotc.semanticdb.Constant] { override def toCustom(__base: dotty.tools.dotc.semanticdb.ConstantMessage): dotty.tools.dotc.semanticdb.Constant = __base.sealedValue match { case __v: dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue.UnitConstant => __v.value @@ -114,7 +114,7 @@ final case class ConstantMessage( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { sealedValue.unitConstant.foreach { __v => @@ -208,10 +208,10 @@ final case class ConstantMessage( def withNullConstant(__v: dotty.tools.dotc.semanticdb.NullConstant): ConstantMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue.NullConstant(__v)) def clearSealedValue: ConstantMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue.Empty) def withSealedValue(__v: dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue): ConstantMessage = copy(sealedValue = __v) - - - - + + + + def toConstant: dotty.tools.dotc.semanticdb.Constant = dotty.tools.dotc.semanticdb.Constant.ConstantTypeMapper.toCustom(this) // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Constant]) } @@ -254,12 +254,12 @@ object ConstantMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools. sealedValue = __sealedValue ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ConstantMessage( sealedValue = dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue.Empty ) @@ -298,7 +298,7 @@ object ConstantMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools. override def number: _root_.scala.Int = 0 override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") } - + @SerialVersionUID(0L) final case class UnitConstant(value: dotty.tools.dotc.semanticdb.UnitConstant) extends dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue derives CanEqual { type ValueType = dotty.tools.dotc.semanticdb.UnitConstant @@ -402,10 +402,10 @@ final case class UnitConstant( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.UnitConstant]) } @@ -423,12 +423,12 @@ object UnitConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot dotty.tools.dotc.semanticdb.UnitConstant( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.UnitConstant( ) def of( @@ -445,7 +445,7 @@ final case class BooleanConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != false) { @@ -461,7 +461,7 @@ final case class BooleanConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -472,10 +472,10 @@ final case class BooleanConstant( }; } def withValue(__v: _root_.scala.Boolean): BooleanConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.BooleanConstant]) } @@ -497,12 +497,12 @@ object BooleanConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools. value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.BooleanConstant( value = false ) @@ -523,7 +523,7 @@ final case class ByteConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0) { @@ -539,7 +539,7 @@ final case class ByteConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -550,10 +550,10 @@ final case class ByteConstant( }; } def withValue(__v: _root_.scala.Int): ByteConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ByteConstant]) } @@ -575,12 +575,12 @@ object ByteConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ByteConstant( value = 0 ) @@ -601,7 +601,7 @@ final case class ShortConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0) { @@ -617,7 +617,7 @@ final case class ShortConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -628,10 +628,10 @@ final case class ShortConstant( }; } def withValue(__v: _root_.scala.Int): ShortConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ShortConstant]) } @@ -653,12 +653,12 @@ object ShortConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.do value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ShortConstant( value = 0 ) @@ -679,7 +679,7 @@ final case class CharConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0) { @@ -695,7 +695,7 @@ final case class CharConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -706,10 +706,10 @@ final case class CharConstant( }; } def withValue(__v: _root_.scala.Int): CharConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.CharConstant]) } @@ -731,12 +731,12 @@ object CharConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.CharConstant( value = 0 ) @@ -757,7 +757,7 @@ final case class IntConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0) { @@ -773,7 +773,7 @@ final case class IntConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -784,10 +784,10 @@ final case class IntConstant( }; } def withValue(__v: _root_.scala.Int): IntConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.IntConstant]) } @@ -809,12 +809,12 @@ object IntConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.IntConstant( value = 0 ) @@ -835,7 +835,7 @@ final case class LongConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0L) { @@ -851,7 +851,7 @@ final case class LongConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -862,10 +862,10 @@ final case class LongConstant( }; } def withValue(__v: _root_.scala.Long): LongConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.LongConstant]) } @@ -887,12 +887,12 @@ object LongConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.LongConstant( value = 0L ) @@ -913,7 +913,7 @@ final case class FloatConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0.0f) { @@ -929,7 +929,7 @@ final case class FloatConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -940,10 +940,10 @@ final case class FloatConstant( }; } def withValue(__v: _root_.scala.Float): FloatConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.FloatConstant]) } @@ -965,12 +965,12 @@ object FloatConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.do value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.FloatConstant( value = 0.0f ) @@ -991,7 +991,7 @@ final case class DoubleConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (__value != 0.0) { @@ -1007,7 +1007,7 @@ final case class DoubleConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1018,10 +1018,10 @@ final case class DoubleConstant( }; } def withValue(__v: _root_.scala.Double): DoubleConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.DoubleConstant]) } @@ -1043,12 +1043,12 @@ object DoubleConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.d value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.DoubleConstant( value = 0.0 ) @@ -1069,7 +1069,7 @@ final case class StringConstant( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = value if (!__value.isEmpty) { @@ -1085,7 +1085,7 @@ final case class StringConstant( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1096,10 +1096,10 @@ final case class StringConstant( }; } def withValue(__v: _root_.scala.Predef.String): StringConstant = copy(value = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.StringConstant]) } @@ -1121,12 +1121,12 @@ object StringConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.d value = __value ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.StringConstant( value = "" ) @@ -1145,10 +1145,10 @@ final case class NullConstant( final override def serializedSize: _root_.scala.Int = 0 def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { } - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.NullConstant]) } @@ -1166,12 +1166,12 @@ object NullConstant extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot dotty.tools.dotc.semanticdb.NullConstant( ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.NullConstant( ) def of( diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala index cc8aa82bf8ea..5917ab82f59f 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 @SerialVersionUID(0L) @@ -22,14 +22,14 @@ final case class Diagnostic( val __value = range.get __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize }; - + { val __value = severity.value if (__value != 0) { __size += SemanticdbOutputStream.computeEnumSize(2, __value) } }; - + { val __value = message if (!__value.isEmpty) { @@ -45,7 +45,7 @@ final case class Diagnostic( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { range.foreach { __v => @@ -72,10 +72,10 @@ final case class Diagnostic( def withRange(__v: dotty.tools.dotc.semanticdb.Range): Diagnostic = copy(range = Option(__v)) def withSeverity(__v: dotty.tools.dotc.semanticdb.Diagnostic.Severity): Diagnostic = copy(severity = __v) def withMessage(__v: _root_.scala.Predef.String): Diagnostic = copy(message = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Diagnostic]) } @@ -105,12 +105,12 @@ object Diagnostic extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. message = __message ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Diagnostic( range = _root_.scala.None, severity = dotty.tools.dotc.semanticdb.Diagnostic.Severity.UNKNOWN_SEVERITY, @@ -123,49 +123,49 @@ object Diagnostic extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. def isWarning: _root_.scala.Boolean = false def isInformation: _root_.scala.Boolean = false def isHint: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.Diagnostic.Severity.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.Diagnostic.Severity.Recognized]) } - + object Severity { sealed trait Recognized extends Severity - - + + @SerialVersionUID(0L) case object UNKNOWN_SEVERITY extends Severity(0) with Severity.Recognized { val index = 0 val name = "UNKNOWN_SEVERITY" override def isUnknownSeverity: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object ERROR extends Severity(1) with Severity.Recognized { val index = 1 val name = "ERROR" override def isError: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object WARNING extends Severity(2) with Severity.Recognized { val index = 2 val name = "WARNING" override def isWarning: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object INFORMATION extends Severity(3) with Severity.Recognized { val index = 3 val name = "INFORMATION" override def isInformation: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object HINT extends Severity(4) with Severity.Recognized { val index = 4 val name = "HINT" override def isHint: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Severity(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(UNKNOWN_SEVERITY, ERROR, WARNING, INFORMATION, HINT) @@ -177,8 +177,8 @@ object Diagnostic extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. case 4 => HINT case __other => Unrecognized(__other) } - - + + } final val RANGE_FIELD_NUMBER = 1 final val SEVERITY_FIELD_NUMBER = 2 diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala index 07fbda4991af..695dea973016 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 @SerialVersionUID(0L) @@ -17,14 +17,14 @@ final case class Documentation( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = message if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(1, __value) } }; - + { val __value = format.value if (__value != 0) { @@ -40,7 +40,7 @@ final case class Documentation( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -58,10 +58,10 @@ final case class Documentation( } def withMessage(__v: _root_.scala.Predef.String): Documentation = copy(message = __v) def withFormat(__v: dotty.tools.dotc.semanticdb.Documentation.Format): Documentation = copy(format = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Documentation]) } @@ -87,12 +87,12 @@ object Documentation extends SemanticdbGeneratedMessageCompanion[dotty.tools.do format = __format ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Documentation( message = "", format = dotty.tools.dotc.semanticdb.Documentation.Format.HTML @@ -104,49 +104,49 @@ object Documentation extends SemanticdbGeneratedMessageCompanion[dotty.tools.do def isJavadoc: _root_.scala.Boolean = false def isScaladoc: _root_.scala.Boolean = false def isKdoc: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.Documentation.Format.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.Documentation.Format.Recognized]) } - + object Format { sealed trait Recognized extends Format - - + + @SerialVersionUID(0L) case object HTML extends Format(0) with Format.Recognized { val index = 0 val name = "HTML" override def isHtml: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object MARKDOWN extends Format(1) with Format.Recognized { val index = 1 val name = "MARKDOWN" override def isMarkdown: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object JAVADOC extends Format(2) with Format.Recognized { val index = 2 val name = "JAVADOC" override def isJavadoc: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object SCALADOC extends Format(3) with Format.Recognized { val index = 3 val name = "SCALADOC" override def isScaladoc: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object KDOC extends Format(4) with Format.Recognized { val index = 4 val name = "KDOC" override def isKdoc: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Format(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(HTML, MARKDOWN, JAVADOC, SCALADOC, KDOC) @@ -158,8 +158,8 @@ object Documentation extends SemanticdbGeneratedMessageCompanion[dotty.tools.do case 4 => KDOC case __other => Unrecognized(__other) } - - + + } final val MESSAGE_FIELD_NUMBER = 1 final val FORMAT_FIELD_NUMBER = 2 diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala index c57a3d3cddc3..ef47e9020361 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 sealed abstract class Language(val value: _root_.scala.Int) extends SemanticdbGeneratedEnum derives CanEqual { @@ -13,35 +13,35 @@ sealed abstract class Language(val value: _root_.scala.Int) extends SemanticdbG def isUnknownLanguage: _root_.scala.Boolean = false def isScala: _root_.scala.Boolean = false def isJava: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.Language.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.Language.Recognized]) } object Language { sealed trait Recognized extends Language - - + + @SerialVersionUID(0L) case object UNKNOWN_LANGUAGE extends Language(0) with Language.Recognized { val index = 0 val name = "UNKNOWN_LANGUAGE" override def isUnknownLanguage: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object SCALA extends Language(1) with Language.Recognized { val index = 1 val name = "SCALA" override def isScala: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object JAVA extends Language(2) with Language.Recognized { val index = 2 val name = "JAVA" override def isJava: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Language(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(UNKNOWN_LANGUAGE, SCALA, JAVA) @@ -51,6 +51,6 @@ object Language { case 2 => JAVA case __other => Unrecognized(__other) } - - + + } \ No newline at end of file diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala index a3667e944ae4..756b7711d304 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 @SerialVersionUID(0L) @@ -17,7 +17,7 @@ final case class Location( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = uri if (!__value.isEmpty) { @@ -37,7 +37,7 @@ final case class Location( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -57,10 +57,10 @@ final case class Location( def getRange: dotty.tools.dotc.semanticdb.Range = range.getOrElse(dotty.tools.dotc.semanticdb.Range.defaultInstance) def clearRange: Location = copy(range = _root_.scala.None) def withRange(__v: dotty.tools.dotc.semanticdb.Range): Location = copy(range = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Location]) } @@ -86,12 +86,12 @@ object Location extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.se range = __range ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Location( uri = "", range = _root_.scala.None diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala index d273664bdf6a..0f7436524ee1 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 @SerialVersionUID(0L) @@ -19,28 +19,28 @@ final case class Range( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = startLine if (__value != 0) { __size += SemanticdbOutputStream.computeInt32Size(1, __value) } }; - + { val __value = startCharacter if (__value != 0) { __size += SemanticdbOutputStream.computeInt32Size(2, __value) } }; - + { val __value = endLine if (__value != 0) { __size += SemanticdbOutputStream.computeInt32Size(3, __value) } }; - + { val __value = endCharacter if (__value != 0) { @@ -56,7 +56,7 @@ final case class Range( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -88,10 +88,10 @@ final case class Range( def withStartCharacter(__v: _root_.scala.Int): Range = copy(startCharacter = __v) def withEndLine(__v: _root_.scala.Int): Range = copy(endLine = __v) def withEndCharacter(__v: _root_.scala.Int): Range = copy(endCharacter = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Range]) } @@ -125,12 +125,12 @@ object Range extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.seman endCharacter = __endCharacter ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Range( startLine = 0, startCharacter = 0, diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Schema.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Schema.scala index 841e69166feb..c9239c85f409 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 sealed abstract class Schema(val value: _root_.scala.Int) extends SemanticdbGeneratedEnum derives CanEqual { @@ -13,35 +13,35 @@ sealed abstract class Schema(val value: _root_.scala.Int) extends SemanticdbGen def isLegacy: _root_.scala.Boolean = false def isSemanticdb3: _root_.scala.Boolean = false def isSemanticdb4: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.Schema.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.Schema.Recognized]) } object Schema { sealed trait Recognized extends Schema - - + + @SerialVersionUID(0L) case object LEGACY extends Schema(0) with Schema.Recognized { val index = 0 val name = "LEGACY" override def isLegacy: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object SEMANTICDB3 extends Schema(3) with Schema.Recognized { val index = 1 val name = "SEMANTICDB3" override def isSemanticdb3: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object SEMANTICDB4 extends Schema(4) with Schema.Recognized { val index = 2 val name = "SEMANTICDB4" override def isSemanticdb4: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Schema(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(LEGACY, SEMANTICDB3, SEMANTICDB4) @@ -51,6 +51,6 @@ object Schema { case 4 => SEMANTICDB4 case __other => Unrecognized(__other) } - - + + } \ No newline at end of file diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala index 655ebe75185e..7a2ee40478c4 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 @SerialVersionUID(0L) @@ -34,7 +34,7 @@ final case class Scope( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { symlinks.foreach { __v => @@ -56,10 +56,10 @@ final case class Scope( def addHardlinks(__vs: dotty.tools.dotc.semanticdb.SymbolInformation *): Scope = addAllHardlinks(__vs) def addAllHardlinks(__vs: Iterable[dotty.tools.dotc.semanticdb.SymbolInformation]): Scope = copy(hardlinks = hardlinks ++ __vs) def withHardlinks(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.SymbolInformation]): Scope = copy(hardlinks = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Scope]) } @@ -85,12 +85,12 @@ object Scope extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.seman hardlinks = __hardlinks.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Scope( symlinks = _root_.scala.Seq.empty, hardlinks = _root_.scala.Seq.empty diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala index 228e2f02349b..7a0331be0ed3 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 sealed trait Signature extends SemanticdbGeneratedSealedOneof derives CanEqual { @@ -18,10 +18,10 @@ sealed trait Signature extends SemanticdbGeneratedSealedOneof derives CanEqual object Signature { case object Empty extends dotty.tools.dotc.semanticdb.Signature - + sealed trait NonEmpty extends dotty.tools.dotc.semanticdb.Signature def defaultInstance: dotty.tools.dotc.semanticdb.Signature = Empty - + implicit val SignatureTypeMapper: SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.SignatureMessage, dotty.tools.dotc.semanticdb.Signature] = new SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.SignatureMessage, dotty.tools.dotc.semanticdb.Signature] { override def toCustom(__base: dotty.tools.dotc.semanticdb.SignatureMessage): dotty.tools.dotc.semanticdb.Signature = __base.sealedValue match { case __v: dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue.ClassSignature => __v.value @@ -72,7 +72,7 @@ final case class SignatureMessage( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { sealedValue.classSignature.foreach { __v => @@ -110,10 +110,10 @@ final case class SignatureMessage( def withValueSignature(__v: dotty.tools.dotc.semanticdb.ValueSignature): SignatureMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue.ValueSignature(__v)) def clearSealedValue: SignatureMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue.Empty) def withSealedValue(__v: dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue): SignatureMessage = copy(sealedValue = __v) - - - - + + + + def toSignature: dotty.tools.dotc.semanticdb.Signature = dotty.tools.dotc.semanticdb.Signature.SignatureTypeMapper.toCustom(this) // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Signature]) } @@ -142,12 +142,12 @@ object SignatureMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools sealedValue = __sealedValue ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.SignatureMessage( sealedValue = dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue.Empty ) @@ -172,7 +172,7 @@ object SignatureMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools override def number: _root_.scala.Int = 0 override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") } - + @SerialVersionUID(0L) final case class ClassSignature(value: dotty.tools.dotc.semanticdb.ClassSignature) extends dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue derives CanEqual { type ValueType = dotty.tools.dotc.semanticdb.ClassSignature @@ -233,7 +233,7 @@ final case class ClassSignature( val __value = dotty.tools.dotc.semanticdb.ClassSignature._typemapper_parents.toBase(__item) __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } - + { val __value = dotty.tools.dotc.semanticdb.ClassSignature._typemapper_self.toBase(self) if (__value.serializedSize != 0) { @@ -253,7 +253,7 @@ final case class ClassSignature( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { typeParameters.foreach { __v => @@ -294,10 +294,10 @@ final case class ClassSignature( def getDeclarations: dotty.tools.dotc.semanticdb.Scope = declarations.getOrElse(dotty.tools.dotc.semanticdb.Scope.defaultInstance) def clearDeclarations: ClassSignature = copy(declarations = _root_.scala.None) def withDeclarations(__v: dotty.tools.dotc.semanticdb.Scope): ClassSignature = copy(declarations = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ClassSignature]) } @@ -331,12 +331,12 @@ object ClassSignature extends SemanticdbGeneratedMessageCompanion[dotty.tools.d declarations = __declarations ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ClassSignature( typeParameters = _root_.scala.None, parents = _root_.scala.Seq.empty, @@ -383,7 +383,7 @@ final case class MethodSignature( val __value = __item __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } - + { val __value = dotty.tools.dotc.semanticdb.MethodSignature._typemapper_returnType.toBase(returnType) if (__value.serializedSize != 0) { @@ -399,7 +399,7 @@ final case class MethodSignature( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { typeParameters.foreach { __v => @@ -431,10 +431,10 @@ final case class MethodSignature( def addAllParameterLists(__vs: Iterable[dotty.tools.dotc.semanticdb.Scope]): MethodSignature = copy(parameterLists = parameterLists ++ __vs) def withParameterLists(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Scope]): MethodSignature = copy(parameterLists = __v) def withReturnType(__v: dotty.tools.dotc.semanticdb.Type): MethodSignature = copy(returnType = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.MethodSignature]) } @@ -464,12 +464,12 @@ object MethodSignature extends SemanticdbGeneratedMessageCompanion[dotty.tools. returnType = dotty.tools.dotc.semanticdb.MethodSignature._typemapper_returnType.toCustom(__returnType.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.MethodSignature( typeParameters = _root_.scala.None, parameterLists = _root_.scala.Seq.empty, @@ -506,14 +506,14 @@ final case class TypeSignature( val __value = typeParameters.get __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize }; - + { val __value = dotty.tools.dotc.semanticdb.TypeSignature._typemapper_lowerBound.toBase(lowerBound) if (__value.serializedSize != 0) { __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } }; - + { val __value = dotty.tools.dotc.semanticdb.TypeSignature._typemapper_upperBound.toBase(upperBound) if (__value.serializedSize != 0) { @@ -529,7 +529,7 @@ final case class TypeSignature( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { typeParameters.foreach { __v => @@ -560,10 +560,10 @@ final case class TypeSignature( def withTypeParameters(__v: dotty.tools.dotc.semanticdb.Scope): TypeSignature = copy(typeParameters = Option(__v)) def withLowerBound(__v: dotty.tools.dotc.semanticdb.Type): TypeSignature = copy(lowerBound = __v) def withUpperBound(__v: dotty.tools.dotc.semanticdb.Type): TypeSignature = copy(upperBound = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.TypeSignature]) } @@ -593,12 +593,12 @@ object TypeSignature extends SemanticdbGeneratedMessageCompanion[dotty.tools.do upperBound = dotty.tools.dotc.semanticdb.TypeSignature._typemapper_upperBound.toCustom(__upperBound.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TypeSignature( typeParameters = _root_.scala.None, lowerBound = dotty.tools.dotc.semanticdb.TypeSignature._typemapper_lowerBound.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), @@ -631,7 +631,7 @@ final case class ValueSignature( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.ValueSignature._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -647,7 +647,7 @@ final case class ValueSignature( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -660,10 +660,10 @@ final case class ValueSignature( }; } def withTpe(__v: dotty.tools.dotc.semanticdb.Type): ValueSignature = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ValueSignature]) } @@ -685,12 +685,12 @@ object ValueSignature extends SemanticdbGeneratedMessageCompanion[dotty.tools.d tpe = dotty.tools.dotc.semanticdb.ValueSignature._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ValueSignature( tpe = dotty.tools.dotc.semanticdb.ValueSignature._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) ) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala index 93fbb207c4f6..92917cb23a41 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 @SerialVersionUID(0L) @@ -25,42 +25,42 @@ final case class SymbolInformation( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = symbol if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(1, __value) } }; - + { val __value = language.value if (__value != 0) { __size += SemanticdbOutputStream.computeEnumSize(16, __value) } }; - + { val __value = kind.value if (__value != 0) { __size += SemanticdbOutputStream.computeEnumSize(3, __value) } }; - + { val __value = properties if (__value != 0) { __size += SemanticdbOutputStream.computeInt32Size(4, __value) } }; - + { val __value = displayName if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(5, __value) } }; - + { val __value = dotty.tools.dotc.semanticdb.SymbolInformation._typemapper_signature.toBase(signature) if (__value.serializedSize != 0) { @@ -71,7 +71,7 @@ final case class SymbolInformation( val __value = __item __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } - + { val __value = dotty.tools.dotc.semanticdb.SymbolInformation._typemapper_access.toBase(access) if (__value.serializedSize != 0) { @@ -95,7 +95,7 @@ final case class SymbolInformation( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -179,10 +179,10 @@ final case class SymbolInformation( def getDocumentation: dotty.tools.dotc.semanticdb.Documentation = documentation.getOrElse(dotty.tools.dotc.semanticdb.Documentation.defaultInstance) def clearDocumentation: SymbolInformation = copy(documentation = _root_.scala.None) def withDocumentation(__v: dotty.tools.dotc.semanticdb.Documentation): SymbolInformation = copy(documentation = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.SymbolInformation]) } @@ -240,12 +240,12 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool documentation = __documentation ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.SymbolInformation( symbol = "", language = dotty.tools.dotc.semanticdb.Language.UNKNOWN_LANGUAGE, @@ -276,126 +276,126 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool def isClass: _root_.scala.Boolean = false def isTrait: _root_.scala.Boolean = false def isInterface: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.SymbolInformation.Kind.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.SymbolInformation.Kind.Recognized]) } - + object Kind { sealed trait Recognized extends Kind - - + + @SerialVersionUID(0L) case object UNKNOWN_KIND extends Kind(0) with Kind.Recognized { val index = 0 val name = "UNKNOWN_KIND" override def isUnknownKind: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object LOCAL extends Kind(19) with Kind.Recognized { val index = 1 val name = "LOCAL" override def isLocal: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object FIELD extends Kind(20) with Kind.Recognized { val index = 2 val name = "FIELD" override def isField: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object METHOD extends Kind(3) with Kind.Recognized { val index = 3 val name = "METHOD" override def isMethod: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object CONSTRUCTOR extends Kind(21) with Kind.Recognized { val index = 4 val name = "CONSTRUCTOR" override def isConstructor: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object MACRO extends Kind(6) with Kind.Recognized { val index = 5 val name = "MACRO" override def isMacro: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object TYPE extends Kind(7) with Kind.Recognized { val index = 6 val name = "TYPE" override def isType: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object PARAMETER extends Kind(8) with Kind.Recognized { val index = 7 val name = "PARAMETER" override def isParameter: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object SELF_PARAMETER extends Kind(17) with Kind.Recognized { val index = 8 val name = "SELF_PARAMETER" override def isSelfParameter: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object TYPE_PARAMETER extends Kind(9) with Kind.Recognized { val index = 9 val name = "TYPE_PARAMETER" override def isTypeParameter: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object OBJECT extends Kind(10) with Kind.Recognized { val index = 10 val name = "OBJECT" override def isObject: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object PACKAGE extends Kind(11) with Kind.Recognized { val index = 11 val name = "PACKAGE" override def isPackage: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object PACKAGE_OBJECT extends Kind(12) with Kind.Recognized { val index = 12 val name = "PACKAGE_OBJECT" override def isPackageObject: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object CLASS extends Kind(13) with Kind.Recognized { val index = 13 val name = "CLASS" override def isClass: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object TRAIT extends Kind(14) with Kind.Recognized { val index = 14 val name = "TRAIT" override def isTrait: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object INTERFACE extends Kind(18) with Kind.Recognized { val index = 15 val name = "INTERFACE" override def isInterface: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Kind(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(UNKNOWN_KIND, LOCAL, FIELD, METHOD, CONSTRUCTOR, MACRO, TYPE, PARAMETER, SELF_PARAMETER, TYPE_PARAMETER, OBJECT, PACKAGE, PACKAGE_OBJECT, CLASS, TRAIT, INTERFACE) @@ -418,8 +418,8 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool case 21 => CONSTRUCTOR case __other => Unrecognized(__other) } - - + + } sealed abstract class Property(val value: _root_.scala.Int) extends SemanticdbGeneratedEnum derives CanEqual { type EnumType = Property @@ -444,161 +444,161 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool def isTransparent: _root_.scala.Boolean = false def isInfix: _root_.scala.Boolean = false def isOpaque: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.SymbolInformation.Property.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.SymbolInformation.Property.Recognized]) } - + object Property { sealed trait Recognized extends Property - - + + @SerialVersionUID(0L) case object UNKNOWN_PROPERTY extends Property(0) with Property.Recognized { val index = 0 val name = "UNKNOWN_PROPERTY" override def isUnknownProperty: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object ABSTRACT extends Property(4) with Property.Recognized { val index = 1 val name = "ABSTRACT" override def isAbstract: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object FINAL extends Property(8) with Property.Recognized { val index = 2 val name = "FINAL" override def isFinal: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object SEALED extends Property(16) with Property.Recognized { val index = 3 val name = "SEALED" override def isSealed: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object IMPLICIT extends Property(32) with Property.Recognized { val index = 4 val name = "IMPLICIT" override def isImplicit: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object LAZY extends Property(64) with Property.Recognized { val index = 5 val name = "LAZY" override def isLazy: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object CASE extends Property(128) with Property.Recognized { val index = 6 val name = "CASE" override def isCase: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object COVARIANT extends Property(256) with Property.Recognized { val index = 7 val name = "COVARIANT" override def isCovariant: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object CONTRAVARIANT extends Property(512) with Property.Recognized { val index = 8 val name = "CONTRAVARIANT" override def isContravariant: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object VAL extends Property(1024) with Property.Recognized { val index = 9 val name = "VAL" override def isVal: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object VAR extends Property(2048) with Property.Recognized { val index = 10 val name = "VAR" override def isVar: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object STATIC extends Property(4096) with Property.Recognized { val index = 11 val name = "STATIC" override def isStatic: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object PRIMARY extends Property(8192) with Property.Recognized { val index = 12 val name = "PRIMARY" override def isPrimary: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object ENUM extends Property(16384) with Property.Recognized { val index = 13 val name = "ENUM" override def isEnum: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object DEFAULT extends Property(32768) with Property.Recognized { val index = 14 val name = "DEFAULT" override def isDefault: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object GIVEN extends Property(65536) with Property.Recognized { val index = 15 val name = "GIVEN" override def isGiven: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object INLINE extends Property(131072) with Property.Recognized { val index = 16 val name = "INLINE" override def isInline: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object OPEN extends Property(262144) with Property.Recognized { val index = 17 val name = "OPEN" override def isOpen: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object TRANSPARENT extends Property(524288) with Property.Recognized { val index = 18 val name = "TRANSPARENT" override def isTransparent: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object INFIX extends Property(1048576) with Property.Recognized { val index = 19 val name = "INFIX" override def isInfix: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object OPAQUE extends Property(2097152) with Property.Recognized { val index = 20 val name = "OPAQUE" override def isOpaque: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Property(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(UNKNOWN_PROPERTY, ABSTRACT, FINAL, SEALED, IMPLICIT, LAZY, CASE, COVARIANT, CONTRAVARIANT, VAL, VAR, STATIC, PRIMARY, ENUM, DEFAULT, GIVEN, INLINE, OPEN, TRANSPARENT, INFIX, OPAQUE) @@ -626,8 +626,8 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool case 2097152 => OPAQUE case __other => Unrecognized(__other) } - - + + } final val SYMBOL_FIELD_NUMBER = 1 final val LANGUAGE_FIELD_NUMBER = 16 diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala index 5d7670dfdd32..39a5228ed02d 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 @SerialVersionUID(0L) @@ -22,14 +22,14 @@ final case class SymbolOccurrence( val __value = range.get __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize }; - + { val __value = symbol if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(2, __value) } }; - + { val __value = role.value if (__value != 0) { @@ -45,7 +45,7 @@ final case class SymbolOccurrence( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { range.foreach { __v => @@ -72,10 +72,10 @@ final case class SymbolOccurrence( def withRange(__v: dotty.tools.dotc.semanticdb.Range): SymbolOccurrence = copy(range = Option(__v)) def withSymbol(__v: _root_.scala.Predef.String): SymbolOccurrence = copy(symbol = __v) def withRole(__v: dotty.tools.dotc.semanticdb.SymbolOccurrence.Role): SymbolOccurrence = copy(role = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.SymbolOccurrence]) } @@ -105,12 +105,12 @@ object SymbolOccurrence extends SemanticdbGeneratedMessageCompanion[dotty.tools role = __role ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.SymbolOccurrence( range = _root_.scala.None, symbol = "", @@ -121,35 +121,35 @@ object SymbolOccurrence extends SemanticdbGeneratedMessageCompanion[dotty.tools def isUnknownRole: _root_.scala.Boolean = false def isReference: _root_.scala.Boolean = false def isDefinition: _root_.scala.Boolean = false - + final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.SymbolOccurrence.Role.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.SymbolOccurrence.Role.Recognized]) } - + object Role { sealed trait Recognized extends Role - - + + @SerialVersionUID(0L) case object UNKNOWN_ROLE extends Role(0) with Role.Recognized { val index = 0 val name = "UNKNOWN_ROLE" override def isUnknownRole: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object REFERENCE extends Role(1) with Role.Recognized { val index = 1 val name = "REFERENCE" override def isReference: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) case object DEFINITION extends Role(2) with Role.Recognized { val index = 2 val name = "DEFINITION" override def isDefinition: _root_.scala.Boolean = true } - + @SerialVersionUID(0L) final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Role(unrecognizedValue) with SemanticdbUnrecognizedEnum lazy val values = scala.collection.immutable.Seq(UNKNOWN_ROLE, REFERENCE, DEFINITION) @@ -159,8 +159,8 @@ object SymbolOccurrence extends SemanticdbGeneratedMessageCompanion[dotty.tools case 2 => DEFINITION case __other => Unrecognized(__other) } - - + + } final val RANGE_FIELD_NUMBER = 1 final val SYMBOL_FIELD_NUMBER = 2 diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala index 3c6fcfbf4c6a..7916fdb2e07a 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 @SerialVersionUID(0L) @@ -21,7 +21,7 @@ final case class Synthetic( val __value = range.get __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize }; - + { val __value = dotty.tools.dotc.semanticdb.Synthetic._typemapper_tree.toBase(tree) if (__value.serializedSize != 0) { @@ -37,7 +37,7 @@ final case class Synthetic( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { range.foreach { __v => @@ -59,10 +59,10 @@ final case class Synthetic( def clearRange: Synthetic = copy(range = _root_.scala.None) def withRange(__v: dotty.tools.dotc.semanticdb.Range): Synthetic = copy(range = Option(__v)) def withTree(__v: dotty.tools.dotc.semanticdb.Tree): Synthetic = copy(tree = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Synthetic]) } @@ -88,12 +88,12 @@ object Synthetic extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s tree = dotty.tools.dotc.semanticdb.Synthetic._typemapper_tree.toCustom(__tree.getOrElse(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.Synthetic( range = _root_.scala.None, tree = dotty.tools.dotc.semanticdb.Synthetic._typemapper_tree.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala index f0347e86d9e3..80322ec45e0e 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 @SerialVersionUID(0L) @@ -24,35 +24,35 @@ final case class TextDocument( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = schema.value if (__value != 0) { __size += SemanticdbOutputStream.computeEnumSize(1, __value) } }; - + { val __value = uri if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(2, __value) } }; - + { val __value = text if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(3, __value) } }; - + { val __value = md5 if (!__value.isEmpty) { __size += SemanticdbOutputStream.computeStringSize(11, __value) } }; - + { val __value = language.value if (__value != 0) { @@ -84,7 +84,7 @@ final case class TextDocument( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -163,10 +163,10 @@ final case class TextDocument( def addSynthetics(__vs: dotty.tools.dotc.semanticdb.Synthetic *): TextDocument = addAllSynthetics(__vs) def addAllSynthetics(__vs: Iterable[dotty.tools.dotc.semanticdb.Synthetic]): TextDocument = copy(synthetics = synthetics ++ __vs) def withSynthetics(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Synthetic]): TextDocument = copy(synthetics = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.TextDocument]) } @@ -220,12 +220,12 @@ object TextDocument extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot synthetics = __synthetics.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TextDocument( schema = dotty.tools.dotc.semanticdb.Schema.LEGACY, uri = "", diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala index 41b8e1b3f491..a35bc23bf665 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 @SerialVersionUID(0L) @@ -29,7 +29,7 @@ final case class TextDocuments( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { documents.foreach { __v => @@ -43,10 +43,10 @@ final case class TextDocuments( def addDocuments(__vs: dotty.tools.dotc.semanticdb.TextDocument *): TextDocuments = addAllDocuments(__vs) def addAllDocuments(__vs: Iterable[dotty.tools.dotc.semanticdb.TextDocument]): TextDocuments = copy(documents = documents ++ __vs) def withDocuments(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.TextDocument]): TextDocuments = copy(documents = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.TextDocuments]) } @@ -68,12 +68,12 @@ object TextDocuments extends SemanticdbGeneratedMessageCompanion[dotty.tools.do documents = __documents.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TextDocuments( documents = _root_.scala.Seq.empty ) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Tree.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Tree.scala index ed84d9b2f2d0..6a19494cd65a 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 sealed trait Tree extends SemanticdbGeneratedSealedOneof derives CanEqual { @@ -18,10 +18,10 @@ sealed trait Tree extends SemanticdbGeneratedSealedOneof derives CanEqual { object Tree { case object Empty extends dotty.tools.dotc.semanticdb.Tree - + sealed trait NonEmpty extends dotty.tools.dotc.semanticdb.Tree def defaultInstance: dotty.tools.dotc.semanticdb.Tree = Empty - + implicit val TreeTypeMapper: SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.TreeMessage, dotty.tools.dotc.semanticdb.Tree] = new SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.TreeMessage, dotty.tools.dotc.semanticdb.Tree] { override def toCustom(__base: dotty.tools.dotc.semanticdb.TreeMessage): dotty.tools.dotc.semanticdb.Tree = __base.sealedValue match { case __v: dotty.tools.dotc.semanticdb.TreeMessage.SealedValue.ApplyTree => __v.value @@ -96,7 +96,7 @@ final case class TreeMessage( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { sealedValue.applyTree.foreach { __v => @@ -166,10 +166,10 @@ final case class TreeMessage( def withTypeApplyTree(__v: dotty.tools.dotc.semanticdb.TypeApplyTree): TreeMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.TreeMessage.SealedValue.TypeApplyTree(__v)) def clearSealedValue: TreeMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.TreeMessage.SealedValue.Empty) def withSealedValue(__v: dotty.tools.dotc.semanticdb.TreeMessage.SealedValue): TreeMessage = copy(sealedValue = __v) - - - - + + + + def toTree: dotty.tools.dotc.semanticdb.Tree = dotty.tools.dotc.semanticdb.Tree.TreeTypeMapper.toCustom(this) // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Tree]) } @@ -206,12 +206,12 @@ object TreeMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc sealedValue = __sealedValue ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TreeMessage( sealedValue = dotty.tools.dotc.semanticdb.TreeMessage.SealedValue.Empty ) @@ -244,7 +244,7 @@ object TreeMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc override def number: _root_.scala.Int = 0 override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") } - + @SerialVersionUID(0L) final case class ApplyTree(value: dotty.tools.dotc.semanticdb.ApplyTree) extends dotty.tools.dotc.semanticdb.TreeMessage.SealedValue derives CanEqual { type ValueType = dotty.tools.dotc.semanticdb.ApplyTree @@ -327,7 +327,7 @@ final case class ApplyTree( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.ApplyTree._typemapper_function.toBase(function) if (__value.serializedSize != 0) { @@ -347,7 +347,7 @@ final case class ApplyTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -370,10 +370,10 @@ final case class ApplyTree( def addArguments(__vs: dotty.tools.dotc.semanticdb.Tree *): ApplyTree = addAllArguments(__vs) def addAllArguments(__vs: Iterable[dotty.tools.dotc.semanticdb.Tree]): ApplyTree = copy(arguments = arguments ++ __vs) def withArguments(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Tree]): ApplyTree = copy(arguments = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ApplyTree]) } @@ -399,12 +399,12 @@ object ApplyTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s arguments = __arguments.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ApplyTree( function = dotty.tools.dotc.semanticdb.ApplyTree._typemapper_function.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance), arguments = _root_.scala.Seq.empty @@ -438,7 +438,7 @@ final case class FunctionTree( val __value = __item __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } - + { val __value = dotty.tools.dotc.semanticdb.FunctionTree._typemapper_body.toBase(body) if (__value.serializedSize != 0) { @@ -454,7 +454,7 @@ final case class FunctionTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { parameters.foreach { __v => @@ -477,10 +477,10 @@ final case class FunctionTree( def addAllParameters(__vs: Iterable[dotty.tools.dotc.semanticdb.IdTree]): FunctionTree = copy(parameters = parameters ++ __vs) def withParameters(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.IdTree]): FunctionTree = copy(parameters = __v) def withBody(__v: dotty.tools.dotc.semanticdb.Tree): FunctionTree = copy(body = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.FunctionTree]) } @@ -506,12 +506,12 @@ object FunctionTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot body = dotty.tools.dotc.semanticdb.FunctionTree._typemapper_body.toCustom(__body.getOrElse(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.FunctionTree( parameters = _root_.scala.Seq.empty, body = dotty.tools.dotc.semanticdb.FunctionTree._typemapper_body.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance) @@ -538,7 +538,7 @@ final case class IdTree( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = symbol if (!__value.isEmpty) { @@ -554,7 +554,7 @@ final case class IdTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -565,10 +565,10 @@ final case class IdTree( }; } def withSymbol(__v: _root_.scala.Predef.String): IdTree = copy(symbol = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.IdTree]) } @@ -590,12 +590,12 @@ object IdTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.sema symbol = __symbol ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.IdTree( symbol = "" ) @@ -616,7 +616,7 @@ final case class LiteralTree( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.LiteralTree._typemapper_constant.toBase(constant) if (__value.serializedSize != 0) { @@ -632,7 +632,7 @@ final case class LiteralTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -645,10 +645,10 @@ final case class LiteralTree( }; } def withConstant(__v: dotty.tools.dotc.semanticdb.Constant): LiteralTree = copy(constant = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.LiteralTree]) } @@ -670,12 +670,12 @@ object LiteralTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc constant = dotty.tools.dotc.semanticdb.LiteralTree._typemapper_constant.toCustom(__constant.getOrElse(dotty.tools.dotc.semanticdb.ConstantMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.LiteralTree( constant = dotty.tools.dotc.semanticdb.LiteralTree._typemapper_constant.toCustom(dotty.tools.dotc.semanticdb.ConstantMessage.defaultInstance) ) @@ -699,14 +699,14 @@ final case class MacroExpansionTree( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.MacroExpansionTree._typemapper_beforeExpansion.toBase(beforeExpansion) if (__value.serializedSize != 0) { __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } }; - + { val __value = dotty.tools.dotc.semanticdb.MacroExpansionTree._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -722,7 +722,7 @@ final case class MacroExpansionTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -744,10 +744,10 @@ final case class MacroExpansionTree( } def withBeforeExpansion(__v: dotty.tools.dotc.semanticdb.Tree): MacroExpansionTree = copy(beforeExpansion = __v) def withTpe(__v: dotty.tools.dotc.semanticdb.Type): MacroExpansionTree = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.MacroExpansionTree]) } @@ -773,12 +773,12 @@ object MacroExpansionTree extends SemanticdbGeneratedMessageCompanion[dotty.too tpe = dotty.tools.dotc.semanticdb.MacroExpansionTree._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.MacroExpansionTree( beforeExpansion = dotty.tools.dotc.semanticdb.MacroExpansionTree._typemapper_beforeExpansion.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance), tpe = dotty.tools.dotc.semanticdb.MacroExpansionTree._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) @@ -820,7 +820,7 @@ final case class OriginalTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { range.foreach { __v => @@ -833,10 +833,10 @@ final case class OriginalTree( def getRange: dotty.tools.dotc.semanticdb.Range = range.getOrElse(dotty.tools.dotc.semanticdb.Range.defaultInstance) def clearRange: OriginalTree = copy(range = _root_.scala.None) def withRange(__v: dotty.tools.dotc.semanticdb.Range): OriginalTree = copy(range = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.OriginalTree]) } @@ -858,12 +858,12 @@ object OriginalTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot range = __range ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.OriginalTree( range = _root_.scala.None ) @@ -885,7 +885,7 @@ final case class SelectTree( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.SelectTree._typemapper_qualifier.toBase(qualifier) if (__value.serializedSize != 0) { @@ -905,7 +905,7 @@ final case class SelectTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -927,10 +927,10 @@ final case class SelectTree( def getId: dotty.tools.dotc.semanticdb.IdTree = id.getOrElse(dotty.tools.dotc.semanticdb.IdTree.defaultInstance) def clearId: SelectTree = copy(id = _root_.scala.None) def withId(__v: dotty.tools.dotc.semanticdb.IdTree): SelectTree = copy(id = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.SelectTree]) } @@ -956,12 +956,12 @@ object SelectTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. id = __id ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.SelectTree( qualifier = dotty.tools.dotc.semanticdb.SelectTree._typemapper_qualifier.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance), id = _root_.scala.None @@ -989,7 +989,7 @@ final case class TypeApplyTree( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.TypeApplyTree._typemapper_function.toBase(function) if (__value.serializedSize != 0) { @@ -1009,7 +1009,7 @@ final case class TypeApplyTree( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1032,10 +1032,10 @@ final case class TypeApplyTree( def addTypeArguments(__vs: dotty.tools.dotc.semanticdb.Type *): TypeApplyTree = addAllTypeArguments(__vs) def addAllTypeArguments(__vs: Iterable[dotty.tools.dotc.semanticdb.Type]): TypeApplyTree = copy(typeArguments = typeArguments ++ __vs) def withTypeArguments(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Type]): TypeApplyTree = copy(typeArguments = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.TypeApplyTree]) } @@ -1061,12 +1061,12 @@ object TypeApplyTree extends SemanticdbGeneratedMessageCompanion[dotty.tools.do typeArguments = __typeArguments.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TypeApplyTree( function = dotty.tools.dotc.semanticdb.TypeApplyTree._typemapper_function.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance), typeArguments = _root_.scala.Seq.empty diff --git a/compiler/src/dotty/tools/dotc/semanticdb/generated/Type.scala b/compiler/src/dotty/tools/dotc/semanticdb/generated/Type.scala index be9cc6034f2c..8f675e82b802 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 sealed trait Type extends SemanticdbGeneratedSealedOneof derives CanEqual { @@ -18,10 +18,10 @@ sealed trait Type extends SemanticdbGeneratedSealedOneof derives CanEqual { object Type { case object Empty extends dotty.tools.dotc.semanticdb.Type - + sealed trait NonEmpty extends dotty.tools.dotc.semanticdb.Type def defaultInstance: dotty.tools.dotc.semanticdb.Type = Empty - + implicit val TypeTypeMapper: SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.TypeMessage, dotty.tools.dotc.semanticdb.Type] = new SemanticdbTypeMapper[dotty.tools.dotc.semanticdb.TypeMessage, dotty.tools.dotc.semanticdb.Type] { override def toCustom(__base: dotty.tools.dotc.semanticdb.TypeMessage): dotty.tools.dotc.semanticdb.Type = __base.sealedValue match { case __v: dotty.tools.dotc.semanticdb.TypeMessage.SealedValue.TypeRef => __v.value @@ -144,7 +144,7 @@ final case class TypeMessage( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { sealedValue.typeRef.foreach { __v => @@ -278,10 +278,10 @@ final case class TypeMessage( def withLambdaType(__v: dotty.tools.dotc.semanticdb.LambdaType): TypeMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.TypeMessage.SealedValue.LambdaType(__v)) def clearSealedValue: TypeMessage = copy(sealedValue = dotty.tools.dotc.semanticdb.TypeMessage.SealedValue.Empty) def withSealedValue(__v: dotty.tools.dotc.semanticdb.TypeMessage.SealedValue): TypeMessage = copy(sealedValue = __v) - - - - + + + + def toType: dotty.tools.dotc.semanticdb.Type = dotty.tools.dotc.semanticdb.Type.TypeTypeMapper.toCustom(this) // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.Type]) } @@ -334,12 +334,12 @@ object TypeMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc sealedValue = __sealedValue ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TypeMessage( sealedValue = dotty.tools.dotc.semanticdb.TypeMessage.SealedValue.Empty ) @@ -388,7 +388,7 @@ object TypeMessage extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc override def number: _root_.scala.Int = 0 override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value") } - + @SerialVersionUID(0L) final case class TypeRef(value: dotty.tools.dotc.semanticdb.TypeRef) extends dotty.tools.dotc.semanticdb.TypeMessage.SealedValue derives CanEqual { type ValueType = dotty.tools.dotc.semanticdb.TypeRef @@ -536,14 +536,14 @@ final case class TypeRef( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.TypeRef._typemapper_prefix.toBase(prefix) if (__value.serializedSize != 0) { __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } }; - + { val __value = symbol if (!__value.isEmpty) { @@ -563,7 +563,7 @@ final case class TypeRef( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -593,10 +593,10 @@ final case class TypeRef( def addTypeArguments(__vs: dotty.tools.dotc.semanticdb.Type *): TypeRef = addAllTypeArguments(__vs) def addAllTypeArguments(__vs: Iterable[dotty.tools.dotc.semanticdb.Type]): TypeRef = copy(typeArguments = typeArguments ++ __vs) def withTypeArguments(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Type]): TypeRef = copy(typeArguments = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.TypeRef]) } @@ -626,12 +626,12 @@ object TypeRef extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.sem typeArguments = __typeArguments.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.TypeRef( prefix = dotty.tools.dotc.semanticdb.TypeRef._typemapper_prefix.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), symbol = "", @@ -665,14 +665,14 @@ final case class SingleType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.SingleType._typemapper_prefix.toBase(prefix) if (__value.serializedSize != 0) { __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } }; - + { val __value = symbol if (!__value.isEmpty) { @@ -688,7 +688,7 @@ final case class SingleType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -708,10 +708,10 @@ final case class SingleType( } def withPrefix(__v: dotty.tools.dotc.semanticdb.Type): SingleType = copy(prefix = __v) def withSymbol(__v: _root_.scala.Predef.String): SingleType = copy(symbol = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.SingleType]) } @@ -737,12 +737,12 @@ object SingleType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. symbol = __symbol ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.SingleType( prefix = dotty.tools.dotc.semanticdb.SingleType._typemapper_prefix.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), symbol = "" @@ -769,7 +769,7 @@ final case class ThisType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = symbol if (!__value.isEmpty) { @@ -785,7 +785,7 @@ final case class ThisType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -796,10 +796,10 @@ final case class ThisType( }; } def withSymbol(__v: _root_.scala.Predef.String): ThisType = copy(symbol = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ThisType]) } @@ -821,12 +821,12 @@ object ThisType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.se symbol = __symbol ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ThisType( symbol = "" ) @@ -848,14 +848,14 @@ final case class SuperType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.SuperType._typemapper_prefix.toBase(prefix) if (__value.serializedSize != 0) { __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } }; - + { val __value = symbol if (!__value.isEmpty) { @@ -871,7 +871,7 @@ final case class SuperType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -891,10 +891,10 @@ final case class SuperType( } def withPrefix(__v: dotty.tools.dotc.semanticdb.Type): SuperType = copy(prefix = __v) def withSymbol(__v: _root_.scala.Predef.String): SuperType = copy(symbol = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.SuperType]) } @@ -920,12 +920,12 @@ object SuperType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s symbol = __symbol ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.SuperType( prefix = dotty.tools.dotc.semanticdb.SuperType._typemapper_prefix.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), symbol = "" @@ -952,7 +952,7 @@ final case class ConstantType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.ConstantType._typemapper_constant.toBase(constant) if (__value.serializedSize != 0) { @@ -968,7 +968,7 @@ final case class ConstantType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -981,10 +981,10 @@ final case class ConstantType( }; } def withConstant(__v: dotty.tools.dotc.semanticdb.Constant): ConstantType = copy(constant = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ConstantType]) } @@ -1006,12 +1006,12 @@ object ConstantType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot constant = dotty.tools.dotc.semanticdb.ConstantType._typemapper_constant.toCustom(__constant.getOrElse(dotty.tools.dotc.semanticdb.ConstantMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ConstantType( constant = dotty.tools.dotc.semanticdb.ConstantType._typemapper_constant.toCustom(dotty.tools.dotc.semanticdb.ConstantMessage.defaultInstance) ) @@ -1047,7 +1047,7 @@ final case class IntersectionType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { types.foreach { __v => @@ -1061,10 +1061,10 @@ final case class IntersectionType( def addTypes(__vs: dotty.tools.dotc.semanticdb.Type *): IntersectionType = addAllTypes(__vs) def addAllTypes(__vs: Iterable[dotty.tools.dotc.semanticdb.Type]): IntersectionType = copy(types = types ++ __vs) def withTypes(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Type]): IntersectionType = copy(types = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.IntersectionType]) } @@ -1086,12 +1086,12 @@ object IntersectionType extends SemanticdbGeneratedMessageCompanion[dotty.tools types = __types.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.IntersectionType( types = _root_.scala.Seq.empty ) @@ -1127,7 +1127,7 @@ final case class UnionType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { types.foreach { __v => @@ -1141,10 +1141,10 @@ final case class UnionType( def addTypes(__vs: dotty.tools.dotc.semanticdb.Type *): UnionType = addAllTypes(__vs) def addAllTypes(__vs: Iterable[dotty.tools.dotc.semanticdb.Type]): UnionType = copy(types = types ++ __vs) def withTypes(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Type]): UnionType = copy(types = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.UnionType]) } @@ -1166,12 +1166,12 @@ object UnionType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s types = __types.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.UnionType( types = _root_.scala.Seq.empty ) @@ -1207,7 +1207,7 @@ final case class WithType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { types.foreach { __v => @@ -1221,10 +1221,10 @@ final case class WithType( def addTypes(__vs: dotty.tools.dotc.semanticdb.Type *): WithType = addAllTypes(__vs) def addAllTypes(__vs: Iterable[dotty.tools.dotc.semanticdb.Type]): WithType = copy(types = types ++ __vs) def withTypes(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Type]): WithType = copy(types = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.WithType]) } @@ -1246,12 +1246,12 @@ object WithType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.se types = __types.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.WithType( types = _root_.scala.Seq.empty ) @@ -1275,7 +1275,7 @@ final case class StructuralType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.StructuralType._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -1295,7 +1295,7 @@ final case class StructuralType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1317,10 +1317,10 @@ final case class StructuralType( def getDeclarations: dotty.tools.dotc.semanticdb.Scope = declarations.getOrElse(dotty.tools.dotc.semanticdb.Scope.defaultInstance) def clearDeclarations: StructuralType = copy(declarations = _root_.scala.None) def withDeclarations(__v: dotty.tools.dotc.semanticdb.Scope): StructuralType = copy(declarations = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.StructuralType]) } @@ -1346,12 +1346,12 @@ object StructuralType extends SemanticdbGeneratedMessageCompanion[dotty.tools.d declarations = __declarations ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.StructuralType( tpe = dotty.tools.dotc.semanticdb.StructuralType._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), declarations = _root_.scala.None @@ -1383,7 +1383,7 @@ final case class AnnotatedType( val __value = __item __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } - + { val __value = dotty.tools.dotc.semanticdb.AnnotatedType._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -1399,7 +1399,7 @@ final case class AnnotatedType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1422,10 +1422,10 @@ final case class AnnotatedType( def addAllAnnotations(__vs: Iterable[dotty.tools.dotc.semanticdb.Annotation]): AnnotatedType = copy(annotations = annotations ++ __vs) def withAnnotations(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Annotation]): AnnotatedType = copy(annotations = __v) def withTpe(__v: dotty.tools.dotc.semanticdb.Type): AnnotatedType = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.AnnotatedType]) } @@ -1451,12 +1451,12 @@ object AnnotatedType extends SemanticdbGeneratedMessageCompanion[dotty.tools.do tpe = dotty.tools.dotc.semanticdb.AnnotatedType._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.AnnotatedType( annotations = _root_.scala.Seq.empty, tpe = dotty.tools.dotc.semanticdb.AnnotatedType._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) @@ -1484,7 +1484,7 @@ final case class ExistentialType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.ExistentialType._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -1504,7 +1504,7 @@ final case class ExistentialType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1526,10 +1526,10 @@ final case class ExistentialType( def getDeclarations: dotty.tools.dotc.semanticdb.Scope = declarations.getOrElse(dotty.tools.dotc.semanticdb.Scope.defaultInstance) def clearDeclarations: ExistentialType = copy(declarations = _root_.scala.None) def withDeclarations(__v: dotty.tools.dotc.semanticdb.Scope): ExistentialType = copy(declarations = Option(__v)) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ExistentialType]) } @@ -1555,12 +1555,12 @@ object ExistentialType extends SemanticdbGeneratedMessageCompanion[dotty.tools. declarations = __declarations ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ExistentialType( tpe = dotty.tools.dotc.semanticdb.ExistentialType._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), declarations = _root_.scala.None @@ -1592,7 +1592,7 @@ final case class UniversalType( val __value = typeParameters.get __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize }; - + { val __value = dotty.tools.dotc.semanticdb.UniversalType._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -1608,7 +1608,7 @@ final case class UniversalType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1630,10 +1630,10 @@ final case class UniversalType( def clearTypeParameters: UniversalType = copy(typeParameters = _root_.scala.None) def withTypeParameters(__v: dotty.tools.dotc.semanticdb.Scope): UniversalType = copy(typeParameters = Option(__v)) def withTpe(__v: dotty.tools.dotc.semanticdb.Type): UniversalType = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.UniversalType]) } @@ -1659,12 +1659,12 @@ object UniversalType extends SemanticdbGeneratedMessageCompanion[dotty.tools.do tpe = dotty.tools.dotc.semanticdb.UniversalType._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.UniversalType( typeParameters = _root_.scala.None, tpe = dotty.tools.dotc.semanticdb.UniversalType._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) @@ -1691,7 +1691,7 @@ final case class ByNameType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.ByNameType._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -1707,7 +1707,7 @@ final case class ByNameType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1720,10 +1720,10 @@ final case class ByNameType( }; } def withTpe(__v: dotty.tools.dotc.semanticdb.Type): ByNameType = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.ByNameType]) } @@ -1745,12 +1745,12 @@ object ByNameType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. tpe = dotty.tools.dotc.semanticdb.ByNameType._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.ByNameType( tpe = dotty.tools.dotc.semanticdb.ByNameType._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) ) @@ -1773,7 +1773,7 @@ final case class RepeatedType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.RepeatedType._typemapper_tpe.toBase(tpe) if (__value.serializedSize != 0) { @@ -1789,7 +1789,7 @@ final case class RepeatedType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1802,10 +1802,10 @@ final case class RepeatedType( }; } def withTpe(__v: dotty.tools.dotc.semanticdb.Type): RepeatedType = copy(tpe = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.RepeatedType]) } @@ -1827,12 +1827,12 @@ object RepeatedType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dot tpe = dotty.tools.dotc.semanticdb.RepeatedType._typemapper_tpe.toCustom(__tpe.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.RepeatedType( tpe = dotty.tools.dotc.semanticdb.RepeatedType._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) ) @@ -1856,7 +1856,7 @@ final case class MatchType( private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.MatchType._typemapper_scrutinee.toBase(scrutinee) if (__value.serializedSize != 0) { @@ -1876,7 +1876,7 @@ final case class MatchType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1899,10 +1899,10 @@ final case class MatchType( def addCases(__vs: dotty.tools.dotc.semanticdb.MatchType.CaseType *): MatchType = addAllCases(__vs) def addAllCases(__vs: Iterable[dotty.tools.dotc.semanticdb.MatchType.CaseType]): MatchType = copy(cases = cases ++ __vs) def withCases(__v: _root_.scala.Seq[dotty.tools.dotc.semanticdb.MatchType.CaseType]): MatchType = copy(cases = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.MatchType]) } @@ -1928,12 +1928,12 @@ object MatchType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s cases = __cases.result() ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.MatchType( scrutinee = dotty.tools.dotc.semanticdb.MatchType._typemapper_scrutinee.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), cases = _root_.scala.Seq.empty @@ -1947,14 +1947,14 @@ object MatchType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s private[this] var __serializedSizeMemoized: _root_.scala.Int = 0 private[this] def __computeSerializedSize(): _root_.scala.Int = { var __size = 0 - + { val __value = dotty.tools.dotc.semanticdb.MatchType.CaseType._typemapper_key.toBase(key) if (__value.serializedSize != 0) { __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize } }; - + { val __value = dotty.tools.dotc.semanticdb.MatchType.CaseType._typemapper_body.toBase(body) if (__value.serializedSize != 0) { @@ -1970,7 +1970,7 @@ object MatchType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { { @@ -1992,13 +1992,13 @@ object MatchType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s } def withKey(__v: dotty.tools.dotc.semanticdb.Type): CaseType = copy(key = __v) def withBody(__v: dotty.tools.dotc.semanticdb.Type): CaseType = copy(body = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.MatchType.CaseType]) } - + object CaseType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.semanticdb.MatchType.CaseType] { implicit def messageCompanion: SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.semanticdb.MatchType.CaseType] = this def parseFrom(`_input__`: SemanticdbInputStream): dotty.tools.dotc.semanticdb.MatchType.CaseType = { @@ -2021,12 +2021,12 @@ object MatchType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s body = dotty.tools.dotc.semanticdb.MatchType.CaseType._typemapper_body.toCustom(__body.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.MatchType.CaseType( key = dotty.tools.dotc.semanticdb.MatchType.CaseType._typemapper_key.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance), body = dotty.tools.dotc.semanticdb.MatchType.CaseType._typemapper_body.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) @@ -2046,7 +2046,7 @@ object MatchType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc.s ) // @@protoc_insertion_point(GeneratedMessageCompanion[dotty.tools.dotc.semanticdb.MatchType.CaseType]) } - + final val SCRUTINEE_FIELD_NUMBER = 1 final val CASES_FIELD_NUMBER = 2 @transient @sharable @@ -2074,7 +2074,7 @@ final case class LambdaType( val __value = parameters.get __size += 1 + SemanticdbOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize }; - + { val __value = dotty.tools.dotc.semanticdb.LambdaType._typemapper_returnType.toBase(returnType) if (__value.serializedSize != 0) { @@ -2090,7 +2090,7 @@ final case class LambdaType( __serializedSizeMemoized = __size } __size - 1 - + } def writeTo(`_output__`: SemanticdbOutputStream): _root_.scala.Unit = { parameters.foreach { __v => @@ -2112,10 +2112,10 @@ final case class LambdaType( def clearParameters: LambdaType = copy(parameters = _root_.scala.None) def withParameters(__v: dotty.tools.dotc.semanticdb.Scope): LambdaType = copy(parameters = Option(__v)) def withReturnType(__v: dotty.tools.dotc.semanticdb.Type): LambdaType = copy(returnType = __v) - - - - + + + + // @@protoc_insertion_point(GeneratedMessage[dotty.tools.dotc.semanticdb.LambdaType]) } @@ -2141,12 +2141,12 @@ object LambdaType extends SemanticdbGeneratedMessageCompanion[dotty.tools.dotc. returnType = dotty.tools.dotc.semanticdb.LambdaType._typemapper_returnType.toCustom(__returnType.getOrElse(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)) ) } - - - - - - + + + + + + lazy val defaultInstance = dotty.tools.dotc.semanticdb.LambdaType( parameters = _root_.scala.None, returnType = dotty.tools.dotc.semanticdb.LambdaType._typemapper_returnType.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance) diff --git a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala index 8aed9e5b9771..699f85c0e303 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.io.InputStream import java.util.Arrays import java.nio.charset.StandardCharsets -import SemanticdbInputStream._ +import SemanticdbInputStream.* import scala.collection.mutable diff --git a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala index 37da7f868e25..359e861225b0 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala @@ -7,7 +7,7 @@ import java.io.OutputStream import java.nio.ByteBuffer import java.nio.charset.StandardCharsets -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 89d8f9a80ee3..85f2e84429c3 100644 --- a/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala +++ b/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala @@ -2,19 +2,19 @@ package dotty.tools.dotc package staging import dotty.tools.dotc.ast.{tpd, 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.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. @@ -52,7 +52,7 @@ import dotty.tools.dotc.util.SrcPos * */ class CrossStageSafety extends TreeMapWithStages { - import tpd._ + import tpd.* private val InAnnotation = Property.Key[Unit]() diff --git a/compiler/src/dotty/tools/dotc/staging/HealType.scala b/compiler/src/dotty/tools/dotc/staging/HealType.scala index 7d3ca0ad2f63..2469bd73bdcb 100644 --- a/compiler/src/dotty/tools/dotc/staging/HealType.scala +++ b/compiler/src/dotty/tools/dotc/staging/HealType.scala @@ -1,15 +1,15 @@ 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.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.StagingLevel.* import dotty.tools.dotc.staging.QuoteTypeTags.* -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* 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 0b5032ea5a6d..467f1f440fd6 100644 --- a/compiler/src/dotty/tools/dotc/staging/QuoteTypeTags.scala +++ b/compiler/src/dotty/tools/dotc/staging/QuoteTypeTags.scala @@ -1,10 +1,10 @@ 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.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 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 674dfff2f642..c2607f3daa68 100644 --- a/compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala +++ b/compiler/src/dotty/tools/dotc/staging/TreeMapWithStages.scala @@ -3,16 +3,16 @@ package staging import dotty.tools.dotc.ast.{TreeMapWithImplicits, tpd} import dotty.tools.dotc.config.Printers.staging -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.staging.StagingLevel.* import scala.collection.mutable /** TreeMap that keeps track of staging levels using StagingLevel. */ abstract class TreeMapWithStages extends TreeMapWithImplicits { - import tpd._ + import tpd.* override def transform(tree: Tree)(using Context): Tree = if (tree.source != ctx.source && tree.source.exists) diff --git a/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala b/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala index 3175ffceae49..c5ffde140bd6 100644 --- a/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala +++ b/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Symbols._ -import Flags._ -import Names._ -import NameOps._ -import Decorators._ -import TypeUtils._ -import Types._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* +import Names.* +import NameOps.* +import Decorators.* +import TypeUtils.* +import Types.* import util.Spans.Span import config.Printers.transforms @@ -18,8 +18,8 @@ import config.Printers.transforms * inline accessors and protected accessors. */ abstract class AccessProxies { - import ast.tpd._ - import AccessProxies._ + import ast.tpd.* + import AccessProxies.* /** accessor -> accessed */ private val accessedBy = MutableSymbolMap[Symbol]() @@ -64,7 +64,7 @@ abstract class AccessProxies { } trait Insert { - import ast.tpd._ + import ast.tpd.* /** The name of the accessor for definition with given `name` in given `site` */ def accessorNameOf(name: TermName, site: Symbol)(using Context): TermName diff --git a/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala b/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala index 872c7cc897de..6ece8ad63808 100644 --- a/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala +++ b/compiler/src/dotty/tools/dotc/transform/ArrayApply.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import core._ -import MegaPhase._ -import Contexts._ -import Symbols._ -import Flags._ -import StdNames._ +import core.* +import MegaPhase.* +import Contexts.* +import Symbols.* +import Flags.* +import StdNames.* import dotty.tools.dotc.ast.tpd @@ -16,7 +16,7 @@ import dotty.tools.dotc.ast.tpd * Transforms `scala.Array.apply([....])` and `scala.Array.apply(..., [....])` into `[...]` */ class ArrayApply extends MiniPhase { - import tpd._ + import tpd.* override def phaseName: String = ArrayApply.name diff --git a/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala b/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala index e783961649dd..b0106f0d2ff3 100644 --- a/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala +++ b/compiler/src/dotty/tools/dotc/transform/ArrayConstructors.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import core._ -import MegaPhase._ -import Contexts._ -import Symbols._ -import Types._ -import StdNames._ +import core.* +import MegaPhase.* +import Contexts.* +import Symbols.* +import Types.* +import StdNames.* import dotty.tools.dotc.ast.tpd @@ -19,7 +19,7 @@ import scala.collection.immutable.:: * Additionally it optimizes calls to scala.Array.ofDim functions by replacing them with calls to newArray with specific dimensions */ class ArrayConstructors extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ArrayConstructors.name diff --git a/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala b/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala index 0c1f40d4f2bd..7e21703f67ee 100644 --- a/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala +++ b/compiler/src/dotty/tools/dotc/transform/BeanProperties.scala @@ -1,19 +1,19 @@ package dotty.tools.dotc package transform -import core._ -import ast.tpd._ -import Annotations._ -import Contexts._ +import core.* +import ast.tpd.* +import Annotations.* +import Contexts.* import Symbols.* import SymUtils.* -import Decorators._ -import Flags._ -import Names._ -import Types._ -import util.Spans._ +import Decorators.* +import Flags.* +import Names.* +import Types.* +import util.Spans.* -import DenotTransformers._ +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 ad36544cdec0..653a5e17990f 100644 --- a/compiler/src/dotty/tools/dotc/transform/BetaReduce.scala +++ b/compiler/src/dotty/tools/dotc/transform/BetaReduce.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package transform -import core._ -import Flags._ -import MegaPhase._ -import Symbols._, Contexts._, Types._, Decorators._ +import core.* +import Flags.* +import MegaPhase.* +import Symbols.*, Contexts.*, Types.*, Decorators.* import StdNames.nme import ast.TreeTypeMap @@ -33,7 +33,7 @@ import scala.collection.mutable.ListBuffer * return context functions. See i6375.scala. */ class BetaReduce extends MiniPhase: - import ast.tpd._ + import ast.tpd.* override def phaseName: String = BetaReduce.name @@ -45,7 +45,7 @@ class BetaReduce extends MiniPhase: app1 object BetaReduce: - import ast.tpd._ + import ast.tpd.* val name: String = "betaReduce" val description: String = "reduce closure applications" diff --git a/compiler/src/dotty/tools/dotc/transform/Bridges.scala b/compiler/src/dotty/tools/dotc/transform/Bridges.scala index 94f7b405c027..2110ac1464c2 100644 --- a/compiler/src/dotty/tools/dotc/transform/Bridges.scala +++ b/compiler/src/dotty/tools/dotc/transform/Bridges.scala @@ -2,9 +2,9 @@ package dotty.tools package dotc package transform -import core._ -import Symbols._, Types._, Contexts._, Decorators._, Flags._, Scopes._, Phases._ -import DenotTransformers._ +import core.* +import Symbols.*, Types.*, Contexts.*, Decorators.*, Flags.*, Scopes.*, Phases.* +import DenotTransformers.* import ast.untpd import collection.{mutable, immutable} import util.SrcPos @@ -16,7 +16,7 @@ import Erasure.Boxing.adaptClosure /** A helper class for generating bridge methods in class `root`. */ class Bridges(root: ClassSymbol, thisPhase: DenotTransformer)(using Context) { - import ast.tpd._ + import ast.tpd.* assert(ctx.phase == erasurePhase.next) private val preErasureCtx = ctx.withPhase(erasurePhase) diff --git a/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala b/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala index 202e3d72fa25..c1725cbd0255 100644 --- a/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala +++ b/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -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 dotty.tools.uncheckedNN import ast.tpd.* diff --git a/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala b/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala index 7c8082265161..8625d2dbb289 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala @@ -30,7 +30,7 @@ object CheckLoopingImplicits: */ class CheckLoopingImplicits extends MiniPhase: thisPhase => - import tpd._ + import tpd.* override def phaseName: String = CheckLoopingImplicits.name diff --git a/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala b/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala index f43d000bbf44..127bd57b1bf2 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala @@ -15,7 +15,7 @@ object CheckNoSuperThis: /** Checks that super and this calls do not pass `this` as (part of) an argument. */ class CheckNoSuperThis extends MiniPhase: thisPhase => - import tpd._ + import tpd.* override def phaseName: String = CheckNoSuperThis.name diff --git a/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala b/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala index b63773687f74..073086ac5e2c 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import core._ -import dotty.tools.dotc.transform.MegaPhase._ -import Flags._ -import Contexts._ -import Symbols._ -import Decorators._ +import core.* +import dotty.tools.dotc.transform.MegaPhase.* +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 @@ -27,7 +27,7 @@ import Decorators._ * for immutable array. */ class CheckReentrant extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = CheckReentrant.name diff --git a/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala b/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala index ae69c1596009..fdc055df9ac4 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckShadowing.scala @@ -138,7 +138,7 @@ class CheckShadowing extends MiniPhase: } private def nestedTypeTraverser(parent: Symbol) = new TreeTraverser: - import tpd._ + import tpd.* override def traverse(tree: tpd.Tree)(using Context): Unit = tree match @@ -154,7 +154,7 @@ class CheckShadowing extends MiniPhase: // To reach the imports during a miniphase traversal private def importTraverser = new TreeTraverser: - import tpd._ + import tpd.* override def traverse(tree: tpd.Tree)(using Context): Unit = tree match @@ -173,7 +173,7 @@ object CheckShadowing: val description = "check for elements shadowing other elements in scope" private class ShadowingData: - import dotty.tools.dotc.transform.CheckShadowing.ShadowingData._ + import dotty.tools.dotc.transform.CheckShadowing.ShadowingData.* import collection.mutable.{Set => MutSet, Map => MutMap, Stack => MutStack} private val rootImports = MutSet[SingleDenotation]() diff --git a/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala b/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala index 0d5154e212ee..2b616bad0a01 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckStatic.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ -import dotty.tools.dotc.transform.MegaPhase._ -import Flags._ -import Contexts._ -import Symbols._ +import core.* +import dotty.tools.dotc.transform.MegaPhase.* +import Flags.* +import Contexts.* +import Symbols.* import dotty.tools.dotc.ast.tpd -import reporting._ +import reporting.* -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* /** A transformer that check that requirements of Static fields\methods are implemented: * 1. Only objects can have members annotated with `@static` @@ -24,7 +24,7 @@ import dotty.tools.dotc.transform.SymUtils._ * 6. `@static` Lazy vals are currently unsupported. */ class CheckStatic extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = CheckStatic.name diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index 073626b4b5c6..7cff6fa5f1f0 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -206,7 +206,7 @@ class CheckUnused private (phaseMode: CheckUnused.PhaseMode, suffix: String, _ke * corresponding context property */ private def traverser = new TreeTraverser: - import tpd._ + import tpd.* import UnusedData.ScopeType /* Register every imports, definition and usage */ @@ -607,14 +607,14 @@ object CheckUnused: * package a: * val x: Int = 0 * package b: - * import a._ // no warning + * import a.* // no warning * }}} * --- WITH OBJECT : OK --- * {{{ * object a: * val x: Int = 0 * object b: - * import a._ // unused warning + * import a.* // unused warning * }}} */ private def isConstructorOfSynth(sym: Symbol)(using Context): Boolean = @@ -643,8 +643,8 @@ object CheckUnused: sel.isWildcard || imp.expr.tpe.member(sel.name.toTermName).alternatives.exists(_.symbol.isOneOf(GivenOrImplicit)) || imp.expr.tpe.member(sel.name.toTypeName).alternatives.exists(_.symbol.isOneOf(GivenOrImplicit)) - ) - + ) + /** * Ignore CanEqual imports */ @@ -655,7 +655,7 @@ object CheckUnused: /** * Ignore definitions of CanEqual given - */ + */ private def isDefIgnored(memDef: tpd.MemberDef)(using Context): Boolean = memDef.symbol.isOneOf(GivenOrImplicit) && memDef.symbol.typeRef.baseClasses.exists(_.derivesFrom(defn.CanEqualClass)) diff --git a/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala b/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala index 179625759b10..5534947c6799 100644 --- a/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala +++ b/compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import core._ +import core.* import ast.tpd -import MegaPhase._ -import Contexts._ -import Symbols._ -import Phases._ +import MegaPhase.* +import Contexts.* +import Symbols.* +import Phases.* import dotty.tools.io.JarArchive import dotty.tools.backend.jvm.GenBCode diff --git a/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala b/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala index 7b89c8785e05..22739dc528c8 100644 --- a/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala +++ b/compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala @@ -1,11 +1,11 @@ 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 -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import scala.collection.mutable @@ -40,7 +40,7 @@ object CollectNullableFields { * - defined in the same class as the lazy val */ class CollectNullableFields extends MiniPhase { - import tpd._ + import tpd.* override def phaseName: String = CollectNullableFields.name diff --git a/compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala b/compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala index b7e8ccf4e7e1..eac0b9f05c60 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 core._ -import Names._ +import core.* +import Names.* import StdNames.nme -import Types._ -import dotty.tools.dotc.transform.MegaPhase._ -import Flags._ -import Contexts._ -import Symbols._ -import Constants._ -import Decorators._ -import DenotTransformers._ -import SymUtils._ +import Types.* +import dotty.tools.dotc.transform.MegaPhase.* +import Flags.* +import Contexts.* +import Symbols.* +import Constants.* +import Decorators.* +import DenotTransformers.* +import SymUtils.* object CompleteJavaEnums { @@ -29,8 +29,8 @@ object CompleteJavaEnums { * case to the java.lang.Enum class. */ class CompleteJavaEnums extends MiniPhase with InfoTransformer { thisPhase => - import CompleteJavaEnums._ - import ast.tpd._ + import CompleteJavaEnums.* + import ast.tpd.* override def phaseName: String = CompleteJavaEnums.name diff --git a/compiler/src/dotty/tools/dotc/transform/Constructors.scala b/compiler/src/dotty/tools/dotc/transform/Constructors.scala index 4dd7205e4ee0..9df98292fe84 100644 --- a/compiler/src/dotty/tools/dotc/transform/Constructors.scala +++ b/compiler/src/dotty/tools/dotc/transform/Constructors.scala @@ -1,19 +1,19 @@ package dotty.tools.dotc package transform -import core._ -import MegaPhase._ -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.StdNames._ -import ast._ -import Flags._ +import core.* +import MegaPhase.* +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.StdNames.* +import ast.* +import Flags.* import Names.Name -import NameOps._ +import NameOps.* import NameKinds.{FieldName, ExplicitFieldName} -import SymUtils._ -import Symbols._ -import Decorators._ -import DenotTransformers._ +import SymUtils.* +import Symbols.* +import Decorators.* +import DenotTransformers.* import collection.mutable object Constructors { @@ -28,7 +28,7 @@ object Constructors { * into the constructor if possible. */ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase => - import tpd._ + import tpd.* override def phaseName: String = Constructors.name @@ -352,7 +352,7 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase = val expandedConstr = if (cls.isAllOf(NoInitsTrait)) { assert(finalConstrStats.isEmpty || { - import dotty.tools.dotc.transform.sjs.JSSymUtils._ + import dotty.tools.dotc.transform.sjs.JSSymUtils.* ctx.settings.scalajs.value && cls.isJSType }) constr diff --git a/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala b/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala index 01a77427698a..4719b5f5f6f3 100644 --- a/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala +++ b/compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._, Symbols._, Types._, Annotations._, Constants._, Phases._ +import core.* +import Contexts.*, Symbols.*, Types.*, Annotations.*, Constants.*, 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 27f34891fc2c..d443e31fdc39 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.Contexts._ -import dotty.tools.dotc.core.ContextOps._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.ContextOps.* 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 91b5bc6a3de4..b5c02347d5d2 100644 --- a/compiler/src/dotty/tools/dotc/transform/CountOuterAccesses.scala +++ b/compiler/src/dotty/tools/dotc/transform/CountOuterAccesses.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import core._ +import core.* import MegaPhase.MiniPhase -import dotty.tools.dotc.core.Contexts._ -import ast._ -import Flags._ -import Symbols._ +import dotty.tools.dotc.core.Contexts.* +import ast.* +import Flags.* +import Symbols.* import ExplicitOuter.isOuterParamAccessor import collection.mutable @@ -33,7 +33,7 @@ object CountOuterAccesses: */ class CountOuterAccesses extends MiniPhase: thisPhase => - import tpd._ + import tpd.* override def phaseName: String = CountOuterAccesses.name diff --git a/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala b/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala index 4f8f1b195bb3..89161cc8c013 100644 --- a/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala +++ b/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package transform -import core.Contexts._ +import core.Contexts.* import scala.compiletime.uninitialized diff --git a/compiler/src/dotty/tools/dotc/transform/Dependencies.scala b/compiler/src/dotty/tools/dotc/transform/Dependencies.scala index 46285c324307..9b1b931e0320 100644 --- a/compiler/src/dotty/tools/dotc/transform/Dependencies.scala +++ b/compiler/src/dotty/tools/dotc/transform/Dependencies.scala @@ -14,7 +14,7 @@ import dotty.tools.backend.sjs.JSDefinitions.jsdefn * `freeVars`, `tracked`, and `logicalOwner`. */ abstract class Dependencies(root: ast.tpd.Tree, @constructorOnly rootContext: Context): - import ast.tpd._ + import ast.tpd.* /** The symbol is a method or a lazy val that will be mapped to a method */ protected def isExpr(sym: Symbol)(using Context): Boolean diff --git a/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala b/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala index 9f94a8c13a52..5f26a6af6c3c 100644 --- a/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala +++ b/compiler/src/dotty/tools/dotc/transform/DropBreaks.scala @@ -6,9 +6,9 @@ import ast.{Trees, tpd} import core.* import Decorators.* import NameKinds.BoundaryName -import MegaPhase._ -import Types._, Contexts._, Flags._, DenotTransformers._ -import Symbols._, StdNames._, Trees._ +import MegaPhase.* +import Types.*, Contexts.*, Flags.*, DenotTransformers.* +import Symbols.*, StdNames.*, Trees.* import util.Property import Constants.Constant import Flags.MethodOrLazy @@ -41,7 +41,7 @@ object DropBreaks: class DropBreaks extends MiniPhase: import DropBreaks.* - import tpd._ + import tpd.* override def phaseName: String = DropBreaks.name diff --git a/compiler/src/dotty/tools/dotc/transform/DropEmptyCompanions.scala.disabled b/compiler/src/dotty/tools/dotc/transform/DropEmptyCompanions.scala.disabled index 13adcf5c3f76..1a5cb0dfba47 100644 --- a/compiler/src/dotty/tools/dotc/transform/DropEmptyCompanions.scala.disabled +++ b/compiler/src/dotty/tools/dotc/transform/DropEmptyCompanions.scala.disabled @@ -1,17 +1,17 @@ package dotty.tools.dotc package transform -import core._ +import core.* import DenotTransformers.SymTransformer import Phases.Phase -import Contexts._ -import Flags._ -import Symbols._ +import Contexts.* +import Flags.* +import Symbols.* import SymDenotations.SymDenotation -import ast.Trees._ +import ast.Trees.* import collection.mutable -import Decorators._ -import NameOps._ +import Decorators.* +import NameOps.* import MegaPhase.MiniPhase import dotty.tools.dotc.transform.MegaPhase.TransformerInfo @@ -29,7 +29,7 @@ import dotty.tools.dotc.transform.MegaPhase.TransformerInfo * at their destination. */ class DropEmptyCompanions extends MiniPhase { thisTransform => - import ast.tpd._ + import ast.tpd.* override def phaseName = "dropEmptyCompanions" override def runsAfter = Set(Flatten.name) diff --git a/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala b/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala index a363ccaeb0d0..b3bd1ab8dd26 100644 --- a/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/DropOuterAccessors.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ +import core.* import MegaPhase.MiniPhase -import dotty.tools.dotc.core.Contexts._ -import ast._ -import Flags._ -import Symbols._ -import Contexts._ -import Decorators._ -import DenotTransformers._ +import dotty.tools.dotc.core.Contexts.* +import ast.* +import Flags.* +import Symbols.* +import Contexts.* +import Decorators.* +import DenotTransformers.* import ExplicitOuter.isOuterParamAccessor import CountOuterAccesses.mightBeDropped import collection.mutable @@ -24,7 +24,7 @@ object DropOuterAccessors: */ class DropOuterAccessors extends MiniPhase with IdentityDenotTransformer: thisPhase => - import tpd._ + import tpd.* override def phaseName: String = DropOuterAccessors.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala index 151e841f0e48..eca3928569f1 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Symbols._ -import Types._ -import Flags._ +import core.* +import Contexts.* +import Symbols.* +import Types.* +import Flags.* import SymDenotations.* import DenotTransformers.InfoTransformer import NameKinds.SuperArgName @@ -53,7 +53,7 @@ import dotty.tools.dotc.core.Names.Name class ElimByName extends MiniPhase, InfoTransformer: thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ElimByName.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala b/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala index 503561915040..0b0906148ba1 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala @@ -3,12 +3,12 @@ package dotc package transform import ast.{Trees, tpd} -import core._, core.Decorators._ -import MegaPhase._ -import Types._, Contexts._, Flags._, DenotTransformers._, Phases._ -import Symbols._, StdNames._, Trees._ -import TypeErasure.ErasedValueType, ValueClasses._ -import reporting._ +import core.*, core.Decorators.* +import MegaPhase.* +import Types.*, Contexts.*, Flags.*, DenotTransformers.*, Phases.* +import Symbols.*, StdNames.*, Trees.* +import TypeErasure.ErasedValueType, ValueClasses.* +import reporting.* import NameKinds.SuperAccessorName object ElimErasedValueType { @@ -36,7 +36,7 @@ object ElimErasedValueType { */ class ElimErasedValueType extends MiniPhase with InfoTransformer { thisPhase => - import tpd._ + import tpd.* import ElimErasedValueType.elimEVT override def phaseName: String = ElimErasedValueType.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala b/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala index 2f55826ec2a3..0ee8781b6b70 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package transform -import core._ -import dotty.tools.dotc.transform.MegaPhase._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ +import core.* +import dotty.tools.dotc.transform.MegaPhase.* +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" @@ -21,7 +21,7 @@ object ElimOpaque { /** Rewrites opaque type aliases to normal alias types */ class ElimOpaque extends MiniPhase with DenotTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ElimOpaque.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala b/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala index 3ddc8b614bae..8527ad26e51b 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimOuterSelect.scala @@ -1,17 +1,17 @@ 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_