From 9b053c262ee0dfd43f23d8496b6f072c31d86bd4 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Tue, 25 Jun 2024 00:04:06 +0200 Subject: [PATCH] Update import wildcard from `_` to `*` in compiler [Cherry-picked 592d0ec4ea7683c71bcfccce6a0c056eb9123f14][modified] --- .../src/dotty/tools/MainGenericRunner.scala | 2 +- .../tools/backend/jvm/BCodeAsmCommon.scala | 4 +- .../tools/backend/jvm/BCodeBodyBuilder.scala | 38 +- .../tools/backend/jvm/BCodeHelpers.scala | 36 +- .../tools/backend/jvm/BCodeIdiomatic.scala | 10 +- .../tools/backend/jvm/BCodeSkelBuilder.scala | 8 +- .../tools/backend/jvm/BCodeSyncAndTry.scala | 8 +- .../src/dotty/tools/backend/jvm/BTypes.scala | 2 +- .../tools/backend/jvm/BTypesFromSymbols.scala | 18 +- .../tools/backend/jvm/BackendUtils.scala | 8 +- .../src/dotty/tools/backend/jvm/CodeGen.scala | 18 +- .../tools/backend/jvm/CollectSuperCalls.scala | 8 +- .../dotty/tools/backend/jvm/CoreBTypes.scala | 10 +- .../backend/jvm/DottyBackendInterface.scala | 16 +- .../dotty/tools/backend/jvm/GenBCode.scala | 8 +- .../backend/jvm/GenericSignatureVisitor.scala | 6 +- .../jvm/PostProcessorFrontendAccess.scala | 2 +- .../tools/backend/jvm/scalaPrimitives.scala | 10 +- .../dotty/tools/backend/sjs/GenSJSIR.scala | 6 +- .../dotty/tools/backend/sjs/JSCodeGen.scala | 50 +- .../tools/backend/sjs/JSDefinitions.scala | 12 +- .../dotty/tools/backend/sjs/JSEncoding.scala | 20 +- .../tools/backend/sjs/JSExportsGen.scala | 34 +- .../dotty/tools/backend/sjs/JSPositions.scala | 8 +- .../tools/backend/sjs/JSPrimitives.scala | 12 +- compiler/src/dotty/tools/dotc/Bench.scala | 2 +- .../dotty/tools/dotc/CompilationUnit.scala | 10 +- compiler/src/dotty/tools/dotc/Compiler.scala | 6 +- compiler/src/dotty/tools/dotc/Driver.scala | 6 +- compiler/src/dotty/tools/dotc/Resident.scala | 2 +- compiler/src/dotty/tools/dotc/Run.scala | 14 +- .../src/dotty/tools/dotc/ScalacCommand.scala | 2 +- .../tools/dotc/ast/CheckTrees.scala.disabled | 8 +- .../src/dotty/tools/dotc/ast/Desugar.scala | 16 +- .../dotty/tools/dotc/ast/DesugarEnums.scala | 12 +- .../dotty/tools/dotc/ast/MainProxies.scala | 16 +- .../dotty/tools/dotc/ast/NavigateAST.scala | 6 +- .../src/dotty/tools/dotc/ast/Positioned.scala | 10 +- .../src/dotty/tools/dotc/ast/TreeInfo.scala | 16 +- .../tools/dotc/ast/TreeMapWithImplicits.scala | 10 +- .../dotty/tools/dotc/ast/TreeTypeMap.scala | 12 +- compiler/src/dotty/tools/dotc/ast/Trees.scala | 8 +- compiler/src/dotty/tools/dotc/ast/tpd.scala | 12 +- compiler/src/dotty/tools/dotc/ast/untpd.scala | 8 +- compiler/src/dotty/tools/dotc/cc/Setup.scala | 2 +- .../dotc/classpath/ClassPathFactory.scala | 4 +- .../dotc/classpath/DirectoryClassPath.scala | 12 +- .../classpath/VirtualDirectoryClassPath.scala | 2 +- .../ZipAndJarFileLookupFactory.scala | 4 +- .../dotc/classpath/ZipArchiveFileLookup.scala | 2 +- .../dotty/tools/dotc/config/CliCommand.scala | 4 +- .../tools/dotc/config/CompilerCommand.scala | 6 +- .../src/dotty/tools/dotc/config/Feature.scala | 6 +- .../tools/dotc/config/JavaPlatform.scala | 12 +- .../dotty/tools/dotc/config/OutputDirs.scala | 2 +- .../tools/dotc/config/PathResolver.scala | 8 +- .../dotty/tools/dotc/config/Platform.scala | 2 +- .../dotty/tools/dotc/config/SJSPlatform.scala | 6 +- .../tools/dotc/config/ScalaSettings.scala | 4 +- .../tools/dotc/config/ScalaVersion.scala | 2 +- .../dotty/tools/dotc/config/Settings.scala | 2 +- .../tools/dotc/config/WrappedProperties.scala | 2 +- .../dotty/tools/dotc/core/Annotations.scala | 2 +- .../src/dotty/tools/dotc/core/Atoms.scala | 2 +- .../tools/dotc/core/CheckRealizable.scala | 6 +- .../src/dotty/tools/dotc/core/Comments.scala | 6 +- .../src/dotty/tools/dotc/core/Constants.scala | 4 +- .../dotty/tools/dotc/core/Constraint.scala | 2 +- .../tools/dotc/core/ConstraintHandling.scala | 10 +- .../tools/dotc/core/ConstraintRunInfo.scala | 2 +- .../dotty/tools/dotc/core/ContextOps.scala | 4 +- .../src/dotty/tools/dotc/core/Contexts.scala | 30 +- .../dotty/tools/dotc/core/Decorators.scala | 4 +- .../dotty/tools/dotc/core/Definitions.scala | 6 +- .../tools/dotc/core/DenotTransformers.scala | 14 +- .../dotty/tools/dotc/core/Denotations.scala | 26 +- .../tools/dotc/core/GadtConstraint.scala | 2 +- .../src/dotty/tools/dotc/core/Hashable.scala | 4 +- .../tools/dotc/core/JavaNullInterop.scala | 6 +- .../tools/dotc/core/MacroClassLoader.scala | 2 +- .../tools/dotc/core/MatchTypeTrace.scala | 4 +- compiler/src/dotty/tools/dotc/core/Mode.scala | 2 +- .../src/dotty/tools/dotc/core/NameKinds.scala | 12 +- .../src/dotty/tools/dotc/core/NameOps.scala | 6 +- .../src/dotty/tools/dotc/core/NamerOps.scala | 2 +- .../src/dotty/tools/dotc/core/Names.scala | 2 +- .../tools/dotc/core/NullOpsDecorator.scala | 6 +- .../tools/dotc/core/OrderingConstraint.scala | 6 +- .../src/dotty/tools/dotc/core/ParamInfo.scala | 2 +- .../dotc/core/PatternTypeConstrainer.scala | 12 +- .../src/dotty/tools/dotc/core/Periods.scala | 2 +- .../src/dotty/tools/dotc/core/Phases.scala | 16 +- .../src/dotty/tools/dotc/core/Scopes.scala | 14 +- .../src/dotty/tools/dotc/core/Signature.scala | 4 +- .../src/dotty/tools/dotc/core/StdNames.scala | 6 +- .../dotty/tools/dotc/core/Substituters.scala | 2 +- .../tools/dotc/core/SymDenotations.scala | 14 +- .../dotty/tools/dotc/core/SymbolLoaders.scala | 10 +- .../src/dotty/tools/dotc/core/Symbols.scala | 32 +- .../tools/dotc/core/TypeApplications.scala | 14 +- .../dotty/tools/dotc/core/TypeComparer.scala | 14 +- .../dotty/tools/dotc/core/TypeErasure.scala | 16 +- .../dotty/tools/dotc/core/TypeErrors.scala | 18 +- .../src/dotty/tools/dotc/core/TypeOps.scala | 16 +- .../dotty/tools/dotc/core/TyperState.scala | 8 +- .../src/dotty/tools/dotc/core/Types.scala | 44 +- .../src/dotty/tools/dotc/core/Uniques.scala | 4 +- .../src/dotty/tools/dotc/core/Variances.scala | 4 +- .../core/classfile/ClassfileConstants.scala | 2 +- .../dotc/core/classfile/ClassfileParser.scala | 12 +- .../dotc/core/tasty/CommentUnpickler.scala | 2 +- .../dotc/core/tasty/DottyUnpickler.scala | 8 +- .../tools/dotc/core/tasty/NameBuffer.scala | 8 +- .../dotc/core/tasty/PositionPickler.scala | 12 +- .../dotc/core/tasty/PositionUnpickler.scala | 4 +- .../dotc/core/tasty/TastyClassName.scala | 8 +- .../tools/dotc/core/tasty/TastyPickler.scala | 6 +- .../tools/dotc/core/tasty/TastyPrinter.scala | 8 +- .../dotc/core/tasty/TastyUnpickler.scala | 8 +- .../tools/dotc/core/tasty/TreePickler.scala | 20 +- .../tools/dotc/core/tasty/TreeUnpickler.scala | 52 +- .../core/unpickleScala2/PickleBuffer.scala | 4 +- .../core/unpickleScala2/Scala2Erasure.scala | 4 +- .../core/unpickleScala2/Scala2Unpickler.scala | 28 +- .../dotty/tools/dotc/coverage/Location.scala | 2 +- .../decompiler/DecompilationPrinter.scala | 2 +- .../dotc/decompiler/IDEDecompilerDriver.scala | 6 +- .../dotty/tools/dotc/decompiler/Main.scala | 2 +- .../dotc/decompiler/TASTYDecompiler.scala | 2 +- .../tools/dotc/fromtasty/ReadTasty.scala | 8 +- .../tools/dotc/fromtasty/TASTYCompiler.scala | 4 +- .../dotty/tools/dotc/fromtasty/TASTYRun.scala | 2 +- .../dotty/tools/dotc/inlines/Inliner.scala | 8 +- .../dotty/tools/dotc/inlines/Inlines.scala | 6 +- .../dotc/inlines/PrepareInlineable.scala | 22 +- .../tools/dotc/interactive/Completion.scala | 12 +- .../tools/dotc/interactive/Interactive.scala | 14 +- .../interactive/InteractiveCompiler.scala | 8 +- .../dotc/interactive/InteractiveDriver.scala | 22 +- .../tools/dotc/interactive/SourceTree.scala | 8 +- .../tools/dotc/parsing/CharArrayReader.scala | 2 +- .../tools/dotc/parsing/JavaParsers.scala | 28 +- .../tools/dotc/parsing/JavaScanners.scala | 8 +- .../dotty/tools/dotc/parsing/Parsers.scala | 34 +- .../dotty/tools/dotc/parsing/Scanners.scala | 8 +- .../tools/dotc/parsing/ScriptParsers.scala | 10 +- .../src/dotty/tools/dotc/parsing/Tokens.scala | 2 +- .../dotty/tools/dotc/parsing/package.scala | 4 +- .../dotc/parsing/xml/MarkupParserCommon.scala | 2 +- .../dotc/parsing/xml/MarkupParsers.scala | 12 +- .../dotc/parsing/xml/SymbolicXMLBuilder.scala | 12 +- .../tools/dotc/parsing/xml/Utility.scala | 4 +- .../src/dotty/tools/dotc/plugins/Plugin.scala | 8 +- .../dotty/tools/dotc/plugins/Plugins.scala | 8 +- .../tools/dotc/printing/Formatting.scala | 8 +- .../tools/dotc/printing/Highlighting.scala | 2 +- .../tools/dotc/printing/MessageLimiter.scala | 4 +- .../tools/dotc/printing/PlainPrinter.scala | 12 +- .../dotty/tools/dotc/printing/Printer.scala | 4 +- .../tools/dotc/printing/RefinedPrinter.scala | 36 +- .../tools/dotc/printing/ReplPrinter.scala | 12 +- .../dotty/tools/dotc/printing/Showable.scala | 4 +- .../dotc/printing/SyntaxHighlighting.scala | 8 +- .../tools/dotc/profile/AsyncHelper.scala | 4 +- .../dotty/tools/dotc/profile/Profiler.scala | 6 +- .../dotty/tools/dotc/quoted/Interpreter.scala | 26 +- .../tools/dotc/quoted/MacroExpansion.scala | 2 +- .../tools/dotc/quoted/PickledQuotes.scala | 20 +- .../dotty/tools/dotc/quoted/QuoteUtils.scala | 6 +- .../dotty/tools/dotc/quoted/QuotesCache.scala | 4 +- .../dotc/quoted/reflect/FromSymbol.scala | 10 +- compiler/src/dotty/tools/dotc/report.scala | 10 +- .../dotc/reporting/ConsoleReporter.scala | 2 +- .../tools/dotc/reporting/Diagnostic.scala | 4 +- .../tools/dotc/reporting/DidYouMean.scala | 4 +- .../dotc/reporting/ExploringReporter.scala | 2 +- .../reporting/HideNonSensicalMessages.scala | 2 +- .../dotc/reporting/MessageRendering.scala | 10 +- .../dotty/tools/dotc/reporting/Reporter.scala | 10 +- .../tools/dotc/reporting/StoreReporter.scala | 4 +- .../tools/dotc/reporting/TestReporter.scala | 2 +- .../dotc/reporting/ThrowingReporter.scala | 2 +- .../reporting/UniqueMessagePositions.scala | 2 +- .../dotty/tools/dotc/reporting/WConf.scala | 6 +- .../dotty/tools/dotc/reporting/messages.scala | 18 +- .../dotty/tools/dotc/rewrites/Rewrites.scala | 4 +- .../src/dotty/tools/dotc/sbt/APIUtils.scala | 12 +- .../src/dotty/tools/dotc/sbt/ExtractAPI.scala | 28 +- .../tools/dotc/sbt/ExtractDependencies.scala | 24 +- .../src/dotty/tools/dotc/sbt/ShowAPI.scala | 2 +- .../tools/dotc/semanticdb/ConstantOps.scala | 2 +- .../dotc/semanticdb/ExtractSemanticDB.scala | 18 +- .../dotty/tools/dotc/semanticdb/PPrint.scala | 2 +- .../dotty/tools/dotc/semanticdb/Scala3.scala | 8 +- .../semanticdb/SemanticSymbolBuilder.scala | 8 +- .../dotc/semanticdb/SyntheticsExtractor.scala | 6 +- .../dotty/tools/dotc/semanticdb/Tools.scala | 8 +- .../dotty/tools/dotc/semanticdb/TypeOps.scala | 8 +- .../dotc/semanticdb/generated/Access.scala | 178 +++---- .../semanticdb/generated/Annotation.scala | 26 +- .../dotc/semanticdb/generated/Constant.scala | 286 +++++------ .../semanticdb/generated/Diagnostic.scala | 50 +- .../semanticdb/generated/Documentation.scala | 50 +- .../dotc/semanticdb/generated/Language.scala | 18 +- .../dotc/semanticdb/generated/Location.scala | 26 +- .../dotc/semanticdb/generated/Range.scala | 32 +- .../dotc/semanticdb/generated/Schema.scala | 18 +- .../dotc/semanticdb/generated/Scope.scala | 24 +- .../dotc/semanticdb/generated/Signature.scala | 128 ++--- .../generated/SymbolInformation.scala | 136 +++--- .../generated/SymbolOccurrence.scala | 46 +- .../dotc/semanticdb/generated/Synthetic.scala | 26 +- .../semanticdb/generated/TextDocument.scala | 34 +- .../semanticdb/generated/TextDocuments.scala | 24 +- .../dotc/semanticdb/generated/Tree.scala | 222 ++++----- .../dotc/semanticdb/generated/Type.scala | 444 +++++++++--------- .../internal/SemanticdbInputStream.scala | 2 +- .../internal/SemanticdbOutputStream.scala | 2 +- .../tools/dotc/staging/CrossStageSafety.scala | 20 +- .../dotty/tools/dotc/staging/HealType.scala | 14 +- .../tools/dotc/staging/QuoteTypeTags.scala | 8 +- .../tools/dotc/staging/StagingLevel.scala | 10 +- .../dotc/staging/TreeMapWithStages.scala | 8 +- .../tools/dotc/transform/AccessProxies.scala | 24 +- .../tools/dotc/transform/ArrayApply.scala | 14 +- .../dotc/transform/ArrayConstructors.scala | 14 +- .../tools/dotc/transform/BeanProperties.scala | 20 +- .../tools/dotc/transform/BetaReduce.scala | 12 +- .../dotty/tools/dotc/transform/Bridges.scala | 8 +- .../tools/dotc/transform/CapturedVars.scala | 18 +- .../transform/CheckLoopingImplicits.scala | 2 +- .../dotc/transform/CheckNoSuperThis.scala | 2 +- .../tools/dotc/transform/CheckReentrant.scala | 14 +- .../tools/dotc/transform/CheckShadowing.scala | 6 +- .../tools/dotc/transform/CheckStatic.scala | 16 +- .../tools/dotc/transform/CheckUnused.scala | 12 +- .../dotc/transform/CollectEntryPoints.scala | 10 +- .../transform/CollectNullableFields.scala | 8 +- .../dotc/transform/CompleteJavaEnums.scala | 26 +- .../tools/dotc/transform/Constructors.scala | 26 +- .../transform/ContextFunctionResults.scala | 6 +- .../tools/dotc/transform/CookComments.scala | 4 +- .../dotc/transform/CountOuterAccesses.scala | 12 +- .../dotty/tools/dotc/transform/CtxLazy.scala | 2 +- .../tools/dotc/transform/Dependencies.scala | 2 +- .../tools/dotc/transform/DropBreaks.scala | 8 +- .../DropEmptyCompanions.scala.disabled | 16 +- .../dotc/transform/DropOuterAccessors.scala | 18 +- .../tools/dotc/transform/ElimByName.scala | 12 +- .../dotc/transform/ElimErasedValueType.scala | 14 +- .../tools/dotc/transform/ElimOpaque.scala | 18 +- .../dotc/transform/ElimOuterSelect.scala | 8 +- .../dotc/transform/ElimPackagePrefixes.scala | 8 +- .../dotc/transform/ElimPolyFunction.scala | 12 +- .../tools/dotc/transform/ElimRepeated.scala | 22 +- .../tools/dotc/transform/ElimStaticThis.scala | 8 +- .../dotty/tools/dotc/transform/Erasure.scala | 48 +- .../tools/dotc/transform/EtaReduce.scala | 2 +- .../tools/dotc/transform/ExpandPrivate.scala | 18 +- .../tools/dotc/transform/ExpandSAMs.scala | 12 +- .../tools/dotc/transform/ExplicitOuter.scala | 28 +- .../tools/dotc/transform/ExplicitSelf.scala | 6 +- .../dotc/transform/ExtensionMethods.scala | 18 +- .../tools/dotc/transform/FirstTransform.scala | 24 +- .../dotty/tools/dotc/transform/Flatten.scala | 8 +- .../dotc/transform/FullParameterization.scala | 16 +- .../transform/FunctionXXLForwarders.scala | 20 +- .../dotc/transform/GenericSignatures.scala | 16 +- .../dotty/tools/dotc/transform/Getters.scala | 20 +- .../tools/dotc/transform/HoistSuperArgs.scala | 20 +- .../tools/dotc/transform/InlinePatterns.scala | 12 +- .../tools/dotc/transform/InlineVals.scala | 12 +- .../dotty/tools/dotc/transform/Inlining.scala | 16 +- .../dotc/transform/Instrumentation.scala | 18 +- .../dotc/transform/InterceptedMethods.scala | 10 +- .../IsInstanceOfEvaluator.scala.disabled | 10 +- .../tools/dotc/transform/LambdaLift.scala | 26 +- .../dotty/tools/dotc/transform/LazyVals.scala | 8 +- .../tools/dotc/transform/LetOverApply.scala | 8 +- .../dotc/transform/Literalize.scala.disabled | 20 +- .../dotc/transform/MacroAnnotations.scala | 2 +- .../tools/dotc/transform/MacroTransform.scala | 10 +- .../tools/dotc/transform/MegaPhase.scala | 10 +- .../dotty/tools/dotc/transform/Memoize.scala | 26 +- .../dotty/tools/dotc/transform/Mixin.scala | 34 +- .../dotty/tools/dotc/transform/MixinOps.scala | 12 +- .../tools/dotc/transform/MoveStatics.scala | 18 +- .../dotc/transform/NonLocalReturns.scala | 12 +- .../dotc/transform/OverridingPairs.scala | 6 +- .../dotc/transform/ParamForwarding.scala | 8 +- .../tools/dotc/transform/PatternMatcher.scala | 26 +- .../tools/dotc/transform/PickleQuotes.scala | 32 +- .../dotty/tools/dotc/transform/Pickler.scala | 16 +- .../tools/dotc/transform/PostInlining.scala | 2 +- .../tools/dotc/transform/PostTyper.scala | 14 +- .../dotc/transform/ProtectedAccessors.scala | 12 +- .../dotc/transform/PruneErasedDefs.scala | 18 +- .../tools/dotc/transform/PureStats.scala | 10 +- .../tools/dotc/transform/ReifiedReflect.scala | 26 +- .../transform/RepeatableAnnotations.scala | 18 +- .../tools/dotc/transform/ResolveSuper.scala | 32 +- .../tools/dotc/transform/RestoreScopes.scala | 10 +- .../tools/dotc/transform/SelectStatic.scala | 14 +- .../tools/dotc/transform/SeqLiterals.scala | 8 +- .../tools/dotc/transform/SetRootTree.scala | 2 +- .../transform/SpecializeApplyMethods.scala | 8 +- .../dotc/transform/SpecializeFunctions.scala | 8 +- .../dotty/tools/dotc/transform/Splicer.scala | 14 +- .../dotty/tools/dotc/transform/Splicing.scala | 32 +- .../dotty/tools/dotc/transform/Staging.scala | 16 +- .../tools/dotc/transform/SuperAccessors.scala | 14 +- .../dotty/tools/dotc/transform/SymUtils.scala | 24 +- .../dotc/transform/SyntheticMembers.scala | 20 +- .../dotty/tools/dotc/transform/TailRec.scala | 2 +- .../dotc/transform/TransformWildcards.scala | 8 +- .../tools/dotc/transform/TreeChecker.scala | 36 +- .../tools/dotc/transform/TreeExtractors.scala | 8 +- .../dotc/transform/TryCatchPatterns.scala | 10 +- .../dotc/transform/TupleOptimizations.scala | 20 +- .../tools/dotc/transform/TypeTestsCasts.scala | 20 +- .../tools/dotc/transform/TypeUtils.scala | 8 +- .../dotc/transform/UncacheGivenAliases.scala | 12 +- .../dotc/transform/UninitializedDefs.scala | 10 +- .../dotc/transform/VCElideAllocations.scala | 10 +- .../dotc/transform/VCInlineMethods.scala | 10 +- .../tools/dotc/transform/ValueClasses.scala | 16 +- .../dotc/transform/YCheckPositions.scala | 10 +- .../tools/dotc/transform/init/Checker.scala | 20 +- .../tools/dotc/transform/init/Errors.scala | 6 +- .../tools/dotc/transform/init/Trace.scala | 2 +- .../transform/localopt/FormatChecker.scala | 6 +- .../localopt/StringInterpolatorOpt.scala | 10 +- .../tools/dotc/transform/patmat/Space.scala | 34 +- .../transform/sjs/AddLocalJSFakeNews.scala | 10 +- .../transform/sjs/ExplicitJSClasses.scala | 32 +- .../dotc/transform/sjs/JSExportUtils.scala | 4 +- .../tools/dotc/transform/sjs/JSSymUtils.scala | 24 +- .../transform/sjs/JUnitBootstrappers.scala | 24 +- .../dotc/transform/sjs/PrepJSExports.scala | 24 +- .../dotc/transform/sjs/PrepJSInterop.scala | 32 +- .../dotty/tools/dotc/typer/Applications.scala | 40 +- .../src/dotty/tools/dotc/typer/Checking.scala | 46 +- .../dotty/tools/dotc/typer/ConstFold.scala | 20 +- .../src/dotty/tools/dotc/typer/Deriving.scala | 16 +- .../dotty/tools/dotc/typer/Docstrings.scala | 4 +- .../src/dotty/tools/dotc/typer/Dynamic.scala | 4 +- .../tools/dotc/typer/ErrorReporting.scala | 16 +- .../dotty/tools/dotc/typer/EtaExpansion.scala | 22 +- .../dotty/tools/dotc/typer/Implicits.scala | 40 +- .../dotty/tools/dotc/typer/ImportInfo.scala | 4 +- .../tools/dotc/typer/ImportSuggestions.scala | 10 +- .../dotty/tools/dotc/typer/Inferencing.scala | 20 +- .../dotty/tools/dotc/typer/JavaChecks.scala | 4 +- .../src/dotty/tools/dotc/typer/Namer.scala | 34 +- .../dotty/tools/dotc/typer/Nullables.scala | 12 +- .../dotty/tools/dotc/typer/ProtoTypes.scala | 16 +- .../tools/dotc/typer/QuotesAndSplices.scala | 34 +- .../src/dotty/tools/dotc/typer/ReTyper.scala | 18 +- .../dotty/tools/dotc/typer/RefChecks.scala | 26 +- .../dotty/tools/dotc/typer/Synthesizer.scala | 20 +- .../dotty/tools/dotc/typer/TypeAssigner.scala | 12 +- .../src/dotty/tools/dotc/typer/Typer.scala | 76 +-- .../dotty/tools/dotc/typer/TyperPhase.scala | 10 +- .../tools/dotc/typer/VarianceChecker.scala | 14 +- .../tools/dotc/util/CommentParsing.scala | 2 +- .../src/dotty/tools/dotc/util/LRUCache.scala | 2 +- .../tools/dotc/util/NameTransformer.scala | 2 +- .../dotty/tools/dotc/util/ParsedComment.scala | 4 +- .../tools/dotc/util/ReusableInstance.scala | 2 +- .../dotty/tools/dotc/util/ShowPickled.scala | 4 +- .../dotty/tools/dotc/util/Signatures.scala | 10 +- .../tools/dotc/util/SixteenNibbles.scala | 2 +- .../dotty/tools/dotc/util/SourceFile.scala | 12 +- .../tools/dotc/util/SourcePosition.scala | 2 +- .../src/dotty/tools/dotc/util/Stats.scala | 2 +- .../src/dotty/tools/dotc/util/Store.scala | 2 +- .../dotty/tools/dotc/util/WeakHashSet.scala | 4 +- compiler/src/dotty/tools/dotc/util/kwords.sc | 6 +- compiler/src/dotty/tools/io/ClassPath.scala | 2 +- compiler/src/dotty/tools/io/File.scala | 2 +- compiler/src/dotty/tools/io/Jar.scala | 8 +- compiler/src/dotty/tools/io/JarArchive.scala | 2 +- compiler/src/dotty/tools/io/Path.scala | 6 +- compiler/src/dotty/tools/io/ZipArchive.scala | 4 +- .../tools/repl/CollectTopLevelImports.scala | 4 +- .../src/dotty/tools/repl/JLineTerminal.scala | 10 +- .../src/dotty/tools/repl/ParseResult.scala | 2 +- compiler/src/dotty/tools/repl/Rendering.scala | 2 +- .../src/dotty/tools/repl/ReplCommand.scala | 2 +- .../src/dotty/tools/repl/ReplCompiler.scala | 24 +- .../src/dotty/tools/repl/ReplDriver.scala | 18 +- .../src/dotty/tools/runner/ObjectRunner.scala | 2 +- .../quoted/runtime/impl/QuotesImpl.scala | 12 +- .../quoted/runtime/impl/ScopeException.scala | 2 +- .../quoted/runtime/impl/SpliceScope.scala | 2 +- .../runtime/impl/printers/Extractors.scala | 6 +- .../runtime/impl/printers/SourceCode.scala | 6 +- library/src/scala/Tuple.scala | 8 +- .../scala/annotation/MacroAnnotation.scala | 4 +- .../scala/annotation/constructorOnly.scala | 2 +- library/src/scala/annotation/newMain.scala | 4 +- library/src/scala/annotation/static.scala | 2 +- library/src/scala/compiletime/ops/any.scala | 10 +- .../src/scala/compiletime/ops/boolean.scala | 8 +- .../src/scala/compiletime/ops/double.scala | 32 +- library/src/scala/compiletime/ops/float.scala | 32 +- library/src/scala/compiletime/ops/int.scala | 50 +- library/src/scala/compiletime/ops/long.scala | 46 +- .../src/scala/compiletime/ops/string.scala | 10 +- library/src/scala/quoted/Expr.scala | 6 +- library/src/scala/quoted/ExprMap.scala | 2 +- library/src/scala/quoted/FromExpr.scala | 2 +- library/src/scala/quoted/Quotes.scala | 34 +- library/src/scala/quoted/ToExpr.scala | 20 +- library/src/scala/quoted/Varargs.scala | 4 +- library/src/scala/util/FromDigits.scala | 2 +- 416 files changed, 3194 insertions(+), 3194 deletions(-) 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 974f26f7adeb..84f1756781cd 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 c36c8c546635..46732bf868fc 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala @@ -13,20 +13,20 @@ import scala.collection.mutable 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 @@ -44,12 +44,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. @@ -700,10 +700,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. @@ -851,7 +851,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 42f8ef7f4ef6..0e726b39908e 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 5539bf44aa17..c255ffecec19 100644 --- a/compiler/src/dotty/tools/backend/jvm/BTypes.scala +++ b/compiler/src/dotty/tools/backend/jvm/BTypes.scala @@ -40,7 +40,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 884dd19ee64f..992f3a3b3489 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] @@ -285,7 +285,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) @@ -311,7 +311,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 30919605c584..c4f9f3c8368f 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/CodeGen.scala b/compiler/src/dotty/tools/backend/jvm/CodeGen.scala index 4e00597d5b96..85b865696819 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 @@ -27,8 +27,8 @@ import java.nio.channels.ClosedByInterruptException import dotty.tools.tasty.{ TastyBuffer, TastyHeaderUnpickler } 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 @@ -36,7 +36,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 30ad6b29b9f0..2af67b3040a6 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 dotty.tools.dotc.core.Contexts.Context /** @@ -218,7 +218,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 b2278c3f0ce8..86ffc98283a3 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 469a6ea57679..2bd469b31a0d 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 class GenBCode extends Phase { self => diff --git a/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala b/compiler/src/dotty/tools/backend/jvm/GenericSignatureVisitor.scala index c16bc70fc3b0..ae1df331caef 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 80ee68bc94c3..c94af49ab8b5 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 def backendReporting: BackendReporting 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 67e828ea9894..ff3a0684a8c9 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 import scala.reflect.NameTransformer @@ -55,15 +55,15 @@ import scala.reflect.NameTransformer * - `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) @@ -1828,7 +1828,7 @@ class JSCodeGen()(using genCtx: Context) { } case Literal(value) => - import Constants._ + import Constants.* value.tag match { case UnitTag => js.Skip() @@ -2526,7 +2526,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 @@ -2566,7 +2566,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 @@ -2607,7 +2607,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 @@ -2647,7 +2647,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 => @@ -2769,7 +2769,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 @@ -2824,7 +2824,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. @@ -2932,7 +2932,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 @@ -3767,7 +3767,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 @@ -4697,7 +4697,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 5336d60129ac..cfd6e243ca32 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 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 5f5e9fc799b5..bb39c1fd1b36 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 c121fbaf7c00..54b111bee427 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 9cf15a83758e..834a25b901cb 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -1,13 +1,13 @@ package dotty.tools package dotc -import core._ -import Contexts._ +import core.* +import Contexts.* import typer.{TyperPhase, RefChecks} import cc.CheckCaptures 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 40a343fb1267..117d1c9ce65c 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 e3fe2b9a2503..9def22feb849 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 @@ -21,8 +21,8 @@ import config.Printers import scala.annotation.internal.sharable 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 dd783be7a9e1..f0ee139565ad 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 @@ -163,7 +163,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 7cd6ef96b4f5..eac65b2d1e80 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 @@ -376,7 +376,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 { @@ -484,8 +484,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 955892b2ae22..06af2cdc31a9 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 79bef5cc1b0b..7652dcfc9928 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 89c0fcfc146c..441068ef39e1 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 d0deb4d21d58..32a09b6e0db1 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 758486532512..edd7d5aeb71e 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 1411493bcbfd..110c48b887a2 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 e750d9ccacc0..39b1ae5f4277 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 865f95551a0b..56ca9162d9de 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 e241feee8244..4595f7978999 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 e5ab8f65f55b..aab13fba1731 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 2b2f35e49451..e2d4cae3b553 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 0faacf1bcebb..db05996d98fd 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 c07e9b0e5eb0..826f56e5330e 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.* class ScalaSettings extends SettingGroup with AllScalaSettings 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 d992f5bdf2ee..c8522e529a5c 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 37bce69e008b..21014e958c4b 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 d2b1246a8149..8699be3cadd3 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} trait ConstraintRunInfo { self: Run => diff --git a/compiler/src/dotty/tools/dotc/core/ContextOps.scala b/compiler/src/dotty/tools/dotc/core/ContextOps.scala index b417901fd9df..920da377f9b4 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 20b553149edb..d3ba2b572a2b 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 8ae4cb4ceee2..f41faf2358a9 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 43b7d01fc3c9..87f21738841f 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 @@ -41,7 +41,7 @@ object Definitions { * */ class Definitions { - import Definitions._ + import Definitions.* private var initCtx: Context = _ 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 e56cc453d34d..82f47478a7c2 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 bb65cce84042..44ce31b27a73 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 60ebc95e7bed..a52c6e0a7c3e 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 @@ -16,7 +16,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 11abe43732db..88b5308c058d 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 a844f5f17689..40ef270ac813 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 644cbfbdb5a8..a29b62a8d5f4 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 0328cea9b3ca..aacd2af3b85a 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 @@ -124,7 +124,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 d6a49186b539..b537cd005b3e 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 99076b422358..a5c6ee94338e 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 f2624e26cba5..fb388a1d518e 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 3e32340b21bd..9e26f5c37ac2 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 33e8743815c9..3afae80ef0f2 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, Setup, EventuallyCapturingType, isEventuallyCapturingType} 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 9eb67b468cfa..6ee87cb381bc 100644 --- a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala +++ b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala @@ -10,11 +10,11 @@ import scala.util.control.NonFatal 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 -import Decorators._ +import Decorators.* import util.Stats import reporting.trace @@ -26,7 +26,7 @@ import parsing.Parsers.OutlineParser 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 7cad8bd0e250..e914dfaa8d3c 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 8ce0da9bc50f..3bac4474a6c4 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 @@ -155,7 +155,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 585c2ab2fdae..5d04ee48a31e 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 @@ -28,7 +28,7 @@ import cc.{CapturingType, derivedCapturingType, CaptureSet, stripCapturing, isBo /** 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 @@ -3212,7 +3212,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 515c92926600..2d918e6ed3d9 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 512467e9669d..f1575b538e22 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 6478e7332e4b..01dd0cd4664e 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 d2df2a2aebef..f8ba6d526a71 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 diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index cda0a9d1efcd..7ec82eb6707f 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 { @@ -3820,7 +3820,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 71e00f985584..5b0e7bd873cd 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.{ ByteArrayOutputStream, IOException } import java.lang.Integer.toHexString @@ -57,8 +57,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/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 9c66e43eae80..962ed26c9604 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala @@ -7,12 +7,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] = _ private var mySpans: util.HashMap[Addr, Span] = _ 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 70bdec7780e2..61c69dac98be 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala @@ -5,12 +5,12 @@ package tasty import scala.language.unsafeNulls import dotty.tools.tasty.{TastyFormat, TastyBuffer, TastyReader, TastyHeaderUnpickler} -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 { @@ -26,10 +26,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 bdb693d19648..ce4fde3896af 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} @@ -26,9 +26,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) @@ -722,7 +722,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) { @@ -737,7 +737,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 06fff6d57957..25c92db22885 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 cc.{adaptFunctionTypeUnderPureFuns, adaptByNameArgUnderPureFuns} 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 @@ -56,8 +56,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] @@ -120,7 +120,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 @@ -147,7 +147,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 9fb696b23ef7..a59d3ec42d43 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.* import cc.{adaptFunctionTypeUnderPureFuns, adaptByNameArgUnderPureFuns} object Scala2Unpickler { @@ -147,7 +147,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 455b6c89a0ba..3330e9118102 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 cabccb6e49f2..a444c899c092 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 98e7aeace3e2..91b549f3ca45 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 c63409d0d52b..a8b243a2329d 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.* abstract class CharArrayReader { self => diff --git a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala index 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 c9dd9924eae7..dd049ef6f9d1 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) @@ -1247,7 +1247,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 2c8eb51a79db..f1e9e646bf43 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 8a20009f1927..2127aea5533b 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 b3f41fab9eaa..5763e671e75a 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala @@ -11,13 +11,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 @@ -38,7 +38,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 0e70cc077fa4..28eced07d188 100644 --- a/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala +++ b/compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala @@ -6,12 +6,12 @@ package xml import scala.language.unsafeNulls 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. @@ -28,7 +28,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 c44fe4cf59b4..f147773021c3 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 } /** Support for run-time loading of compiler plugins. diff --git a/compiler/src/dotty/tools/dotc/printing/Formatting.scala b/compiler/src/dotty/tools/dotc/printing/Formatting.scala index 3f32b29654c9..548f4066f192 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 7f8adba690c7..3dfd9150e87c 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 04cea9fb9702..fb72b8d472d5 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 2bacbe7f9036..f8fca4b6767d 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 @@ -342,7 +342,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 @@ -769,7 +769,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) @@ -912,7 +912,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/AsyncHelper.scala b/compiler/src/dotty/tools/dotc/profile/AsyncHelper.scala index 61bee4d9f32a..0b9d95cb5c9a 100644 --- a/compiler/src/dotty/tools/dotc/profile/AsyncHelper.scala +++ b/compiler/src/dotty/tools/dotc/profile/AsyncHelper.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 AsyncHelper { 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/quoted/Interpreter.scala b/compiler/src/dotty/tools/dotc/quoted/Interpreter.scala index ccf6cd6f995b..e42d809853e3 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 @@ -326,7 +326,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 retruns 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/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 98fd7da3032a..4b7806731453 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 af1a5c0f0f47..1086e7368877 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 2543a3aee904..08c0430c17f4 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 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 @@ -1680,7 +1680,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) => @@ -2249,7 +2249,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 5ecf17be32a9..c0c8f47648de 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 ac3136340625..cba7b27f7e47 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala @@ -8,22 +8,22 @@ import java.nio.file.Path import java.util.{Arrays, EnumSet} import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.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} import xsbti.UseScope import xsbti.api.DependencyContext -import xsbti.api.DependencyContext._ +import xsbti.api.DependencyContext.* import scala.collection.{Set, mutable} @@ -48,7 +48,7 @@ import scala.collection.{Set, mutable} * @see ExtractAPI */ class ExtractDependencies extends Phase { - import ExtractDependencies._ + import ExtractDependencies.* override def phaseName: String = ExtractDependencies.name @@ -191,7 +191,7 @@ private final class UsedNamesInClass { * inheritance" in the "Name hashing algorithm" section. */ private class ExtractDependenciesCollector extends tpd.TreeTraverser { thisTreeTraverser => - import tpd._ + import tpd.* private val _usedNames = new mutable.HashMap[Symbol, UsedNamesInClass] private val _dependencies = new mutable.HashSet[ClassDependency] 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 1d5abfc109ed..1832eeabca7e 100644 --- a/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala +++ b/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala @@ -2,18 +2,18 @@ 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.staging.StagingLevel.* import dotty.tools.dotc.staging.QuoteTypeTags.* 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. @@ -51,7 +51,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 aafb64b33444..f98d71e3ff67 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 8964beb26051..42099fba3d49 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 @@ -19,7 +19,7 @@ import dotty.tools.uncheckedNN */ class CapturedVars extends MiniPhase with IdentityDenotTransformer: thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = CapturedVars.name 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 dd70b6062167..e465e42fe8d8 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 import Types.* @@ -29,7 +29,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 @@ -357,7 +357,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 41453aa62b50..0bb54f8c9345 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 808cf928ecc2..003aa3662c12 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.* /** Utility class for lazy values whose evaluation depends on a context. * This should be used whenever the evaluation of a lazy expression diff --git a/compiler/src/dotty/tools/dotc/transform/Dependencies.scala b/compiler/src/dotty/tools/dotc/transform/Dependencies.scala index 08189e107d94..ea32f513f5bb 100644 --- a/compiler/src/dotty/tools/dotc/transform/Dependencies.scala +++ b/compiler/src/dotty/tools/dotc/transform/Dependencies.scala @@ -13,7 +13,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_` which were introduced by * inlining to outer paths. */ class ElimOuterSelect extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ElimOuterSelect.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala b/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala index 83349f1f6199..6c577a872c56 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimPackagePrefixes.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import core._ -import Decorators._, Flags._, Types._, Contexts._, Symbols._ -import ast.tpd._ -import Flags._ +import core.* +import Decorators.*, Flags.*, Types.*, Contexts.*, Symbols.* +import ast.tpd.* +import Flags.* import MegaPhase.MiniPhase /** Eliminates syntactic references to package terms as prefixes of classes, so that there's no chance diff --git a/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala b/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala index 756ddd9bf0eb..3ed337ee3a4a 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimPolyFunction.scala @@ -2,11 +2,11 @@ package dotty.tools.dotc package transform import ast.{Trees, tpd} -import core._, core.Decorators._ -import MegaPhase._, Phases.Phase -import Types._, Contexts._, Constants._, Names._, NameOps._, Flags._, DenotTransformers._ -import SymDenotations._, Symbols._, StdNames._, Annotations._, Trees._, Scopes._, Denotations._ -import TypeErasure.ErasedValueType, ValueClasses._ +import core.*, core.Decorators.* +import MegaPhase.*, Phases.Phase +import Types.*, Contexts.*, Constants.*, Names.*, NameOps.*, Flags.*, DenotTransformers.* +import SymDenotations.*, Symbols.*, StdNames.*, Annotations.*, Trees.*, Scopes.*, Denotations.* +import TypeErasure.ErasedValueType, ValueClasses.* /** This phase rewrite PolyFunction subclasses to FunctionN subclasses * @@ -20,7 +20,7 @@ import TypeErasure.ErasedValueType, ValueClasses._ */ class ElimPolyFunction extends MiniPhase with DenotTransformer { - import tpd._ + import tpd.* override def phaseName: String = ElimPolyFunction.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala b/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala index 359b882ef26b..b98d7d525089 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala @@ -2,17 +2,17 @@ package dotty.tools package dotc package transform -import core._ +import core.* import StdNames.nme -import Types._ -import transform.MegaPhase._ -import Flags._ -import Contexts._ -import Symbols._ -import Decorators._ -import Denotations._, SymDenotations._ -import DenotTransformers._ -import NullOpsDecorator._ +import Types.* +import transform.MegaPhase.* +import Flags.* +import Contexts.* +import Symbols.* +import Decorators.* +import Denotations.*, SymDenotations.* +import DenotTransformers.* +import NullOpsDecorator.* object ElimRepeated { val name: String = "elimRepeated" @@ -24,7 +24,7 @@ object ElimRepeated { * the transformed type if needed. */ class ElimRepeated extends MiniPhase with InfoTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ElimRepeated.name diff --git a/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala b/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala index 02612253c735..e2940532d463 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimStaticThis.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ -import Flags._ +import core.* +import Contexts.* +import Flags.* import dotty.tools.dotc.ast.tpd import MegaPhase.MiniPhase import dotty.tools.dotc.core.Types.{ThisType, TermRef} @@ -12,7 +12,7 @@ import dotty.tools.dotc.core.Types.{ThisType, TermRef} * corresponding modules. */ class ElimStaticThis extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ElimStaticThis.name diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 2ebf5f2ed954..cd0eb048e040 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -2,39 +2,39 @@ package dotty.tools package dotc package transform -import core.Phases._ -import core.DenotTransformers._ -import core.Denotations._ -import core.SymDenotations._ -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Names._ -import core.StdNames._ -import core.NameOps._ +import core.Phases.* +import core.DenotTransformers.* +import core.Denotations.* +import core.SymDenotations.* +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Names.* +import core.StdNames.* +import core.NameOps.* import core.NameKinds.{AdaptedClosureName, BodyRetainerName, DirectMethName} import core.Scopes.newScopeWith -import core.Decorators._ -import core.Constants._ -import core.Definitions._ +import core.Decorators.* +import core.Constants.* +import core.Definitions.* import core.Annotations.BodyAnnotation import typer.NoChecking import inlines.Inlines -import typer.ProtoTypes._ +import typer.ProtoTypes.* import typer.ErrorReporting.errorTree import typer.Checking.checkValue -import core.TypeErasure._ -import core.Decorators._ +import core.TypeErasure.* +import core.Decorators.* import dotty.tools.dotc.ast.{tpd, untpd} import ast.TreeTypeMap import dotty.tools.dotc.core.{Constants, Flags} -import ValueClasses._ -import TypeUtils._ -import ContextFunctionResults._ -import ExplicitOuter._ +import ValueClasses.* +import TypeUtils.* +import ContextFunctionResults.* +import ExplicitOuter.* import core.Mode import util.Property -import reporting._ +import reporting.* class Erasure extends Phase with DenotTransformer { @@ -200,8 +200,8 @@ class Erasure extends Phase with DenotTransformer { } object Erasure { - import tpd._ - import TypeTestsCasts._ + import tpd.* + import TypeTestsCasts.* val name: String = "erasure" val description: String = "rewrite types to JVM model" @@ -539,7 +539,7 @@ object Erasure { end Boxing class Typer(erasurePhase: DenotTransformer) extends typer.ReTyper with NoChecking { - import Boxing._ + import Boxing.* def isErased(tree: Tree)(using Context): Boolean = tree match { case TypeApply(Select(qual, _), _) if tree.symbol == defn.Any_typeCast => diff --git a/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala b/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala index cf62cffd4cdb..b8b10d355ede 100644 --- a/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala +++ b/compiler/src/dotty/tools/dotc/transform/EtaReduce.scala @@ -28,7 +28,7 @@ import NameKinds.AdaptedClosureName * to performance degradation, and in some cases, stack overflows. */ class EtaReduce extends MiniPhase: - import ast.tpd._ + import ast.tpd.* override def phaseName: String = EtaReduce.name diff --git a/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala b/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala index 41e5b76ca874..fa2492a261d5 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala @@ -1,18 +1,18 @@ package dotty.tools.dotc package transform -import core._ +import core.* import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer -import Contexts._ -import Symbols._ -import Flags._ -import SymDenotations._ +import Contexts.* +import Symbols.* +import Flags.* +import SymDenotations.* -import Decorators._ -import MegaPhase._ +import Decorators.* +import MegaPhase.* import java.io.File.separatorChar -import ValueClasses._ +import ValueClasses.* /** Make private term members that are accessed from another class * non-private by resetting the Private flag and expanding their name. @@ -29,7 +29,7 @@ import ValueClasses._ * and https://github.com/lampepfl/dotty/issues/783 */ class ExpandPrivate extends MiniPhase with IdentityDenotTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ExpandPrivate.name diff --git a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala index a933b247a85f..532ceab0ff2f 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala @@ -2,12 +2,12 @@ package dotty.tools package dotc package transform -import core._ +import core.* import Scopes.newScope -import Contexts._, Symbols._, Types._, Flags._, Decorators._, StdNames._, Constants._ -import MegaPhase._ -import SymUtils._ -import NullOpsDecorator._ +import Contexts.*, Symbols.*, Types.*, Flags.*, Decorators.*, StdNames.*, Constants.* +import MegaPhase.* +import SymUtils.* +import NullOpsDecorator.* import ast.untpd /** Expand SAM closures that cannot be represented by the JVM as lambdas to anonymous classes. @@ -37,7 +37,7 @@ object ExpandSAMs: case _ => false class ExpandSAMs extends MiniPhase: - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ExpandSAMs.name diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index deb1f665c022..b197d23f0b94 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -2,19 +2,19 @@ package dotty.tools package dotc package transform -import MegaPhase._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Phases._ -import core.Types._ -import core.Flags._ -import core.Decorators._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Phases.* +import core.Types.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme -import core.Names._ -import core.NameOps._ +import core.Names.* +import core.NameOps.* import core.NameKinds.SuperArgName -import SymUtils._ +import SymUtils.* import dotty.tools.dotc.ast.tpd import collection.mutable @@ -35,8 +35,8 @@ import scala.annotation.tailrec * needs to run after pattern matcher as it can add outer checks and force creation of $outer */ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase => - import ExplicitOuter._ - import ast.tpd._ + import ExplicitOuter.* + import ast.tpd.* override def phaseName: String = ExplicitOuter.name @@ -122,7 +122,7 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase => } object ExplicitOuter { - import ast.tpd._ + import ast.tpd.* val name: String = "explicitOuter" val description: String = "add accessors to outer classes from nested ones" diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala index a6f7a29accd7..cd62a55cb8dc 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitSelf.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._, Types._, MegaPhase._, ast.Trees._, Symbols._, Decorators._, Flags._ +import core.* +import Contexts.*, Types.*, MegaPhase.*, ast.Trees.*, Symbols.*, Decorators.*, Flags.* import SymUtils.* /** Transform references of the form @@ -20,7 +20,7 @@ import SymUtils.* * Also replaces idents referring to the self type with ThisTypes. */ class ExplicitSelf extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ExplicitSelf.name diff --git a/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala b/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala index 19124357a0bd..8b3a783745fb 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala @@ -5,17 +5,17 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.transform.MegaPhase._ -import ValueClasses._ +import dotty.tools.dotc.transform.MegaPhase.* +import ValueClasses.* import dotty.tools.dotc.ast.tpd import scala.collection.mutable -import core._ -import Types._, Contexts._, Names._, Flags._, DenotTransformers._, Phases._ -import SymDenotations._, Symbols._, StdNames._, Denotations._ +import core.* +import Types.*, Contexts.*, Names.*, Flags.*, DenotTransformers.*, Phases.* +import SymDenotations.*, Symbols.*, StdNames.*, Denotations.* import TypeErasure.{ valueErasure, ErasedValueType } import NameKinds.{ExtMethName, BodyRetainerName} -import Decorators._ -import TypeUtils._ +import Decorators.* +import TypeUtils.* /** * Perform Step 1 in the inline classes SIP: Creates extension methods for all @@ -38,8 +38,8 @@ import TypeUtils._ */ class ExtensionMethods extends MiniPhase with DenotTransformer with FullParameterization { thisPhase => - import tpd._ - import ExtensionMethods._ + import tpd.* + import ExtensionMethods.* override def phaseName: String = ExtensionMethods.name diff --git a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala index 03639c8af689..ce14d3d3c457 100644 --- a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala @@ -1,21 +1,21 @@ package dotty.tools.dotc package transform -import core._ -import Names._ -import dotty.tools.dotc.transform.MegaPhase._ +import core.* +import Names.* +import dotty.tools.dotc.transform.MegaPhase.* import ast.untpd -import Flags._ -import Types._ +import Flags.* +import Types.* import Constants.Constant -import Contexts._ -import Symbols._ -import Decorators._ +import Contexts.* +import Symbols.* +import Decorators.* import scala.collection.mutable -import DenotTransformers._ -import NameOps._ +import DenotTransformers.* +import NameOps.* import NameKinds.OuterSelectName -import StdNames._ +import StdNames.* import TypeUtils.isErasedValueType import config.Feature import inlines.Inlines.inInlineMethod @@ -37,7 +37,7 @@ object FirstTransform { * if (false) A else B ==> B */ class FirstTransform extends MiniPhase with InfoTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = FirstTransform.name diff --git a/compiler/src/dotty/tools/dotc/transform/Flatten.scala b/compiler/src/dotty/tools/dotc/transform/Flatten.scala index 25df51d0916d..302b6d6277f2 100644 --- a/compiler/src/dotty/tools/dotc/transform/Flatten.scala +++ b/compiler/src/dotty/tools/dotc/transform/Flatten.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import core._ +import core.* import DenotTransformers.SymTransformer -import Contexts._ -import Flags._ +import Contexts.* +import Flags.* import SymDenotations.SymDenotation import collection.mutable import MegaPhase.MiniPhase @@ -12,7 +12,7 @@ import util.Store /** Lift nested classes to toplevel */ class Flatten extends MiniPhase with SymTransformer { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = Flatten.name diff --git a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala index 8ca600577244..eafbd68fe478 100644 --- a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala +++ b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package transform -import core._ -import Types._ -import Contexts._ -import Symbols._ -import Decorators._ -import TypeUtils._ +import core.* +import Types.* +import Contexts.* +import Symbols.* +import Decorators.* +import TypeUtils.* import StdNames.nme -import ast._ +import ast.* /** Provides methods to produce fully parameterized versions of instance methods, * where the `this` of the enclosing class is abstracted out in an extra leading @@ -49,7 +49,7 @@ import ast._ */ trait FullParameterization { - import tpd._ + import tpd.* /** If references to original symbol `referenced` from within fully parameterized method * `derived` should be rewired to some fully parameterized method, the rewiring target symbol, diff --git a/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala b/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala index cc1c0048b68f..4cf176cfda3a 100644 --- a/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala +++ b/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -import core._ +import core.* import Constants.Constant -import Contexts._ -import Flags._ -import Definitions._ -import DenotTransformers._ -import StdNames._ -import Symbols._ -import MegaPhase._ -import Types._ +import Contexts.* +import Flags.* +import Definitions.* +import DenotTransformers.* +import StdNames.* +import Symbols.* +import MegaPhase.* +import Types.* /** This phase adds forwarder for XXL functions `apply` methods that are implemented with a method @@ -23,7 +23,7 @@ import Types._ * is generated. */ class FunctionXXLForwarders extends MiniPhase with IdentityDenotTransformer { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = FunctionXXLForwarders.name diff --git a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala index 21c212e2a28a..77f4f76c33ba 100644 --- a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala +++ b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala @@ -2,20 +2,20 @@ package dotty.tools package dotc package transform -import core.Annotations._ -import core.Contexts._ -import core.Phases._ +import core.Annotations.* +import core.Contexts.* +import core.Phases.* import core.Decorators.* import core.Definitions -import core.Flags._ +import core.Flags.* import core.Names.Name -import core.Symbols._ +import core.Symbols.* import core.TypeApplications.{EtaExpansion, TypeParamInfo} import core.TypeErasure.{erasedGlb, erasure, fullErasure, isGenericArrayElement, tupleArity} -import core.Types._ +import core.Types.* import core.classfile.ClassfileConstants -import SymUtils._ -import TypeUtils._ +import SymUtils.* +import TypeUtils.* import config.Printers.transforms import reporting.trace import java.lang.StringBuilder diff --git a/compiler/src/dotty/tools/dotc/transform/Getters.scala b/compiler/src/dotty/tools/dotc/transform/Getters.scala index ad06bfb0a504..eeb2e868ddc8 100644 --- a/compiler/src/dotty/tools/dotc/transform/Getters.scala +++ b/compiler/src/dotty/tools/dotc/transform/Getters.scala @@ -1,17 +1,17 @@ package dotty.tools.dotc package transform -import core._ +import core.* import DenotTransformers.SymTransformer -import Contexts._ +import Contexts.* import SymDenotations.SymDenotation -import Types._ -import Symbols._ -import MegaPhase._ -import Flags._ -import ValueClasses._ -import SymUtils._ -import NameOps._ +import Types.* +import Symbols.* +import MegaPhase.* +import Flags.* +import ValueClasses.* +import SymUtils.* +import NameOps.* /** Performs the following rewritings for fields of a class: @@ -57,7 +57,7 @@ import NameOps._ * This allows subsequent code motions in Flatten. */ class Getters extends MiniPhase with SymTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = Getters.name diff --git a/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala b/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala index 9a36d65babe8..190150ca8a81 100644 --- a/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala +++ b/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala @@ -1,18 +1,18 @@ package dotty.tools.dotc package transform -import MegaPhase._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* import ast.TreeTypeMap -import core.Types._ -import core.Flags._ -import core.Decorators._ +import core.Types.* +import core.Flags.* +import core.Decorators.* import collection.mutable -import ast.Trees._ +import ast.Trees.* import core.NameKinds.SuperArgName -import SymUtils._ +import SymUtils.* import core.Decorators.* object HoistSuperArgs { @@ -43,7 +43,7 @@ object HoistSuperArgs { * or, if that is a package, it is made a static method of the class itself. */ class HoistSuperArgs extends MiniPhase with IdentityDenotTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = HoistSuperArgs.name diff --git a/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala b/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala index 798f34757b35..18333ae506fd 100644 --- a/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala +++ b/compiler/src/dotty/tools/dotc/transform/InlinePatterns.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package transform -import core._ -import MegaPhase._ -import Symbols._, Contexts._, Types._, Decorators._ -import NameOps._ -import Names._ +import core.* +import MegaPhase.* +import Symbols.*, Contexts.*, Types.*, Decorators.* +import NameOps.* +import Names.* import scala.collection.mutable.ListBuffer @@ -26,7 +26,7 @@ import scala.collection.mutable.ListBuffer * This removes placeholders added by inline `unapply`/`unapplySeq` patterns. */ class InlinePatterns extends MiniPhase: - import ast.tpd._ + import ast.tpd.* override def phaseName: String = InlinePatterns.name diff --git a/compiler/src/dotty/tools/dotc/transform/InlineVals.scala b/compiler/src/dotty/tools/dotc/transform/InlineVals.scala index 047a187bad68..cff1632ffcd2 100644 --- a/compiler/src/dotty/tools/dotc/transform/InlineVals.scala +++ b/compiler/src/dotty/tools/dotc/transform/InlineVals.scala @@ -2,17 +2,17 @@ package dotty.tools package dotc package transform -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase import dotty.tools.dotc.inlines.Inlines /** Check that `tree.rhs` can be right hand-side of an `inline` value definition. */ class InlineVals extends MiniPhase: - import ast.tpd._ + import ast.tpd.* override def phaseName: String = InlineVals.name diff --git a/compiler/src/dotty/tools/dotc/transform/Inlining.scala b/compiler/src/dotty/tools/dotc/transform/Inlining.scala index 10f73fa94e08..bfc44f868cb6 100644 --- a/compiler/src/dotty/tools/dotc/transform/Inlining.scala +++ b/compiler/src/dotty/tools/dotc/transform/Inlining.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package transform -import core._ -import Flags._ -import Contexts._ -import Symbols._ -import SymUtils._ +import core.* +import Flags.* +import Contexts.* +import Symbols.* +import SymUtils.* import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.ast.Trees._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.ast.Trees.* +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.inlines.Inlines import dotty.tools.dotc.ast.TreeMapWithImplicits import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer @@ -19,7 +19,7 @@ import scala.collection.mutable.ListBuffer /** Inlines all calls to inline methods that are not in an inline method or a quote */ class Inlining extends MacroTransform { - import tpd._ + import tpd.* override def phaseName: String = Inlining.name diff --git a/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala b/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala index 046147f20d82..0849018f3fcc 100644 --- a/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala +++ b/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Symbols._ -import Flags._ - -import Decorators._ -import MegaPhase._ -import Names._ +import core.* +import Contexts.* +import Symbols.* +import Flags.* + +import Decorators.* +import MegaPhase.* +import Names.* import Constants.Constant @@ -18,7 +18,7 @@ import Constants.Constant * It does this by generating a call to dotty.tools.dotc.util.Stats.doRecord. */ class Instrumentation extends MiniPhase { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = Instrumentation.name diff --git a/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala b/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala index c95500d856be..c2fdccc2861e 100644 --- a/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala @@ -3,11 +3,11 @@ package transform import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Constants.Constant -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Names.TermName -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase object InterceptedMethods { @@ -23,7 +23,7 @@ object InterceptedMethods { * using the most precise overload available */ class InterceptedMethods extends MiniPhase { - import tpd._ + import tpd.* override def phaseName: String = InterceptedMethods.name diff --git a/compiler/src/dotty/tools/dotc/transform/IsInstanceOfEvaluator.scala.disabled b/compiler/src/dotty/tools/dotc/transform/IsInstanceOfEvaluator.scala.disabled index 68b493a0b9db..f6df2be19dc4 100644 --- a/compiler/src/dotty/tools/dotc/transform/IsInstanceOfEvaluator.scala.disabled +++ b/compiler/src/dotty/tools/dotc/transform/IsInstanceOfEvaluator.scala.disabled @@ -1,11 +1,11 @@ package dotty.tools.dotc package transform -import dotty.tools.dotc.util.Positions._ +import dotty.tools.dotc.util.Positions.* import MegaPhase.MiniPhase -import core._ -import Contexts._, Types._, Constants._, Decorators._, Symbols._ -import TypeUtils._, TypeErasure._, Flags._ +import core.* +import Contexts.*, Types.*, Constants.*, Decorators.*, Symbols.* +import TypeUtils.*, TypeErasure.*, Flags.* /** Implements partial evaluation of `sc.isInstanceOf[Sel]` according to: * @@ -31,7 +31,7 @@ import TypeUtils._, TypeErasure._, Flags._ */ class IsInstanceOfEvaluator extends MiniPhase { - import dotty.tools.dotc.ast.tpd._ + import dotty.tools.dotc.ast.tpd.* val phaseName = "isInstanceOfEvaluator" diff --git a/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala b/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala index 6ec0f330efff..0d8f98c0815e 100644 --- a/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala +++ b/compiler/src/dotty/tools/dotc/transform/LambdaLift.scala @@ -1,25 +1,25 @@ package dotty.tools.dotc package transform -import MegaPhase._ +import MegaPhase.* import core.Denotations.NonSymSingleDenotation -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Flags._ -import core.Decorators._ +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme -import core.Names._ -import core.NameOps._ +import core.Names.* +import core.NameOps.* import core.NameKinds.ExpandPrefixName -import SymUtils._ +import SymUtils.* import ExplicitOuter.outer import util.Store import collection.mutable.{HashMap, LinkedHashMap, ListBuffer} object LambdaLift: - import ast.tpd._ + import ast.tpd.* val name: String = "lambdaLift" val description: String = "lifts out nested functions to class scope" @@ -249,8 +249,8 @@ end LambdaLift * } */ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisPhase => - import LambdaLift._ - import ast.tpd._ + import LambdaLift.* + import ast.tpd.* override def phaseName: String = LambdaLift.name diff --git a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala index b433e37e39c0..5e78d25000db 100644 --- a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala +++ b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala @@ -21,8 +21,8 @@ import transform.SymUtils.* import scala.collection.mutable class LazyVals extends MiniPhase with IdentityDenotTransformer { - import LazyVals._ - import tpd._ + import LazyVals.* + import tpd.* /** * The map contains the list of the offset trees. @@ -455,8 +455,8 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer { } def transformMemberDefThreadSafeNew(x: ValOrDefDef)(using Context): Thicket = { - import dotty.tools.dotc.core.Types._ - import dotty.tools.dotc.core.Flags._ + import dotty.tools.dotc.core.Types.* + import dotty.tools.dotc.core.Flags.* val claz = x.symbol.owner.asClass val thizClass = Literal(Constant(claz.info)) diff --git a/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala b/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala index e7ff6d10c222..302001347d67 100644 --- a/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala +++ b/compiler/src/dotty/tools/dotc/transform/LetOverApply.scala @@ -2,9 +2,9 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._, Symbols._, Decorators._ -import MegaPhase._ +import core.* +import Contexts.*, Symbols.*, Decorators.* +import MegaPhase.* /** Rewrite `{ stats; expr}.f(args)` to `{ stats; expr.f(args) }` and * `{ stats; expr }(args)` to `{ stats; expr(args) }` before proceeding, @@ -12,7 +12,7 @@ import MegaPhase._ * collapse applies of IFTs (this is done in Erasure). */ class LetOverApply extends MiniPhase: - import ast.tpd._ + import ast.tpd.* override def phaseName: String = LetOverApply.name diff --git a/compiler/src/dotty/tools/dotc/transform/Literalize.scala.disabled b/compiler/src/dotty/tools/dotc/transform/Literalize.scala.disabled index 626cb9687df4..b9e6efe1b06b 100644 --- a/compiler/src/dotty/tools/dotc/transform/Literalize.scala.disabled +++ b/compiler/src/dotty/tools/dotc/transform/Literalize.scala.disabled @@ -1,17 +1,17 @@ package dotty.tools.dotc package transform -import MegaPhase._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Flags._ -import core.Decorators._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme -import ast.Trees._ +import ast.Trees.* import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Constants._ +import dotty.tools.dotc.core.Constants.* /** This phase rewrites idempotent expressions with constant types to Literals. * The constant types are eliminated by erasure, so we need to keep @@ -21,7 +21,7 @@ import dotty.tools.dotc.core.Constants._ * in the type of the literal. */ class Literalize extends MiniPhase { thisTransform => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = "literalize" diff --git a/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala b/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala index cc2e6118d1fa..3478efccd620 100644 --- a/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala +++ b/compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala @@ -13,7 +13,7 @@ import dotty.tools.dotc.core.DenotTransformers.DenotTransformer import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.MacroClassLoader import dotty.tools.dotc.core.Symbols.* -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.quoted.* import dotty.tools.dotc.util.SrcPos import scala.quoted.runtime.impl.{QuotesImpl, SpliceScope} diff --git a/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala b/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala index 7bb7ed365ebe..887a962f7a65 100644 --- a/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/MacroTransform.scala @@ -1,17 +1,17 @@ package dotty.tools.dotc package transform -import core._ -import Phases._ -import ast.Trees._ -import Contexts._ +import core.* +import Phases.* +import ast.Trees.* +import Contexts.* /** A base class for transforms. * A transform contains a compiler phase which applies a tree transformer. */ abstract class MacroTransform extends Phase { - import ast.tpd._ + import ast.tpd.* override def run(using Context): Unit = { val unit = ctx.compilationUnit diff --git a/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala b/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala index fe70a1659036..3076e5fc183c 100644 --- a/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala +++ b/compiler/src/dotty/tools/dotc/transform/MegaPhase.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._, Phases._, Symbols._, Decorators._ +import core.* +import Contexts.*, Phases.*, Symbols.*, Decorators.* import Flags.PackageVal import staging.StagingLevel.* @@ -14,7 +14,7 @@ import staging.StagingLevel.* * is described in his thesis. */ object MegaPhase { - import ast.tpd._ + import ast.tpd.* /** The base class of tree transforms. For each kind of tree K, there are * two methods which can be overridden: @@ -136,10 +136,10 @@ object MegaPhase { singletonGroup.run } } -import MegaPhase._ +import MegaPhase.* class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase { - import ast.tpd._ + import ast.tpd.* override val phaseName: String = if (miniPhases.length == 1) miniPhases(0).phaseName diff --git a/compiler/src/dotty/tools/dotc/transform/Memoize.scala b/compiler/src/dotty/tools/dotc/transform/Memoize.scala index af6533cfc17f..98a38d91f0d9 100644 --- a/compiler/src/dotty/tools/dotc/transform/Memoize.scala +++ b/compiler/src/dotty/tools/dotc/transform/Memoize.scala @@ -1,22 +1,22 @@ package dotty.tools.dotc package transform -import core._ -import DenotTransformers._ -import Contexts._ +import core.* +import DenotTransformers.* +import Contexts.* import Phases.* import SymDenotations.SymDenotation -import Denotations._ -import Symbols._ -import SymUtils._ -import Constants._ -import MegaPhase._ -import NameOps._ -import Flags._ -import Decorators._ +import Denotations.* +import Symbols.* +import SymUtils.* +import Constants.* +import MegaPhase.* +import NameOps.* +import Flags.* +import Decorators.* import StdNames.nme -import sjs.JSSymUtils._ +import sjs.JSSymUtils.* import util.Store @@ -46,7 +46,7 @@ object Memoize { */ class Memoize extends MiniPhase with IdentityDenotTransformer { thisPhase => import Memoize.MyState - import ast.tpd._ + import ast.tpd.* override def phaseName: String = Memoize.name diff --git a/compiler/src/dotty/tools/dotc/transform/Mixin.scala b/compiler/src/dotty/tools/dotc/transform/Mixin.scala index 5ca09dd6188f..33864a33a047 100644 --- a/compiler/src/dotty/tools/dotc/transform/Mixin.scala +++ b/compiler/src/dotty/tools/dotc/transform/Mixin.scala @@ -2,21 +2,21 @@ package dotty.tools package dotc package transform -import core._ -import MegaPhase._ -import Contexts._ -import Flags._ -import SymUtils._ -import Symbols._ -import SymDenotations._ -import Types._ -import Decorators._ -import DenotTransformers._ -import StdNames._ -import Names._ -import NameKinds._ -import NameOps._ -import ast.Trees._ +import core.* +import MegaPhase.* +import Contexts.* +import Flags.* +import SymUtils.* +import Symbols.* +import SymDenotations.* +import Types.* +import Decorators.* +import DenotTransformers.* +import StdNames.* +import Names.* +import NameKinds.* +import NameOps.* +import ast.Trees.* object Mixin { val name: String = "mixin" @@ -111,7 +111,7 @@ object Mixin { * are symbolic. */ class Mixin extends MiniPhase with SymTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = Mixin.name @@ -184,7 +184,7 @@ class Mixin extends MiniPhase with SymTransformer { thisPhase => override def transformTemplate(impl: Template)(using Context): Template = { val cls = impl.symbol.owner.asClass val ops = new MixinOps(cls, thisPhase) - import ops._ + import ops.* def traitDefs(stats: List[Tree]): List[Tree] = { stats.flatMap { diff --git a/compiler/src/dotty/tools/dotc/transform/MixinOps.scala b/compiler/src/dotty/tools/dotc/transform/MixinOps.scala index fa1c09806893..d40a2a7eb17e 100644 --- a/compiler/src/dotty/tools/dotc/transform/MixinOps.scala +++ b/compiler/src/dotty/tools/dotc/transform/MixinOps.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ -import Symbols._, Types._, Contexts._, DenotTransformers._, Flags._ -import util.Spans._ -import SymUtils._ -import StdNames._, NameOps._ +import core.* +import Symbols.*, Types.*, Contexts.*, DenotTransformers.*, Flags.* +import util.Spans.* +import SymUtils.* +import StdNames.*, NameOps.* import typer.Nullables class MixinOps(cls: ClassSymbol, thisPhase: DenotTransformer)(using Context) { - import ast.tpd._ + import ast.tpd.* val superCls: Symbol = cls.superClass val mixins: List[ClassSymbol] = cls.mixins diff --git a/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala b/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala index db96aeefe231..a417d41ffd56 100644 --- a/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala +++ b/compiler/src/dotty/tools/dotc/transform/MoveStatics.scala @@ -1,26 +1,26 @@ package dotty.tools.dotc package transform -import core._ -import Flags._ -import Contexts._ -import Symbols._ +import core.* +import Flags.* +import Contexts.* +import Symbols.* import DenotTransformers.SymTransformer import Types.MethodType import Annotations.Annotation import SymDenotations.SymDenotation import Names.Name import StdNames.nme -import NameOps._ +import NameOps.* -import ast._ +import ast.* -import SymUtils._ -import MegaPhase._ +import SymUtils.* +import MegaPhase.* /** Move static methods from companion to the class itself */ class MoveStatics extends MiniPhase with SymTransformer { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = MoveStatics.name diff --git a/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala b/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala index a75d6da9dd6a..4bdcc8d9606d 100644 --- a/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala +++ b/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala @@ -1,15 +1,15 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._, Symbols._, Types._, Flags._, StdNames._ -import MegaPhase._ +import core.* +import Contexts.*, Symbols.*, Types.*, Flags.*, StdNames.* +import MegaPhase.* import NameKinds.NonLocalReturnKeyName import config.SourceVersion.* import Decorators.em object NonLocalReturns { - import ast.tpd._ + import ast.tpd.* val name: String = "nonLocalReturns" val description: String = "expand non-local returns" @@ -26,8 +26,8 @@ class NonLocalReturns extends MiniPhase { override def description: String = NonLocalReturns.description - import NonLocalReturns._ - import ast.tpd._ + import NonLocalReturns.* + import ast.tpd.* override def runsAfter: Set[String] = Set(ElimByName.name) diff --git a/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala b/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala index 48dc7c818360..d06af2dbf8f7 100644 --- a/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala +++ b/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package transform -import core._ -import Flags._, Symbols._, Contexts._, Scopes._, Decorators._, Types.Type +import core.* +import Flags.*, Symbols.*, Contexts.*, Scopes.*, Decorators.*, Types.Type import NameKinds.DefaultGetterName -import NullOpsDecorator._ +import NullOpsDecorator.* import collection.immutable.BitSet import scala.annotation.tailrec diff --git a/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala b/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala index 8c93ffb90232..82ba3b7a1b7f 100644 --- a/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala +++ b/compiler/src/dotty/tools/dotc/transform/ParamForwarding.scala @@ -2,10 +2,10 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._, Types._, Symbols._, Flags._, TypeUtils._, DenotTransformers._, StdNames._ -import Decorators._ -import MegaPhase._ +import core.* +import Contexts.*, Types.*, Symbols.*, Flags.*, TypeUtils.*, DenotTransformers.*, StdNames.* +import Decorators.* +import MegaPhase.* import NameKinds.ParamAccessorName /** For all private parameter accessors diff --git a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala index a648a419d594..8f5eec693609 100644 --- a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -2,22 +2,22 @@ package dotty.tools package dotc package transform -import core._ -import MegaPhase._ -import Symbols._, Contexts._, Types._, StdNames._, NameOps._ +import core.* +import MegaPhase.* +import Symbols.*, Contexts.*, Types.*, StdNames.*, NameOps.* import patmat.SpaceEngine -import util.Spans._ +import util.Spans.* import typer.Applications.* -import SymUtils._ +import SymUtils.* import TypeUtils.* import Annotations.* -import Flags._, Constants._ -import Decorators._ +import Flags.*, Constants.* +import Decorators.* import NameKinds.{PatMatStdBinderName, PatMatAltsName, PatMatResultName} import config.Printers.patmatch -import reporting._ -import ast._ -import util.Property._ +import reporting.* +import ast.* +import util.Property.* import scala.annotation.tailrec import scala.collection.mutable @@ -27,8 +27,8 @@ import scala.collection.mutable * where every pattern is an integer or string constant */ class PatternMatcher extends MiniPhase { - import ast.tpd._ - import PatternMatcher._ + import ast.tpd.* + import PatternMatcher.* override def phaseName: String = PatternMatcher.name @@ -56,7 +56,7 @@ class PatternMatcher extends MiniPhase { } object PatternMatcher { - import ast.tpd._ + import ast.tpd.* val name: String = "patternMatcher" val description: String = "compile pattern matches" diff --git a/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala b/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala index 04b5db86b88c..9e949969dfad 100644 --- a/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala +++ b/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala @@ -1,25 +1,25 @@ package dotty.tools.dotc package transform -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import Constants._ -import ast.Trees._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import Constants.* +import ast.Trees.* import ast.untpd import ast.TreeTypeMap -import SymUtils._ -import NameKinds._ +import SymUtils.* +import NameKinds.* import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.config.ScalaRelease.* -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.inlines.Inlines import scala.annotation.constructorOnly @@ -69,8 +69,8 @@ import scala.collection.mutable * */ class PickleQuotes extends MacroTransform { - import PickleQuotes._ - import tpd._ + import PickleQuotes.* + import tpd.* override def phaseName: String = PickleQuotes.name @@ -207,7 +207,7 @@ class PickleQuotes extends MacroTransform { } object PickleQuotes { - import tpd._ + import tpd.* val name: String = "pickleQuotes" val description: String = "turn quoted trees into explicit run-time data structures" diff --git a/compiler/src/dotty/tools/dotc/transform/Pickler.scala b/compiler/src/dotty/tools/dotc/transform/Pickler.scala index 97a4b3a3afe0..5ab289e510aa 100644 --- a/compiler/src/dotty/tools/dotc/transform/Pickler.scala +++ b/compiler/src/dotty/tools/dotc/transform/Pickler.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package transform -import core._ -import Contexts._ -import Decorators._ -import tasty._ +import core.* +import Contexts.* +import Decorators.* +import tasty.* import config.Printers.{noPrinter, pickling} import java.io.PrintStream -import Periods._ -import Phases._ -import Symbols._ +import Periods.* +import Phases.* +import Symbols.* import Flags.Module import reporting.{ThrowingReporter, Profile, Message} import collection.mutable @@ -30,7 +30,7 @@ object Pickler { /** This phase pickles trees */ class Pickler extends Phase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = Pickler.name diff --git a/compiler/src/dotty/tools/dotc/transform/PostInlining.scala b/compiler/src/dotty/tools/dotc/transform/PostInlining.scala index 0cfd3650ad0b..26c956d85d18 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostInlining.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostInlining.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package transform -import core._ +import core.* import Contexts.* import DenotTransformers.IdentityDenotTransformer import SyntheticMembers.* diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala index 39f8ae6e757b..7e37b281b7a0 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala @@ -4,20 +4,20 @@ package transform import dotty.tools.dotc.ast.{Trees, tpd, untpd, desugar} import scala.collection.mutable -import core._ +import core.* import dotty.tools.dotc.typer.Checking import dotty.tools.dotc.inlines.Inlines import dotty.tools.dotc.typer.VarianceChecker import typer.ErrorReporting.errorTree -import Types._, Contexts._, Names._, Flags._, DenotTransformers._, Phases._ -import SymDenotations._, StdNames._, Annotations._, Trees._, Scopes._ -import Decorators._ -import Symbols._, SymUtils._, NameOps._ +import Types.*, Contexts.*, Names.*, Flags.*, DenotTransformers.*, Phases.* +import SymDenotations.*, StdNames.*, Annotations.*, Trees.*, Scopes.* +import Decorators.* +import Symbols.*, SymUtils.*, NameOps.* import ContextFunctionResults.annotateContextResults import config.Printers.typr import config.Feature import util.SrcPos -import reporting._ +import reporting.* import NameKinds.WildcardParamName object PostTyper { @@ -61,7 +61,7 @@ object PostTyper { * they do not warrant their own group of miniphases before pickling. */ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase => - import tpd._ + import tpd.* override def phaseName: String = PostTyper.name diff --git a/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala b/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala index 6d8f7bdb32cb..b6df581beee2 100644 --- a/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package transform -import core.Contexts._ -import core.NameKinds._ -import core.Symbols._ -import core.Flags._ -import core.Decorators._ +import core.Contexts.* +import core.NameKinds.* +import core.Symbols.* +import core.Flags.* +import core.Decorators.* import core.Names.TermName import MegaPhase.MiniPhase import config.Printers.transforms @@ -48,7 +48,7 @@ object ProtectedAccessors { } class ProtectedAccessors extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ProtectedAccessors.name diff --git a/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala b/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala index 17f2d11ccfec..f0de71dfc239 100644 --- a/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala +++ b/compiler/src/dotty/tools/dotc/transform/PruneErasedDefs.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ +import core.* +import Contexts.* import DenotTransformers.SymTransformer -import Flags._ -import SymDenotations._ -import Symbols._ +import Flags.* +import SymDenotations.* +import Symbols.* import typer.RefChecks import MegaPhase.MiniPhase import ast.tpd -import SymUtils._ +import SymUtils.* import config.Feature import Decorators.* import dotty.tools.dotc.core.Types.MethodType @@ -23,8 +23,8 @@ import dotty.tools.dotc.core.Types.MethodType * as IsInstanceOfChecker don't give false negatives. */ class PruneErasedDefs extends MiniPhase with SymTransformer { thisTransform => - import tpd._ - import PruneErasedDefs._ + import tpd.* + import PruneErasedDefs.* override def phaseName: String = PruneErasedDefs.name @@ -66,7 +66,7 @@ class PruneErasedDefs extends MiniPhase with SymTransformer { thisTransform => } object PruneErasedDefs { - import tpd._ + import tpd.* val name: String = "pruneErasedDefs" val description: String = "drop erased definitions and simplify erased expressions" diff --git a/compiler/src/dotty/tools/dotc/transform/PureStats.scala b/compiler/src/dotty/tools/dotc/transform/PureStats.scala index b747d7d6b9e4..22fdef3aaab6 100644 --- a/compiler/src/dotty/tools/dotc/transform/PureStats.scala +++ b/compiler/src/dotty/tools/dotc/transform/PureStats.scala @@ -2,10 +2,10 @@ package dotty.tools.dotc package transform import ast.{Trees, tpd} -import core._, core.Decorators._ -import MegaPhase._ -import Types._, Contexts._, Flags._, DenotTransformers._ -import Symbols._, StdNames._, Trees._ +import core.*, core.Decorators.* +import MegaPhase.* +import Types.*, Contexts.*, Flags.*, DenotTransformers.* +import Symbols.*, StdNames.*, Trees.* object PureStats { val name: String = "pureStats" @@ -15,7 +15,7 @@ object PureStats { /** Remove pure statements in blocks */ class PureStats extends MiniPhase { - import tpd._ + import tpd.* override def phaseName: String = PureStats.name diff --git a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala index 6e73d683fa2c..2fd9f923d98e 100644 --- a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala +++ b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala @@ -1,22 +1,22 @@ package dotty.tools.dotc package transform -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import SymUtils._ -import NameKinds._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import SymUtils.* +import NameKinds.* import dotty.tools.dotc.ast.tpd -import tpd._ +import tpd.* import scala.collection.mutable -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.quoted.* import scala.annotation.constructorOnly diff --git a/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala b/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala index d6c11fe36748..8ed1edcd0308 100644 --- a/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala +++ b/compiler/src/dotty/tools/dotc/transform/RepeatableAnnotations.scala @@ -1,16 +1,16 @@ package dotty.tools.dotc package transform -import core._ -import ast.tpd._ -import Contexts._ -import MegaPhase._ -import Annotations._ +import core.* +import ast.tpd.* +import Contexts.* +import MegaPhase.* +import Annotations.* import Symbols.defn -import Constants._ -import Types._ -import Decorators._ -import Flags._ +import Constants.* +import Types.* +import Decorators.* +import Flags.* import scala.collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala b/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala index 99b6be1eea8a..e864178af658 100644 --- a/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala +++ b/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala @@ -1,19 +1,19 @@ package dotty.tools.dotc package transform -import core._ -import MegaPhase._ -import Contexts._ -import Flags._ -import SymUtils._ -import Symbols._ -import Decorators._ -import DenotTransformers._ -import Names._ -import NameOps._ -import NameKinds._ -import NullOpsDecorator._ -import ResolveSuper._ +import core.* +import MegaPhase.* +import Contexts.* +import Flags.* +import SymUtils.* +import Symbols.* +import Decorators.* +import DenotTransformers.* +import Names.* +import NameOps.* +import NameKinds.* +import NullOpsDecorator.* +import ResolveSuper.* import reporting.IllegalSuperAccessor /** This phase implements super accessors in classes that need them. @@ -31,7 +31,7 @@ import reporting.IllegalSuperAccessor * Mixin, which runs after erasure. */ class ResolveSuper extends MiniPhase with IdentityDenotTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = ResolveSuper.name @@ -45,7 +45,7 @@ class ResolveSuper extends MiniPhase with IdentityDenotTransformer { thisPhase = override def transformTemplate(impl: Template)(using Context): Template = { val cls = impl.symbol.owner.asClass val ops = new MixinOps(cls, thisPhase) - import ops._ + import ops.* def superAccessors(mixin: ClassSymbol): List[Tree] = for superAcc <- mixin.info.decls.filter(_.isSuperAccessor) @@ -66,7 +66,7 @@ class ResolveSuper extends MiniPhase with IdentityDenotTransformer { thisPhase = assert(ddef.rhs.isEmpty, ddef.symbol) val cls = meth.owner.asClass val ops = new MixinOps(cls, thisPhase) - import ops._ + import ops.* DefDef(meth, forwarderRhsFn(rebindSuper(cls, meth))) } else ddef diff --git a/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala b/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala index d01be0419a4d..e66f5e4b37b8 100644 --- a/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala +++ b/compiler/src/dotty/tools/dotc/transform/RestoreScopes.scala @@ -1,11 +1,11 @@ package dotty.tools.dotc package transform -import core._ +import core.* import DenotTransformers.IdentityDenotTransformer -import Contexts._ -import Symbols._ -import Scopes._ +import Contexts.* +import Symbols.* +import Scopes.* import MegaPhase.MiniPhase /** The preceding lambda lift and flatten phases move symbols to different scopes @@ -13,7 +13,7 @@ import MegaPhase.MiniPhase * class scopes contain the symbols defined in them. */ class RestoreScopes extends MiniPhase with IdentityDenotTransformer { thisPhase => - import ast.tpd._ + import ast.tpd.* override def phaseName: String = RestoreScopes.name diff --git a/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala b/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala index 1df9809c2f62..6177e5d0839d 100644 --- a/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala +++ b/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala @@ -2,13 +2,13 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core._ -import dotty.tools.dotc.transform.MegaPhase._ -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.* +import dotty.tools.dotc.transform.MegaPhase.* +import dotty.tools.dotc.transform.SymUtils.* /** Removes `Select`s that would be compiled into `GetStatic`. * @@ -43,7 +43,7 @@ import dotty.tools.dotc.transform.SymUtils._ * @author Dmytro Petrashko */ class SelectStatic extends MiniPhase with IdentityDenotTransformer { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = SelectStatic.name diff --git a/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala b/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala index 2f586104c4e3..20f4e6d85daa 100644 --- a/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala +++ b/compiler/src/dotty/tools/dotc/transform/SeqLiterals.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import core._ -import dotty.tools.dotc.transform.MegaPhase._ -import Contexts._ +import core.* +import dotty.tools.dotc.transform.MegaPhase.* +import Contexts.* /** A transformer that eliminates SeqLiteral's, transforming `SeqLiteral(elems)` to an operation * equivalent to @@ -15,7 +15,7 @@ import Contexts._ * keep a precise type after erasure, whereas SeqLiterals only get the erased type `Seq`, */ class SeqLiterals extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = SeqLiterals.name diff --git a/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala b/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala index d17dbbecc555..f62b1f5f01f2 100644 --- a/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala +++ b/compiler/src/dotty/tools/dotc/transform/SetRootTree.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.transform import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.Phase /** Set the `rootTreeOrProvider` property of class symbols. */ diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala index afa2318c8f07..69677dfec59d 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import ast.Trees._, ast.tpd, core._ -import Contexts._, Types._, Decorators._, Symbols._, DenotTransformers._ -import SymDenotations._, Scopes._, StdNames._, NameOps._, Names._ +import ast.Trees.*, ast.tpd, core.* +import Contexts.*, Types.*, Decorators.*, Symbols.*, DenotTransformers.* +import SymDenotations.*, Scopes.*, StdNames.*, NameOps.*, Names.* import MegaPhase.MiniPhase import scala.collection.mutable @@ -18,7 +18,7 @@ import scala.collection.mutable * different standard library. */ class SpecializeApplyMethods extends MiniPhase with InfoTransformer { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = SpecializeApplyMethods.name diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala index 9d757dc9713c..094d6024eb4e 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import ast.Trees._, ast.tpd, core._ -import Contexts._, Types._, Decorators._, Symbols._, DenotTransformers._ -import SymDenotations._, Scopes._, StdNames._, NameOps._, Names._ +import ast.Trees.*, ast.tpd, core.* +import Contexts.*, Types.*, Decorators.*, Symbols.*, DenotTransformers.* +import SymDenotations.*, Scopes.*, StdNames.*, NameOps.*, Names.* import MegaPhase.MiniPhase @@ -11,7 +11,7 @@ import MegaPhase.MiniPhase * specialized form. */ class SpecializeFunctions extends MiniPhase { - import ast.tpd._ + import ast.tpd.* override def phaseName: String = SpecializeFunctions.name diff --git a/compiler/src/dotty/tools/dotc/transform/Splicer.scala b/compiler/src/dotty/tools/dotc/transform/Splicer.scala index 46a8571b4f30..1f7b65ba66a6 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicer.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicer.scala @@ -7,14 +7,14 @@ import java.io.{PrintWriter, StringWriter} import java.lang.reflect.{InvocationTargetException, Method => JLRMethod} import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.NameKinds.FlatName import dotty.tools.dotc.core.Names.Name -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Types._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Denotations.staticRef import dotty.tools.dotc.core.TypeErasure import dotty.tools.dotc.core.Constants.Constant @@ -30,7 +30,7 @@ import scala.reflect.ClassTag import dotty.tools.dotc.quoted.{PickledQuotes, QuoteUtils} import scala.quoted.Quotes -import scala.quoted.runtime.impl._ +import scala.quoted.runtime.impl.* import dotty.tools.dotc.core.NameKinds /** Utility class to splice quoted expressions */ diff --git a/compiler/src/dotty/tools/dotc/transform/Splicing.scala b/compiler/src/dotty/tools/dotc/transform/Splicing.scala index f5d8e82de78e..1c449803c6b4 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicing.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicing.scala @@ -1,25 +1,25 @@ package dotty.tools.dotc package transform -import core._ -import Decorators._ -import Flags._ -import Types._ -import Contexts._ -import Symbols._ -import Constants._ -import ast.Trees._ +import core.* +import Decorators.* +import Flags.* +import Types.* +import Contexts.* +import Symbols.* +import Constants.* +import ast.Trees.* import ast.{TreeTypeMap, untpd} -import util.Spans._ -import SymUtils._ -import NameKinds._ +import util.Spans.* +import SymUtils.* +import NameKinds.* import dotty.tools.dotc.ast.tpd import scala.collection.mutable -import dotty.tools.dotc.core.Annotations._ -import dotty.tools.dotc.core.Names._ -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.quoted._ +import dotty.tools.dotc.core.Annotations.* +import dotty.tools.dotc.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.quoted.* import dotty.tools.dotc.config.ScalaRelease.* import dotty.tools.dotc.staging.StagingLevel.* import dotty.tools.dotc.staging.QuoteTypeTags @@ -72,7 +72,7 @@ object Splicing: * */ class Splicing extends MacroTransform: - import tpd._ + import tpd.* override def phaseName: String = Splicing.name diff --git a/compiler/src/dotty/tools/dotc/transform/Staging.scala b/compiler/src/dotty/tools/dotc/transform/Staging.scala index 43cbe80ce8c4..f7fac1981fb2 100644 --- a/compiler/src/dotty/tools/dotc/transform/Staging.scala +++ b/compiler/src/dotty/tools/dotc/transform/Staging.scala @@ -2,15 +2,15 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.tpd -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.Symbols._ -import dotty.tools.dotc.core.Types._ +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.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.inlines.Inlines import dotty.tools.dotc.util.SrcPos -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.staging.StagingLevel.* import dotty.tools.dotc.staging.CrossStageSafety import dotty.tools.dotc.staging.HealType @@ -20,7 +20,7 @@ import dotty.tools.dotc.staging.HealType * See `CrossStageSafety` */ class Staging extends MacroTransform { - import tpd._ + import tpd.* override def phaseName: String = Staging.name diff --git a/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala b/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala index b15c50158b75..2d8d51b4059f 100644 --- a/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala @@ -5,13 +5,13 @@ package transform import dotty.tools.dotc.ast.{Trees, tpd} import scala.collection.mutable import ValueClasses.isMethodWithExtension -import core._ -import Contexts._, Flags._, Symbols._, Names._, StdNames._, NameOps._, Trees._ -import TypeUtils._, SymUtils._ +import core.* +import Contexts.*, Flags.*, Symbols.*, Names.*, StdNames.*, NameOps.*, Trees.* +import TypeUtils.*, SymUtils.* import DenotTransformers.DenotTransformer -import Symbols._ -import util.Spans._ -import Decorators._ +import Symbols.* +import util.Spans.* +import Decorators.* import NameKinds.{ SuperAccessorName, ExpandPrefixName } /** This class adds super accessors for all super calls that either @@ -32,7 +32,7 @@ import NameKinds.{ SuperAccessorName, ExpandPrefixName } */ class SuperAccessors(thisPhase: DenotTransformer) { - import tpd._ + import tpd.* /** Some parts of trees will get a new owner in subsequent phases. * These are value class methods, which will become extension methods. diff --git a/compiler/src/dotty/tools/dotc/transform/SymUtils.scala b/compiler/src/dotty/tools/dotc/transform/SymUtils.scala index 0b52689adabf..e2b006d0d738 100644 --- a/compiler/src/dotty/tools/dotc/transform/SymUtils.scala +++ b/compiler/src/dotty/tools/dotc/transform/SymUtils.scala @@ -1,21 +1,21 @@ package dotty.tools.dotc package transform -import core._ -import Types._ -import Contexts._ -import Symbols._ -import SymDenotations._ -import Names._ -import NameOps._ -import StdNames._ -import NameKinds._ -import Flags._ +import core.* +import Types.* +import Contexts.* +import Symbols.* +import SymDenotations.* +import Names.* +import NameOps.* +import StdNames.* +import NameKinds.* +import Flags.* import ValueClasses.isDerivedValueClass -import Decorators._ +import Decorators.* import Constants.Constant import Annotations.Annotation -import Phases._ +import Phases.* import ast.tpd.Literal import dotty.tools.dotc.transform.sjs.JSSymUtils.sjsNeedsField diff --git a/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala b/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala index b42fd93319f5..b51b04071a83 100644 --- a/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala +++ b/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala @@ -1,21 +1,21 @@ package dotty.tools.dotc package transform -import core._ -import Symbols._, Types._, Contexts._, Names._, StdNames._, Constants._, SymUtils._ -import Flags._ -import DenotTransformers._ -import Decorators._ -import NameOps._ +import core.* +import Symbols.*, Types.*, Contexts.*, Names.*, StdNames.*, Constants.*, SymUtils.* +import Flags.* +import DenotTransformers.* +import Decorators.* +import NameOps.* import Annotations.Annotation import typer.ProtoTypes.constrained import ast.untpd import ValueClasses.isDerivedValueClass -import SymUtils._ +import SymUtils.* import util.Property import util.Spans.Span import config.Printers.derive -import NullOpsDecorator._ +import NullOpsDecorator.* object SyntheticMembers { @@ -53,8 +53,8 @@ object SyntheticMembers { * def hashCode(): Int */ class SyntheticMembers(thisPhase: DenotTransformer) { - import SyntheticMembers._ - import ast.tpd._ + import SyntheticMembers.* + import ast.tpd.* private var myValueSymbols: List[Symbol] = Nil private var myCaseSymbols: List[Symbol] = Nil diff --git a/compiler/src/dotty/tools/dotc/transform/TailRec.scala b/compiler/src/dotty/tools/dotc/transform/TailRec.scala index 741b9d1627fe..158b72f7abdb 100644 --- a/compiler/src/dotty/tools/dotc/transform/TailRec.scala +++ b/compiler/src/dotty/tools/dotc/transform/TailRec.scala @@ -105,7 +105,7 @@ import dotty.tools.uncheckedNN * moved after erasure and adapted to emit `Labeled` blocks by Sébastien Doeraene */ class TailRec extends MiniPhase { - import tpd._ + import tpd.* override def phaseName: String = TailRec.name diff --git a/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala b/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala index ffed65f7676e..2be41ba208f1 100644 --- a/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala +++ b/compiler/src/dotty/tools/dotc/transform/TransformWildcards.scala @@ -1,9 +1,9 @@ package dotty.tools.dotc package transform -import MegaPhase._ -import core.DenotTransformers._ -import core.Contexts._ +import MegaPhase.* +import core.DenotTransformers.* +import core.Contexts.* import ast.tpd /** This phase transforms wildcards in valdefs with their default value. @@ -12,7 +12,7 @@ import ast.tpd * */ class TransformWildcards extends MiniPhase with IdentityDenotTransformer { - import tpd._ + import tpd.* override def phaseName: String = TransformWildcards.name diff --git a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala index 67bc88035d4b..39fe0949cd96 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -2,24 +2,24 @@ package dotty.tools.dotc package transform import core.Names.Name -import core.DenotTransformers._ -import core.SymDenotations._ -import core.Contexts._ -import core.Symbols._ -import core.Types._ -import core.Flags._ -import core.StdNames._ +import core.DenotTransformers.* +import core.SymDenotations.* +import core.Contexts.* +import core.Symbols.* +import core.Types.* +import core.Flags.* +import core.StdNames.* import core.NameKinds.{DocArtifactName, OuterSelectName} -import core.Decorators._ -import core.Phases._ +import core.Decorators.* +import core.Phases.* import core.Mode -import typer._ -import reporting._ -import ast.Trees._ +import typer.* +import reporting.* +import ast.Trees.* import ast.{tpd, untpd} -import util.Chars._ +import util.Chars.* import collection.mutable -import ProtoTypes._ +import ProtoTypes.* import staging.StagingLevel import inlines.Inlines.inInlineMethod @@ -38,8 +38,8 @@ import scala.util.control.NonFatal * represented as TypeTrees then). */ class TreeChecker extends Phase with SymTransformer { - import ast.tpd._ - import TreeChecker._ + import ast.tpd.* + import TreeChecker.* private val seenClasses = collection.mutable.HashMap[String, Symbol]() private val seenModuleVals = collection.mutable.HashMap[String, Symbol]() @@ -185,7 +185,7 @@ object TreeChecker { * tpt, SeqLiteral elemtpt, ValDef tpt, DefDef tpt, and TypeDef rhs. */ object TreeNodeChecker extends untpd.TreeTraverser: - import untpd._ + import untpd.* def traverse(tree: Tree)(using Context) = tree match case t: TypeTree => assert(assertion = false, i"TypeTree not expected: $t") case t @ TypeApply(fun, _targs) => traverse(fun) @@ -206,7 +206,7 @@ object TreeChecker { class Checker(phasesToCheck: Seq[Phase]) extends ReTyper with Checking { - import ast.tpd._ + import ast.tpd.* protected val nowDefinedSyms = util.HashSet[Symbol]() private val patBoundSyms = util.HashSet[Symbol]() diff --git a/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala b/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala index aec44d5987bf..8d5b7c28bbbc 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeExtractors.scala @@ -2,12 +2,12 @@ package dotty.tools.dotc package transform import ast.{Trees, tpd} -import core._ -import Contexts._, Trees._, Types._, StdNames._, Symbols._ -import ValueClasses._ +import core.* +import Contexts.*, Trees.*, Types.*, StdNames.*, Symbols.* +import ValueClasses.* object TreeExtractors { - import tpd._ + import tpd.* /** Match arg1.op(arg2) and extract (arg1, op.symbol, arg2) */ object BinaryOp { diff --git a/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala b/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala index 92d22b1cc57e..095c6af60766 100644 --- a/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala +++ b/compiler/src/dotty/tools/dotc/transform/TryCatchPatterns.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import core.Symbols._ -import core.StdNames._ -import core.Types._ +import core.Symbols.* +import core.StdNames.* +import core.Types.* import core.NameKinds.ExceptionBinderName import dotty.tools.dotc.core.Flags -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase import dotty.tools.dotc.util.Spans.Span @@ -39,7 +39,7 @@ import dotty.tools.dotc.util.Spans.Span * */ class TryCatchPatterns extends MiniPhase { - import dotty.tools.dotc.ast.tpd._ + import dotty.tools.dotc.ast.tpd.* override def phaseName: String = TryCatchPatterns.name diff --git a/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala b/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala index 6fba0bca4ce3..fee7bb19e0be 100644 --- a/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala +++ b/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala @@ -1,21 +1,21 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ -import Decorators._ -import Definitions._ -import DenotTransformers._ -import StdNames._ -import Symbols._ -import MegaPhase._ -import Types._ +import core.* +import Contexts.* +import Decorators.* +import Definitions.* +import DenotTransformers.* +import StdNames.* +import Symbols.* +import MegaPhase.* +import Types.* import dotty.tools.dotc.ast.tpd /** Optimize generic operations on tuples */ class TupleOptimizations extends MiniPhase with IdentityDenotTransformer { - import tpd._ + import tpd.* override def phaseName: String = TupleOptimizations.name diff --git a/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala b/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala index 556204ab89ab..f8092ba51c2a 100644 --- a/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala +++ b/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala @@ -4,16 +4,16 @@ package transform import scala.language.unsafeNulls as _ -import core._ -import Contexts._, Symbols._, Types._, Constants._, StdNames._, Decorators._ +import core.* +import Contexts.*, Symbols.*, Types.*, Constants.*, StdNames.*, Decorators.* import ast.untpd -import Erasure.Boxing._ -import TypeErasure._ -import ValueClasses._ -import SymUtils._ -import core.Flags._ -import util.Spans._ -import reporting._ +import Erasure.Boxing.* +import TypeErasure.* +import ValueClasses.* +import SymUtils.* +import core.Flags.* +import util.Spans.* +import reporting.* import config.Printers.{ transforms => debug } import patmat.Typ @@ -29,7 +29,7 @@ import patmat.Typ * cannot be rewritten before erasure. That's why TypeTestsCasts is called from Erasure. */ object TypeTestsCasts { - import ast.tpd._ + import ast.tpd.* import typer.Inferencing.maximizeType import typer.ProtoTypes.constrained diff --git a/compiler/src/dotty/tools/dotc/transform/TypeUtils.scala b/compiler/src/dotty/tools/dotc/transform/TypeUtils.scala index 779552a3d46f..9528e683cc55 100644 --- a/compiler/src/dotty/tools/dotc/transform/TypeUtils.scala +++ b/compiler/src/dotty/tools/dotc/transform/TypeUtils.scala @@ -2,11 +2,11 @@ package dotty.tools package dotc package transform -import core._ +import core.* import TypeErasure.ErasedValueType -import Types._ -import Contexts._ -import Symbols._ +import Types.* +import Contexts.* +import Symbols.* import Names.Name import dotty.tools.dotc.core.Decorators.* diff --git a/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala b/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala index 95d40102c5a7..6e02ea7c227c 100644 --- a/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala +++ b/compiler/src/dotty/tools/dotc/transform/UncacheGivenAliases.scala @@ -1,12 +1,12 @@ package dotty.tools.dotc package transform -import MegaPhase._ +import MegaPhase.* import core.DenotTransformers.{IdentityDenotTransformer} -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Flags._ +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Flags.* import ast.tpd object UncacheGivenAliases: @@ -23,7 +23,7 @@ object UncacheGivenAliases: */ class UncacheGivenAliases extends MiniPhase with IdentityDenotTransformer: thisPhase => - import tpd._ + import tpd.* override def phaseName: String = UncacheGivenAliases.name diff --git a/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala b/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala index a7ccaa19d90a..f22fc53e9b6e 100644 --- a/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala +++ b/compiler/src/dotty/tools/dotc/transform/UninitializedDefs.scala @@ -1,10 +1,10 @@ package dotty.tools.dotc package transform -import core._ -import Contexts._ -import Flags._ -import Symbols._ +import core.* +import Contexts.* +import Flags.* +import Symbols.* import MegaPhase.MiniPhase import StdNames.nme import ast.tpd @@ -19,7 +19,7 @@ import ast.tpd * @syntax markdown */ class UninitializedDefs extends MiniPhase: - import tpd._ + import tpd.* override def phaseName: String = UninitializedDefs.name diff --git a/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala b/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala index 879a885d626e..6430dd7248b1 100644 --- a/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala +++ b/compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala @@ -2,10 +2,10 @@ package dotty.tools.dotc package transform import ast.tpd -import core._ -import Contexts._, Symbols._, Types._, Flags._, Phases._ -import DenotTransformers._, MegaPhase._ -import TreeExtractors._, ValueClasses._ +import core.* +import Contexts.*, Symbols.*, Types.*, Flags.*, Phases.* +import DenotTransformers.*, MegaPhase.* +import TreeExtractors.*, ValueClasses.* /** This phase elides unnecessary value class allocations * @@ -16,7 +16,7 @@ import TreeExtractors._, ValueClasses._ * (new V(u)).underlying() => u */ class VCElideAllocations extends MiniPhase with IdentityDenotTransformer { - import tpd._ + import tpd.* override def phaseName: String = VCElideAllocations.name diff --git a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala index 219945d4ebb1..fb1dd04bd6ad 100644 --- a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala @@ -3,10 +3,10 @@ package dotc package transform import ast.{Trees, tpd} -import core._ -import Contexts._, Trees._, Types._ -import DenotTransformers._, MegaPhase._ -import ExtensionMethods._, ValueClasses._ +import core.* +import Contexts.*, Trees.*, Types.* +import DenotTransformers.*, MegaPhase.* +import ExtensionMethods.*, ValueClasses.* /** This phase inlines calls to methods of value classes. @@ -40,7 +40,7 @@ import ExtensionMethods._, ValueClasses._ * need to have any knowledge of the name mangling done by other phases. */ class VCInlineMethods extends MiniPhase with IdentityDenotTransformer { - import tpd._ + import tpd.* override def phaseName: String = VCInlineMethods.name diff --git a/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala b/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala index 28d1255eaa72..d0c012322fce 100644 --- a/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala +++ b/compiler/src/dotty/tools/dotc/transform/ValueClasses.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package transform -import core._ -import Types._ -import Symbols._ -import Contexts._ -import Phases._ -import Flags._ -import StdNames._ -import SymUtils._ +import core.* +import Types.* +import Symbols.* +import Contexts.* +import Phases.* +import Flags.* +import StdNames.* +import SymUtils.* /** Methods that apply to user-defined value classes */ object ValueClasses { diff --git a/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala b/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala index 3cf74ee3fdb3..1365bc36e958 100644 --- a/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala +++ b/compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala @@ -2,16 +2,16 @@ package dotty.tools.dotc package transform import dotty.tools.dotc.ast.{tpd, untpd} -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Phases.{Phase, postTyperPhase} -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.util.SourceFile /** Ycheck inlined positions */ class YCheckPositions extends Phase { - import tpd._ + import tpd.* override def phaseName: String = YCheckPositions.name diff --git a/compiler/src/dotty/tools/dotc/transform/init/Checker.scala b/compiler/src/dotty/tools/dotc/transform/init/Checker.scala index 523a82dcd947..0b6b80a6d83b 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Checker.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Checker.scala @@ -2,22 +2,22 @@ package dotty.tools.dotc package transform package init -import dotty.tools.dotc._ +import dotty.tools.dotc.* import ast.tpd -import tpd._ +import tpd.* -import dotty.tools.dotc.core._ -import Contexts._ -import Types._ -import Symbols._ -import StdNames._ +import dotty.tools.dotc.core.* +import Contexts.* +import Types.* +import Symbols.* +import StdNames.* -import dotty.tools.dotc.transform._ -import Phases._ +import dotty.tools.dotc.transform.* +import Phases.* import scala.collection.mutable -import Semantic._ +import Semantic.* import dotty.tools.unsupported class Checker extends Phase: diff --git a/compiler/src/dotty/tools/dotc/transform/init/Errors.scala b/compiler/src/dotty/tools/dotc/transform/init/Errors.scala index 366fd6be96a2..85feb609c90a 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Errors.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Errors.scala @@ -3,11 +3,11 @@ package dotc package transform package init -import ast.tpd._ -import core._ +import ast.tpd.* +import core.* import util.Property import util.SourcePosition -import Types._, Symbols._, Contexts._ +import Types.*, Symbols.*, Contexts.* import Trace.Trace diff --git a/compiler/src/dotty/tools/dotc/transform/init/Trace.scala b/compiler/src/dotty/tools/dotc/transform/init/Trace.scala index 7dfbc0b6cfa5..f4ce260f7c60 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Trace.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Trace.scala @@ -7,7 +7,7 @@ import Contexts.* import ast.tpd.* import util.SourcePosition -import Decorators._, printing.SyntaxHighlighting +import Decorators.*, printing.SyntaxHighlighting import scala.collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala b/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala index ff8d89920791..9e40792895c0 100644 --- a/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala @@ -10,9 +10,9 @@ import scala.util.matching.Regex.Match import PartialFunction.cond import dotty.tools.dotc.ast.tpd.{Match => _, *} -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Symbols._ -import dotty.tools.dotc.core.Types._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.core.Phases.typerPhase import dotty.tools.dotc.util.Spans.Span diff --git a/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala b/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala index 5cad7ba72831..7743054f5487 100644 --- a/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala +++ b/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala @@ -4,12 +4,12 @@ package transform.localopt import scala.language.unsafeNulls import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.Constants.Constant -import dotty.tools.dotc.core.Contexts._ -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.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase import dotty.tools.dotc.typer.ConstFold diff --git a/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala b/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala index 1dbbd5d15202..5c8b2ee90712 100644 --- a/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala +++ b/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala @@ -3,23 +3,23 @@ package dotc package transform package patmat -import core._ -import Types._ -import TypeUtils._ -import Contexts._ -import Flags._ -import ast._ +import core.* +import Types.* +import TypeUtils.* +import Contexts.* +import Flags.* +import ast.* import Decorators.{ show => _, * } -import Symbols._ -import StdNames._ -import NameOps._ -import Constants._ -import typer._ -import Applications._ -import Inferencing._ -import ProtoTypes._ -import transform.SymUtils._ -import reporting._ +import Symbols.* +import StdNames.* +import NameOps.* +import Constants.* +import typer.* +import Applications.* +import Inferencing.* +import ProtoTypes.* +import transform.SymUtils.* +import reporting.* import config.Printers.{exhaustivity => debug} import util.{SrcPos, NoSourcePosition} @@ -116,7 +116,7 @@ case class Prod(tp: Type, unappTp: TermRef, params: List[Space]) extends Space case class Or(spaces: Seq[Space]) extends Space object SpaceEngine { - import tpd._ + import tpd.* def simplify(space: Space)(using Context): Space = space.simplify def isSubspace(a: Space, b: Space)(using Context): Boolean = a.isSubspace(b) diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala b/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala index 6471e58d4ddc..951024f3d4db 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala @@ -3,12 +3,12 @@ package dotc package transform package sjs -import MegaPhase._ +import MegaPhase.* import core.Constants -import core.Contexts._ -import core.Decorators._ +import core.Contexts.* +import core.Decorators.* import core.StdNames.nme -import core.Symbols._ +import core.Symbols.* import dotty.tools.backend.sjs.JSDefinitions.jsdefn @@ -46,7 +46,7 @@ import dotty.tools.backend.sjs.JSDefinitions.jsdefn */ class AddLocalJSFakeNews extends MiniPhase { thisPhase => import ExplicitOuter.outer - import ast.tpd._ + import ast.tpd.* override def phaseName: String = AddLocalJSFakeNews.name diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala b/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala index 705b3cc404a8..5143b415d47b 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala @@ -4,27 +4,27 @@ package transform package sjs -import MegaPhase._ -import core.Annotations._ -import core.Constants._ -import core.Denotations._ -import core.DenotTransformers._ -import core.Symbols._ -import core.Contexts._ -import core.Types._ -import core.Flags._ -import core.Decorators._ +import MegaPhase.* +import core.Annotations.* +import core.Constants.* +import core.Denotations.* +import core.DenotTransformers.* +import core.Symbols.* +import core.Contexts.* +import core.Types.* +import core.Flags.* +import core.Decorators.* import core.StdNames.nme import core.SymDenotations.SymDenotation -import core.Names._ -import core.NameKinds._ -import SymUtils._ +import core.Names.* +import core.NameKinds.* +import SymUtils.* import util.Store import dotty.tools.backend.sjs.JSDefinitions.jsdefn -import JSSymUtils._ +import JSSymUtils.* /** This phase makes all JS classes explicit (their definitions and references to them). * @@ -229,8 +229,8 @@ import JSSymUtils._ * created by step (C). */ class ExplicitJSClasses extends MiniPhase with InfoTransformer { thisPhase => - import ExplicitJSClasses._ - import ast.tpd._ + import ExplicitJSClasses.* + import ast.tpd.* override def phaseName: String = ExplicitJSClasses.name diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/JSExportUtils.scala b/compiler/src/dotty/tools/dotc/transform/sjs/JSExportUtils.scala index 9abf9a919d6d..2b0ed3c4880e 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/JSExportUtils.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/JSExportUtils.scala @@ -4,9 +4,9 @@ package sjs import scala.language.unsafeNulls -import core._ +import core.* import NameKinds.DefaultGetterName -import Names._ +import Names.* /** Utilities for JS exports handling. */ diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/JSSymUtils.scala b/compiler/src/dotty/tools/dotc/transform/sjs/JSSymUtils.scala index ae6635bce622..fafa1eb3cf79 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/JSSymUtils.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/JSSymUtils.scala @@ -2,18 +2,18 @@ package dotty.tools.dotc package transform package sjs -import core._ -import Constants._ -import Contexts._ -import Flags._ -import NameOps._ -import Names._ -import Phases._ -import StdNames._ -import Symbols._ -import SymUtils._ -import ast.Trees._ -import Types._ +import core.* +import Constants.* +import Contexts.* +import Flags.* +import NameOps.* +import Names.* +import Phases.* +import StdNames.* +import Symbols.* +import SymUtils.* +import ast.Trees.* +import Types.* import dotty.tools.backend.sjs.JSDefinitions.jsdefn diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala b/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala index b911d7dfab96..7655eb79d6d4 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala @@ -4,18 +4,18 @@ package sjs import scala.annotation.tailrec -import dotty.tools.dotc.core._ -import Constants._ -import Contexts._ -import Flags._ -import Names._ -import Scopes._ -import Symbols._ -import StdNames._ -import Types._ +import dotty.tools.dotc.core.* +import Constants.* +import Contexts.* +import Flags.* +import Names.* +import Scopes.* +import Symbols.* +import StdNames.* +import Types.* import Decorators.em -import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.dotc.transform.MegaPhase.* import dotty.tools.backend.sjs.JSDefinitions.jsdefn @@ -106,8 +106,8 @@ import dotty.tools.backend.sjs.JSDefinitions.jsdefn * some point in the future. */ class JUnitBootstrappers extends MiniPhase { - import JUnitBootstrappers._ - import ast.tpd._ + import JUnitBootstrappers.* + import ast.tpd.* override def phaseName: String = JUnitBootstrappers.name diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala index 25ab46712e70..d7073ac2e261 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala @@ -3,29 +3,29 @@ package transform package sjs import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core._ -import Contexts._ -import Decorators._ -import Denotations._ -import Flags._ +import dotty.tools.dotc.core.* +import Contexts.* +import Decorators.* +import Denotations.* +import Flags.* import NameKinds.DefaultGetterName -import StdNames._ -import Symbols._ -import SymUtils._ -import Types._ +import StdNames.* +import Symbols.* +import SymUtils.* +import Types.* import util.Spans.Span import util.SrcPos import dotty.tools.backend.sjs.JSDefinitions.jsdefn -import JSExportUtils._ -import JSSymUtils._ +import JSExportUtils.* +import JSSymUtils.* import org.scalajs.ir.Names.DefaultModuleID import org.scalajs.ir.Trees.TopLevelExportDef.isValidTopLevelExportName object PrepJSExports { - import tpd._ + import tpd.* import PrepJSInterop.{checkSetterSignature, isJSAny, isPrivateMaybeWithin} private sealed abstract class ExportDestination diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala index a2f9a0fb45a3..2da2a98837c7 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala @@ -5,23 +5,23 @@ package sjs import scala.collection.mutable import ast.tpd -import core._ +import core.* import typer.Checking import util.SrcPos -import Annotations._ -import Constants._ -import Contexts._ -import Decorators._ -import DenotTransformers._ -import Flags._ +import Annotations.* +import Constants.* +import Contexts.* +import Decorators.* +import DenotTransformers.* +import Flags.* import NameKinds.{DefaultGetterName, ModuleClassName} -import NameOps._ -import StdNames._ -import Symbols._ -import SymUtils._ -import Types._ +import NameOps.* +import StdNames.* +import Symbols.* +import SymUtils.* +import Types.* -import JSSymUtils._ +import JSSymUtils.* import org.scalajs.ir.Trees.JSGlobalRef @@ -52,8 +52,8 @@ import dotty.tools.backend.sjs.JSDefinitions.jsdefn * pickling. */ class PrepJSInterop extends MacroTransform with IdentityDenotTransformer { thisPhase => - import PrepJSInterop._ - import tpd._ + import PrepJSInterop.* + import tpd.* override def phaseName: String = PrepJSInterop.name @@ -68,7 +68,7 @@ class PrepJSInterop extends MacroTransform with IdentityDenotTransformer { thisP new ScalaJSPrepJSInteropTransformer class ScalaJSPrepJSInteropTransformer extends Transformer with Checking { - import PrepJSExports._ + import PrepJSExports.* /** Kind of the directly enclosing (most nested) owner. */ private var enclosingOwner: OwnerKind = OwnerKind.None diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index e19e7a4c89dc..aae35b725f6b 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -2,33 +2,33 @@ package dotty.tools package dotc package typer -import core._ +import core.* import ast.{Trees, tpd, untpd, desugar} import util.Stats.record import util.{SrcPos, NoSourcePosition} -import Contexts._ -import Flags._ -import Symbols._ +import Contexts.* +import Flags.* +import Symbols.* import Denotations.Denotation -import Types._ -import Decorators._ -import ErrorReporting._ -import Trees._ -import Names._ -import StdNames._ -import ContextOps._ +import Types.* +import Decorators.* +import ErrorReporting.* +import Trees.* +import Names.* +import StdNames.* +import ContextOps.* import NameKinds.DefaultGetterName -import ProtoTypes._ -import Inferencing._ -import reporting._ -import transform.TypeUtils._ -import transform.SymUtils._ -import Nullables._, NullOpsDecorator.* +import ProtoTypes.* +import Inferencing.* +import reporting.* +import transform.TypeUtils.* +import transform.SymUtils.* +import Nullables.*, NullOpsDecorator.* import config.Feature import collection.mutable import config.Printers.{overload, typr, unapp} -import TypeApplications._ +import TypeApplications.* import Annotations.Annotation import Constants.{Constant, IntTag} @@ -38,7 +38,7 @@ import annotation.threadUnsafe import scala.util.control.NonFatal object Applications { - import tpd._ + import tpd.* def extractorMember(tp: Type, name: Name)(using Context): SingleDenotation = tp.member(name).suchThat(sym => sym.info.isParameterless && sym.info.widenExpr.isValueType) @@ -352,7 +352,7 @@ object Applications { trait Applications extends Compatibility { self: Typer & Dynamic => - import Applications._ + import Applications.* import tpd.{ cpy => _, _ } import untpd.cpy diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 5e9f9c0a3e00..e29bb1f76e6a 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -2,18 +2,18 @@ package dotty.tools package dotc package typer -import core._ -import ast._ -import Contexts._ -import Types._ -import Flags._ -import Names._ -import StdNames._ -import Symbols._ -import Trees._ -import ProtoTypes._ -import Scopes._ -import CheckRealizable._ +import core.* +import ast.* +import Contexts.* +import Types.* +import Flags.* +import Names.* +import StdNames.* +import Symbols.* +import Trees.* +import ProtoTypes.* +import Scopes.* +import CheckRealizable.* import ErrorReporting.errorTree import util.Spans.Span import Phases.refchecksPhase @@ -23,28 +23,28 @@ import util.SrcPos import util.Spans.Span import rewrites.Rewrites.patch import inlines.Inlines -import transform.SymUtils._ -import transform.ValueClasses._ -import Decorators._ +import transform.SymUtils.* +import transform.ValueClasses.* +import Decorators.* import ErrorReporting.{err, errorType} import config.Printers.{typr, patmatch} import NameKinds.DefaultGetterName -import NameOps._ +import NameOps.* import SymDenotations.{NoCompleter, NoDenotation} import Applications.unapplyArgs import Inferencing.isFullyDefined import transform.patmat.SpaceEngine.{isIrrefutable, isIrrefutableQuotedPattern} import config.Feature import config.Feature.sourceVersion -import config.SourceVersion._ +import config.SourceVersion.* import printing.Formatting.hlAsKeyword import transform.TypeUtils.* import collection.mutable -import reporting._ +import reporting.* object Checking { - import tpd._ + import tpd.* /** Add further information for error messages involving applied types if the * type is inferred: @@ -835,7 +835,7 @@ object Checking { trait Checking { - import tpd._ + import tpd.* def checkNonCyclic(sym: Symbol, info: TypeBounds, reportErrors: Boolean)(using Context): Type = Checking.checkNonCyclic(sym, info, reportErrors) @@ -866,7 +866,7 @@ trait Checking { case NonConforming, RefutableExtractor def fail(pat: Tree, pt: Type, reason: Reason): Boolean = { - import Reason._ + import Reason.* val message = reason match case NonConforming => var reportedPt = pt.dropAnnot(defn.UncheckedAnnot) @@ -1552,7 +1552,7 @@ trait Checking { } trait ReChecking extends Checking { - import tpd._ + import tpd.* override def checkEnumParent(cls: Symbol, firstParent: Symbol)(using Context): Unit = () override def checkEnum(cdef: untpd.TypeDef, cls: Symbol, firstParent: Symbol)(using Context): Unit = () override def checkRefsLegal(tree: tpd.Tree, badOwner: Symbol, allowed: (Name, Symbol) => Boolean, where: String)(using Context): Unit = () @@ -1568,7 +1568,7 @@ trait ReChecking extends Checking { } trait NoChecking extends ReChecking { - import tpd._ + import tpd.* override def checkNonCyclic(sym: Symbol, info: TypeBounds, reportErrors: Boolean)(using Context): Type = info override def checkNonCyclicInherited(joint: Type, parents: List[Type], decls: Scope, pos: SrcPos)(using Context): Unit = () override def checkStable(tp: Type, pos: SrcPos, kind: String)(using Context): Unit = () diff --git a/compiler/src/dotty/tools/dotc/typer/ConstFold.scala b/compiler/src/dotty/tools/dotc/typer/ConstFold.scala index 81b1de67b707..22e6260cd04e 100644 --- a/compiler/src/dotty/tools/dotc/typer/ConstFold.scala +++ b/compiler/src/dotty/tools/dotc/typer/ConstFold.scala @@ -3,19 +3,19 @@ package typer import java.lang.ArithmeticException -import ast._ -import core._ -import Symbols._ -import Types._ -import Constants._ -import Names._ -import StdNames._ -import Contexts._ -import transform.TypeUtils._ +import ast.* +import core.* +import Symbols.* +import Types.* +import Constants.* +import Names.* +import StdNames.* +import Contexts.* +import transform.TypeUtils.* object ConstFold: - import tpd._ + import tpd.* private val foldedBinops = Set[Name]( nme.ZOR, nme.OR, nme.XOR, nme.ZAND, nme.AND, nme.EQ, nme.NE, diff --git a/compiler/src/dotty/tools/dotc/typer/Deriving.scala b/compiler/src/dotty/tools/dotc/typer/Deriving.scala index 8fdc468780ba..818781ae7ccb 100644 --- a/compiler/src/dotty/tools/dotc/typer/Deriving.scala +++ b/compiler/src/dotty/tools/dotc/typer/Deriving.scala @@ -2,13 +2,13 @@ package dotty.tools package dotc package typer -import core._ -import ast._ -import ast.Trees._ -import StdNames._ -import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._, Decorators._ -import ProtoTypes._, ContextOps._ -import util.Spans._ +import core.* +import ast.* +import ast.Trees.* +import StdNames.* +import Contexts.*, Symbols.*, Types.*, SymDenotations.*, Names.*, NameOps.*, Flags.*, Decorators.* +import ProtoTypes.*, ContextOps.* +import util.Spans.* import util.SrcPos import collection.mutable import ErrorReporting.errorTree @@ -266,7 +266,7 @@ trait Deriving { /** The synthesized type class instance definitions */ def syntheticDefs: List[tpd.Tree] = { - import tpd._ + import tpd.* /** The type class instance definition with symbol `sym` */ def typeclassInstance(sym: Symbol)(using Context): List[List[tpd.Tree]] => tpd.Tree = diff --git a/compiler/src/dotty/tools/dotc/typer/Docstrings.scala b/compiler/src/dotty/tools/dotc/typer/Docstrings.scala index d819528ff556..33ef3e85e14e 100644 --- a/compiler/src/dotty/tools/dotc/typer/Docstrings.scala +++ b/compiler/src/dotty/tools/dotc/typer/Docstrings.scala @@ -2,8 +2,8 @@ package dotty.tools package dotc package typer -import core._ -import Contexts._, Symbols._, Decorators._, Comments.{_, given} +import core.* +import Contexts.*, Symbols.*, Decorators.*, Comments.{_, given} import ast.tpd object Docstrings { diff --git a/compiler/src/dotty/tools/dotc/typer/Dynamic.scala b/compiler/src/dotty/tools/dotc/typer/Dynamic.scala index 51734e1a5d4b..71b32b639997 100644 --- a/compiler/src/dotty/tools/dotc/typer/Dynamic.scala +++ b/compiler/src/dotty/tools/dotc/typer/Dynamic.scala @@ -67,8 +67,8 @@ object DynamicUnapply { trait Dynamic { self: Typer & Applications => - import Dynamic._ - import tpd._ + import Dynamic.* + import tpd.* /** Translate selection that does not typecheck according to the normal rules into a applyDynamic/applyDynamicNamed. * foo.bar(baz0, baz1, ...) ~~> foo.applyDynamic(bar)(baz0, baz1, ...) diff --git a/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala b/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala index df4ee8bdba5f..33ee68cc9986 100644 --- a/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala +++ b/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala @@ -2,22 +2,22 @@ package dotty.tools package dotc package typer -import ast._ -import core._ -import Types._, ProtoTypes._, Contexts._, Decorators._, Denotations._, Symbols._ -import Implicits._, Flags._, Constants.Constant -import Trees._ -import NameOps._ +import ast.* +import core.* +import Types.*, ProtoTypes.*, Contexts.*, Decorators.*, Denotations.*, Symbols.* +import Implicits.*, Flags.*, Constants.Constant +import Trees.* +import NameOps.* import util.Spans.NoSpan import util.SrcPos import config.Feature -import reporting._ +import reporting.* import collection.mutable object ErrorReporting { - import tpd._ + import tpd.* def errorTree(tree: untpd.Tree, msg: Message, pos: SrcPos)(using Context): tpd.Tree = tree.withType(errorType(msg, pos)) diff --git a/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala b/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala index 8e5ec7525d48..2c441c2f915e 100644 --- a/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala +++ b/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala @@ -2,18 +2,18 @@ package dotty.tools package dotc package typer -import core._ +import core.* import ast.{Trees, untpd, tpd} -import Contexts._ -import Types._ -import Flags._ -import Symbols._ -import Names._ +import Contexts.* +import Types.* +import Flags.* +import Symbols.* +import Names.* import NameKinds.UniqueName -import util.Spans._ +import util.Spans.* import util.Property import collection.mutable -import Trees._ +import Trees.* /** A class that handles argument lifting. Argument lifting is needed in the following * scenarios: @@ -25,7 +25,7 @@ import Trees._ * arguments can be duplicated as arguments to default argument methods. */ abstract class Lifter { - import tpd._ + import tpd.* /** Test indicating `expr` does not need lifting */ def noLift(expr: Tree)(using Context): Boolean @@ -208,7 +208,7 @@ object LiftToDefs extends LiftComplex { /** Lifter for eta expansion */ object EtaExpansion extends LiftImpure { - import tpd._ + import tpd.* /** Eta-expanding a tree means converting a method reference to a function value. * @param tree The tree to expand @@ -264,7 +264,7 @@ object EtaExpansion extends LiftImpure { * But see comment on the `ExprType` case in function `prune` in class `ConstraintHandling`. */ def etaExpand(tree: Tree, mt: MethodType, xarity: Int)(using Context): untpd.Tree = { - import untpd._ + import untpd.* assert(!ctx.isAfterTyper || (ctx.phase eq ctx.base.inliningPhase), ctx.phase) val defs = new mutable.ListBuffer[tpd.Tree] val lifted: Tree = TypedSplice(liftApp(defs, tree)) diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index 5ecddd6f4af0..d3da9de64439 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -3,34 +3,34 @@ package dotc package typer import backend.sjs.JSDefinitions -import core._ +import core.* import ast.{TreeTypeMap, untpd, tpd} -import util.Spans._ +import util.Spans.* import util.Stats.{record, monitored} import printing.{Showable, Printer} -import printing.Texts._ -import Contexts._ -import Types._ -import Flags._ +import printing.Texts.* +import Contexts.* +import Types.* +import Flags.* import Mode.ImplicitsEnabled import NameKinds.{LazyImplicitName, ContextBoundParamName} -import Symbols._ -import Types._ -import Decorators._ -import Names._ -import StdNames._ -import ProtoTypes._ -import ErrorReporting._ +import Symbols.* +import Types.* +import Decorators.* +import Names.* +import StdNames.* +import ProtoTypes.* +import ErrorReporting.* import Inferencing.{fullyDefinedType, isFullyDefined} import Scopes.newScope -import transform.TypeUtils._ -import Hashable._ +import transform.TypeUtils.* +import Hashable.* import util.{EqHashMap, Stats} import config.{Config, Feature} import Feature.migrateTo3 import config.Printers.{implicits, implicitsDetailed} import collection.mutable -import reporting._ +import reporting.* import transform.Splicer import annotation.tailrec @@ -39,7 +39,7 @@ import scala.annotation.threadUnsafe /** Implicit resolution */ object Implicits: - import tpd._ + import tpd.* /** An implicit definition `implicitRef` that is visible under a different name, `alias`. * Gets generated if an implicit ref is imported via a renaming import. @@ -578,7 +578,7 @@ object Implicits: } end Implicits -import Implicits._ +import Implicits.* /** Info relating to implicits that is kept for one run */ trait ImplicitRunInfo: @@ -819,7 +819,7 @@ end ImplicitRunInfo trait Implicits: self: Typer => - import tpd._ + import tpd.* override def viewExists(from: Type, to: Type)(using Context): Boolean = !from.isError @@ -1816,7 +1816,7 @@ final class SearchRoot extends SearchHistory: result match { case failure: SearchFailure => failure case success: SearchSuccess => - import tpd._ + import tpd.* // We might have accumulated dictionary entries for by name implicit arguments // which are not in fact used recursively either directly in the outermost result diff --git a/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala b/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala index b5be2daf873b..a07b991ac532 100644 --- a/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala +++ b/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala @@ -3,10 +3,10 @@ package dotc package typer import ast.{tpd, untpd} -import core._ +import core.* import printing.{Printer, Showable} import util.SimpleIdentityMap -import Symbols._, Names._, Types._, Contexts._, StdNames._, Flags._ +import Symbols.*, Names.*, Types.*, Contexts.*, StdNames.*, Flags.* import Implicits.RenamedImplicitRef import StdNames.nme import printing.Texts.Text diff --git a/compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala b/compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala index f357b972800a..5099e7eaf306 100644 --- a/compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala +++ b/compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala @@ -3,11 +3,11 @@ package dotc package typer import backend.sjs.JSDefinitions -import core._ -import Contexts._, Types._, Symbols._, Names._, Decorators._, ProtoTypes._ -import Flags._, SymDenotations._ +import core.* +import Contexts.*, Types.*, Symbols.*, Names.*, Decorators.*, ProtoTypes.* +import Flags.*, SymDenotations.* import NameKinds.FlatName -import StdNames._ +import StdNames.* import config.Printers.{implicits, implicitsDetailed} import ast.{untpd, tpd} import Implicits.{hasExtMethod, Candidate} @@ -24,7 +24,7 @@ trait ImportSuggestions: /** The maximal number of suggested imports to make */ inline val MaxSuggestions = 10 - import tpd._ + import tpd.* /** Timeout to test a single implicit value as a suggestion, in ms */ private inline val testOneImplicitTimeOut = 500 diff --git a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala index bcb33dc60956..41c4ed6a6e5b 100644 --- a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala @@ -2,23 +2,23 @@ package dotty.tools package dotc package typer -import core._ -import ast._ -import Contexts._, Types._, Flags._, Symbols._ -import ProtoTypes._ +import core.* +import ast.* +import Contexts.*, Types.*, Flags.*, Symbols.* +import ProtoTypes.* import NameKinds.UniqueName -import util.Spans._ +import util.Spans.* import util.{Stats, SimpleIdentityMap, SimpleIdentitySet, SrcPos} -import Decorators._ +import Decorators.* import config.Printers.{gadts, typr} import annotation.tailrec -import reporting._ +import reporting.* import collection.mutable import scala.annotation.internal.sharable object Inferencing { - import tpd._ + import tpd.* /** Is type fully defined, meaning the type does not contain wildcard types * or uninstantiated type variables. As a side effect, this will minimize @@ -550,8 +550,8 @@ object Inferencing { } trait Inferencing { this: Typer => - import Inferencing._ - import tpd._ + import Inferencing.* + import tpd.* /** Interpolate undetermined type variables in the widened type of this tree. * @param tree the tree whose type is interpolated diff --git a/compiler/src/dotty/tools/dotc/typer/JavaChecks.scala b/compiler/src/dotty/tools/dotc/typer/JavaChecks.scala index 89caf5e1c474..bbc34bc692f9 100644 --- a/compiler/src/dotty/tools/dotc/typer/JavaChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/JavaChecks.scala @@ -1,8 +1,8 @@ package dotty.tools.dotc package typer -import core.Contexts._ -import ast.tpd._ +import core.Contexts.* +import ast.tpd.* /** PostTyper doesn't run on java sources, * but some checks still need to be applied. diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala index cbc2796c3895..b3533db98dff 100644 --- a/compiler/src/dotty/tools/dotc/typer/Namer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package typer -import core._ -import ast._ -import Trees._, StdNames._, Scopes._, Denotations._, NamerOps._, ContextOps._ -import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._ -import Decorators._, Comments.{_, given} +import core.* +import ast.* +import Trees.*, StdNames.*, Scopes.*, Denotations.*, NamerOps.*, ContextOps.* +import Contexts.*, Symbols.*, Types.*, SymDenotations.*, Names.*, NameOps.*, Flags.* +import Decorators.*, Comments.{_, given} import NameKinds.DefaultGetterName -import ast.desugar, ast.desugar._ -import ProtoTypes._ -import util.Spans._ +import ast.desugar, ast.desugar.* +import ProtoTypes.* +import util.Spans.* import util.Property import collection.mutable import tpd.tpes @@ -20,15 +20,15 @@ import config.Printers.typr import inlines.{Inlines, PrepareInlineable} import parsing.JavaParsers.JavaParser import parsing.Parsers.Parser -import Annotations._ -import Inferencing._ -import transform.ValueClasses._ -import transform.TypeUtils._ -import transform.SymUtils._ +import Annotations.* +import Inferencing.* +import transform.ValueClasses.* +import transform.TypeUtils.* +import transform.SymUtils.* import TypeErasure.erasure -import reporting._ +import reporting.* import config.Feature.sourceVersion -import config.SourceVersion._ +import config.SourceVersion.* /** This class creates symbols from definitions and imports and gives them @@ -53,7 +53,7 @@ import config.SourceVersion._ */ class Namer { typer: Typer => - import untpd._ + import untpd.* val TypedAhead : Property.Key[tpd.Tree] = new Property.Key val ExpandedTree : Property.Key[untpd.Tree] = new Property.Key @@ -1250,7 +1250,7 @@ class Namer { typer: Typer => if forwarder.isType then buf += tpd.TypeDef(forwarder.asType).withSpan(span) else - import tpd._ + import tpd.* def extensionParamsCount(pt: Type): Int = pt match case pt: MethodOrPoly => 1 + extensionParamsCount(pt.resType) case _ => 0 diff --git a/compiler/src/dotty/tools/dotc/typer/Nullables.scala b/compiler/src/dotty/tools/dotc/typer/Nullables.scala index 722dc2186693..4c536abd0fcd 100644 --- a/compiler/src/dotty/tools/dotc/typer/Nullables.scala +++ b/compiler/src/dotty/tools/dotc/typer/Nullables.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package typer -import core._ -import Types._, Contexts._, Symbols._, Decorators._, Constants._ +import core.* +import Types.*, Contexts.*, Symbols.*, Decorators.*, Constants.* import annotation.tailrec import StdNames.nme import util.Property import Names.Name import util.Spans.Span -import Flags._ -import NullOpsDecorator._ +import Flags.* +import NullOpsDecorator.* import collection.mutable import config.Printers.nullables import ast.{tpd, untpd} @@ -18,7 +18,7 @@ import ast.Trees.mods /** Operations for implementing a flow analysis for nullability */ object Nullables: - import ast.tpd._ + import ast.tpd.* def importUnsafeNulls(using Context): Import = Import( ref(defn.LanguageModule), @@ -401,7 +401,7 @@ object Nullables: * because of shadowing. */ def assignmentSpans(using Context): Map[Int, List[Span]] = - import ast.untpd._ + import ast.untpd.* object populate extends UntypedTreeTraverser: diff --git a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala index 7eadd72922a4..6a75b8f6ee4f 100644 --- a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -2,15 +2,15 @@ package dotty.tools package dotc package typer -import core._ -import ast._ -import Contexts._, Types._, Denotations._, Names._, StdNames._, NameOps._, Symbols._ +import core.* +import ast.* +import Contexts.*, Types.*, Denotations.*, Names.*, StdNames.*, NameOps.*, Symbols.* import NameKinds.DepParamName -import Trees._ -import Constants._ +import Trees.* +import Constants.* import util.{Stats, SimpleIdentityMap, SimpleIdentitySet} -import Decorators._ -import Uniques._ +import Decorators.* +import Uniques.* import inlines.Inlines import config.Printers.typr import Inferencing.* @@ -23,7 +23,7 @@ import dotty.tools.dotc.util.Spans.{NoSpan, Span} object ProtoTypes { - import tpd._ + import tpd.* /** A trait defining an `isCompatible` method. */ trait Compatibility { diff --git a/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala b/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala index 20c403675d4e..a6742c278d78 100644 --- a/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala +++ b/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala @@ -1,26 +1,26 @@ package dotty.tools.dotc package typer -import dotty.tools.dotc.ast._ -import dotty.tools.dotc.config.Feature._ -import dotty.tools.dotc.config.SourceVersion._ -import dotty.tools.dotc.core._ -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.ast.* +import dotty.tools.dotc.config.Feature.* +import dotty.tools.dotc.config.SourceVersion.* +import dotty.tools.dotc.core.* +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.PatMatGivenVarName -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.core.Names.* +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* +import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.inlines.PrepareInlineable import dotty.tools.dotc.staging.StagingLevel.* -import dotty.tools.dotc.transform.SymUtils._ +import dotty.tools.dotc.transform.SymUtils.* import dotty.tools.dotc.typer.ErrorReporting.errorTree -import dotty.tools.dotc.typer.Implicits._ -import dotty.tools.dotc.typer.Inferencing._ -import dotty.tools.dotc.util.Spans._ +import dotty.tools.dotc.typer.Implicits.* +import dotty.tools.dotc.typer.Inferencing.* +import dotty.tools.dotc.util.Spans.* import dotty.tools.dotc.util.Stats.record import dotty.tools.dotc.reporting.IllegalVariableInPatternAlternative import scala.collection.mutable @@ -30,7 +30,7 @@ import scala.collection.mutable trait QuotesAndSplices { self: Typer => - import tpd._ + import tpd.* /** Translate `'{ e }` into `scala.quoted.Expr.apply(e)` and `'[T]` into `scala.quoted.Type.apply[T]` * while tracking the quotation level in the context. diff --git a/compiler/src/dotty/tools/dotc/typer/ReTyper.scala b/compiler/src/dotty/tools/dotc/typer/ReTyper.scala index 87d08f217e8b..3117eb8bdad2 100644 --- a/compiler/src/dotty/tools/dotc/typer/ReTyper.scala +++ b/compiler/src/dotty/tools/dotc/typer/ReTyper.scala @@ -1,17 +1,17 @@ package dotty.tools.dotc package typer -import core._ -import Contexts._ -import Types._ -import Symbols._ -import StdNames._ -import Decorators._ -import typer.ProtoTypes._ +import core.* +import Contexts.* +import Types.* +import Symbols.* +import StdNames.* +import Decorators.* +import typer.ProtoTypes.* import ast.{tpd, untpd} import scala.util.control.NonFatal import util.Spans.Span -import Nullables._ +import Nullables.* import staging.StagingLevel.* /** A version of Typer that keeps all symbols defined and referenced in a @@ -23,7 +23,7 @@ import staging.StagingLevel.* * Otherwise, everything is as in Typer. */ class ReTyper(nestingLevel: Int = 0) extends Typer(nestingLevel) with ReChecking { - import tpd._ + import tpd.* private def assertTyped(tree: untpd.Tree)(using Context): Unit = assert(tree.hasType, i"$tree ${tree.getClass} ${tree.uniqueId}") diff --git a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala index c1045f770749..53ceae7500d8 100644 --- a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala @@ -2,27 +2,27 @@ package dotty.tools package dotc package typer -import transform._ -import core._ -import Symbols._, Types._, Contexts._, Flags._, Names._, NameOps._, NameKinds._ -import StdNames._, Denotations._, SymUtils._, Phases._, SymDenotations._ +import transform.* +import core.* +import Symbols.*, Types.*, Contexts.*, Flags.*, Names.*, NameOps.*, NameKinds.* +import StdNames.*, Denotations.*, SymUtils.*, Phases.*, SymDenotations.* import NameKinds.DefaultGetterName -import util.Spans._ +import util.Spans.* import scala.collection.mutable -import ast._ -import MegaPhase._ +import ast.* +import MegaPhase.* import config.Printers.{checks, noPrinter} -import Decorators._ +import Decorators.* import OverridingPairs.isOverridingPair -import typer.ErrorReporting._ +import typer.ErrorReporting.* import config.Feature.{warnOnMigration, migrateTo3, sourceVersion} import config.SourceVersion.{`3.0`, `future`} import config.Printers.refcheck -import reporting._ +import reporting.* import Constants.Constant object RefChecks { - import tpd._ + import tpd.* val name: String = "refchecks" val description: String = "checks related to abstract members and overriding" @@ -1101,7 +1101,7 @@ object RefChecks { report.warning(UnqualifiedCallToAnyRefMethod(tree, tree.symbol), tree) } -import RefChecks._ +import RefChecks.* /** Post-attribution checking and transformation, which fulfills the following roles * @@ -1135,7 +1135,7 @@ import RefChecks._ */ class RefChecks extends MiniPhase { thisPhase => - import tpd._ + import tpd.* override def phaseName: String = RefChecks.name diff --git a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala index c9ee5b0e2c8d..df3ccb4337d0 100644 --- a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala @@ -2,23 +2,23 @@ package dotty.tools package dotc package typer -import core._ +import core.* import util.Spans.Span -import Contexts._ -import Types._, Flags._, Symbols._, Names._, StdNames._, Constants._ +import Contexts.* +import Types.*, Flags.*, Symbols.*, Names.*, StdNames.*, Constants.* import TypeErasure.{erasure, hasStableErasure} -import Decorators._ -import ProtoTypes._ +import Decorators.* +import ProtoTypes.* import Inferencing.{fullyDefinedType, isFullyDefined} import ast.untpd -import transform.SymUtils._ -import transform.TypeUtils._ -import transform.SyntheticMembers._ +import transform.SymUtils.* +import transform.TypeUtils.* +import transform.SyntheticMembers.* import util.Property import ast.Trees.genericEmptyTree import annotation.{tailrec, constructorOnly} -import ast.tpd._ -import Synthesizer._ +import ast.tpd.* +import Synthesizer.* /** Synthesize terms for special classes */ class Synthesizer(typer: Typer)(using @constructorOnly c: Context): diff --git a/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala b/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala index 052d633e0cea..0896d78c7229 100644 --- a/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -2,14 +2,14 @@ package dotty.tools package dotc package typer -import core._ -import ast._ -import Contexts._, ContextOps._, Constants._, Types._, Symbols._, Names._, Flags._, Decorators._ -import ErrorReporting._, Annotations._, Denotations._, SymDenotations._, StdNames._ +import core.* +import ast.* +import Contexts.*, ContextOps.*, Constants.*, Types.*, Symbols.*, Names.*, Flags.*, Decorators.* +import ErrorReporting.*, Annotations.*, Denotations.*, SymDenotations.*, StdNames.* import util.SrcPos -import NameOps._ +import NameOps.* import collection.mutable -import reporting._ +import reporting.* import Checking.{checkNoPrivateLeaks, checkNoWildcard} import cc.CaptureSet diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index 64188d94d21b..ffabe0d7bde9 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -3,53 +3,53 @@ package dotc package typer import backend.sjs.JSDefinitions -import core._ -import ast._ -import Trees._ -import Constants._ -import StdNames._ -import Scopes._ -import Denotations._ -import ProtoTypes._ -import Contexts._ -import Symbols._ -import Types._ -import SymDenotations._ -import Annotations._ -import Names._ -import NameOps._ -import NameKinds._ -import NamerOps._ -import ContextOps._ -import Flags._ -import Decorators._ -import ErrorReporting._ -import Checking._ -import Inferencing._ +import core.* +import ast.* +import Trees.* +import Constants.* +import StdNames.* +import Scopes.* +import Denotations.* +import ProtoTypes.* +import Contexts.* +import Symbols.* +import Types.* +import SymDenotations.* +import Annotations.* +import Names.* +import NameOps.* +import NameKinds.* +import NamerOps.* +import ContextOps.* +import Flags.* +import Decorators.* +import ErrorReporting.* +import Checking.* +import Inferencing.* import Dynamic.isDynamicExpansion import EtaExpansion.etaExpand import TypeComparer.CompareResult import inlines.{Inlines, PrepareInlineable} -import util.Spans._ -import util.common._ +import util.Spans.* +import util.common.* import util.{Property, SimpleIdentityMap, SrcPos} import Applications.{tupleComponentTypes, wrapDefs, defaultArgument} import collection.mutable import annotation.tailrec -import Implicits._ +import Implicits.* import util.Stats.record import config.Printers.{gadts, typr} import config.Feature import config.Feature.{sourceVersion, migrateTo3} -import config.SourceVersion._ +import config.SourceVersion.* import rewrites.Rewrites.patch import staging.StagingLevel -import transform.SymUtils._ -import transform.TypeUtils._ -import reporting._ -import Nullables._ -import NullOpsDecorator._ +import transform.SymUtils.* +import transform.TypeUtils.* +import reporting.* +import Nullables.* +import NullOpsDecorator.* import cc.CheckCaptures import config.Config @@ -125,7 +125,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer with QuotesAndSplices with Deriving { - import Typer._ + import Typer.* import tpd.{cpy => _, _} import untpd.cpy @@ -212,7 +212,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer * or else `NoContext` if nothing was found yet. */ def findRefRecur(previous: Type, prevPrec: BindingPrec, prevCtx: Context)(using Context): Type = { - import BindingPrec._ + import BindingPrec.* /** Check that any previously found result from an inner context * does properly shadow the new one from an outer context. @@ -812,8 +812,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer } def typedNumber(tree: untpd.Number, pt: Type)(using Context): Tree = { - import scala.util.FromDigits._ - import untpd.NumberKind._ + import scala.util.FromDigits.* + import untpd.NumberKind.* record("typedNumber") val digits = tree.digits val target = pt.dealias @@ -895,7 +895,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer def typedNew(tree: untpd.New, pt: Type)(using Context): Tree = tree.tpt match { case templ: untpd.Template => - import untpd._ + import untpd.* var templ1 = templ def isEligible(tp: Type) = tp.exists @@ -939,7 +939,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer case id: untpd.Ident if (ctx.mode is Mode.Pattern) && untpd.isVarPattern(id) => if (id.name == nme.WILDCARD || id.name == nme.WILDCARD_STAR) ifPat else { - import untpd._ + import untpd.* typed(Bind(id.name, Typed(Ident(wildName), tree.tpt)).withSpan(tree.span), pt) } case _ => ifExpr diff --git a/compiler/src/dotty/tools/dotc/typer/TyperPhase.scala b/compiler/src/dotty/tools/dotc/typer/TyperPhase.scala index 857ed1bad4d9..b79235f4f819 100644 --- a/compiler/src/dotty/tools/dotc/typer/TyperPhase.scala +++ b/compiler/src/dotty/tools/dotc/typer/TyperPhase.scala @@ -2,16 +2,16 @@ package dotty.tools package dotc package typer -import core._ +import core.* import Run.SubPhase -import Phases._ -import Contexts._ -import Symbols._ +import Phases.* +import Contexts.* +import Symbols.* import ImportInfo.withRootImports import parsing.{Parser => ParserPhase} import config.Printers.typr import inlines.PrepareInlineable -import util.Stats._ +import util.Stats.* /** * diff --git a/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala b/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala index bcfc9288d862..b02220b3f393 100644 --- a/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala +++ b/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala @@ -2,11 +2,11 @@ package dotty.tools.dotc package typer import dotty.tools.dotc.ast.{ Trees, tpd } -import core._ -import Types._, Contexts._, Flags._, Symbols._, Trees._ -import Decorators._ -import Variances._ -import NameKinds._ +import core.* +import Types.*, Contexts.*, Flags.*, Symbols.*, Trees.* +import Decorators.* +import Variances.* +import NameKinds.* import util.SrcPos import config.Printers.variances import config.Feature.migrateTo3 @@ -63,8 +63,8 @@ object VarianceChecker { } class VarianceChecker(using Context) { - import VarianceChecker._ - import tpd._ + import VarianceChecker.* + import tpd.* private object Validator extends TypeAccumulator[Option[VarianceError]] { private var base: Symbol = _ diff --git a/compiler/src/dotty/tools/dotc/util/CommentParsing.scala b/compiler/src/dotty/tools/dotc/util/CommentParsing.scala index b4af59c09310..7224e28fe477 100644 --- a/compiler/src/dotty/tools/dotc/util/CommentParsing.scala +++ b/compiler/src/dotty/tools/dotc/util/CommentParsing.scala @@ -17,7 +17,7 @@ import scala.collection.mutable * handled by scaladoc. */ object CommentParsing { - import Chars._ + import Chars.* /** Returns index of string `str` following `start` skipping longest * sequence of whitespace characters characters (but no newlines) diff --git a/compiler/src/dotty/tools/dotc/util/LRUCache.scala b/compiler/src/dotty/tools/dotc/util/LRUCache.scala index 99ee8a80227b..e124159575e7 100644 --- a/compiler/src/dotty/tools/dotc/util/LRUCache.scala +++ b/compiler/src/dotty/tools/dotc/util/LRUCache.scala @@ -18,7 +18,7 @@ import annotation.tailrec * at the `last` position. */ class LRUCache[Key >: Null <: AnyRef : ClassTag, Value >: Null: ClassTag] { - import LRUCache._ + import LRUCache.* val keys: Array[Key] = new Array[Key](Retained) val values: Array[Value] = new Array(Retained) var next: SixteenNibbles = new SixteenNibbles(initialRing.bits) diff --git a/compiler/src/dotty/tools/dotc/util/NameTransformer.scala b/compiler/src/dotty/tools/dotc/util/NameTransformer.scala index 61cf238fbc7f..f641ea90dcdd 100644 --- a/compiler/src/dotty/tools/dotc/util/NameTransformer.scala +++ b/compiler/src/dotty/tools/dotc/util/NameTransformer.scala @@ -4,7 +4,7 @@ package util import scala.language.unsafeNulls -import core.Names._ +import core.Names.* import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/util/ParsedComment.scala b/compiler/src/dotty/tools/dotc/util/ParsedComment.scala index ac724f7e336f..7509ef66e533 100644 --- a/compiler/src/dotty/tools/dotc/util/ParsedComment.scala +++ b/compiler/src/dotty/tools/dotc/util/ParsedComment.scala @@ -3,9 +3,9 @@ package dotty.tools.dotc.util import scala.language.unsafeNulls import dotty.tools.dotc.core.Comments.{Comment, CommentsContext} -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Names.TermName -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.printing.SyntaxHighlighting import scala.Console.{BOLD, RESET} diff --git a/compiler/src/dotty/tools/dotc/util/ReusableInstance.scala b/compiler/src/dotty/tools/dotc/util/ReusableInstance.scala index 4dd897dd082a..ec88b5880745 100644 --- a/compiler/src/dotty/tools/dotc/util/ReusableInstance.scala +++ b/compiler/src/dotty/tools/dotc/util/ReusableInstance.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc.util import scala.collection.mutable.ArrayBuffer -import scala.util.chaining._ +import scala.util.chaining.* /** A wrapper for a list of cached instances of a type `T`. * The wrapper is recursion-reentrant: several instances are kept, so diff --git a/compiler/src/dotty/tools/dotc/util/ShowPickled.scala b/compiler/src/dotty/tools/dotc/util/ShowPickled.scala index f85a57a8f812..8d5d0c27ab0e 100644 --- a/compiler/src/dotty/tools/dotc/util/ShowPickled.scala +++ b/compiler/src/dotty/tools/dotc/util/ShowPickled.scala @@ -8,10 +8,10 @@ import java.lang.Float.intBitsToFloat import java.lang.Double.longBitsToDouble import core.unpickleScala2.PickleBuffer -import core.Names._ +import core.Names.* object ShowPickled { - import core.unpickleScala2.PickleFormat._ + import core.unpickleScala2.PickleFormat.* case class PickleBufferEntry(num: Int, startIndex: Int, tag: Int, bytes: Array[Byte]) { def isName: Boolean = tag == TERMname || tag == TYPEname diff --git a/compiler/src/dotty/tools/dotc/util/Signatures.scala b/compiler/src/dotty/tools/dotc/util/Signatures.scala index 5bb79642278d..c3779d3473cf 100644 --- a/compiler/src/dotty/tools/dotc/util/Signatures.scala +++ b/compiler/src/dotty/tools/dotc/util/Signatures.scala @@ -1,21 +1,21 @@ package dotty.tools.dotc package util -import ast.Trees._ +import ast.Trees.* import ast.tpd import core.Constants.Constant -import core.Contexts._ +import core.Contexts.* import core.Denotations.{SingleDenotation, Denotation} import core.Flags import core.NameOps.isUnapplyName -import core.Names._ +import core.Names.* import core.NameKinds -import core.Types._ +import core.Types.* import core.Symbols.NoSymbol import interactive.Interactive import transform.SymUtils.isLocalToBlock import util.Spans.Span -import reporting._ +import reporting.* object Signatures { diff --git a/compiler/src/dotty/tools/dotc/util/SixteenNibbles.scala b/compiler/src/dotty/tools/dotc/util/SixteenNibbles.scala index 42286aef5d31..b51f6bdcac61 100644 --- a/compiler/src/dotty/tools/dotc/util/SixteenNibbles.scala +++ b/compiler/src/dotty/tools/dotc/util/SixteenNibbles.scala @@ -5,7 +5,7 @@ package dotty.tools.dotc.util * */ class SixteenNibbles(val bits: Long) extends AnyVal { - import SixteenNibbles._ + import SixteenNibbles.* def apply(idx: Int): Int = (bits >>> (idx * Width)).toInt & Mask diff --git a/compiler/src/dotty/tools/dotc/util/SourceFile.scala b/compiler/src/dotty/tools/dotc/util/SourceFile.scala index 3462036d7ba6..48675b6b8eae 100644 --- a/compiler/src/dotty/tools/dotc/util/SourceFile.scala +++ b/compiler/src/dotty/tools/dotc/util/SourceFile.scala @@ -4,12 +4,12 @@ package util import scala.language.unsafeNulls -import dotty.tools.io._ -import Spans._ -import core.Contexts._ +import dotty.tools.io.* +import Spans.* +import core.Contexts.* import scala.io.Codec -import Chars._ +import Chars.* import scala.annotation.internal.sharable import scala.collection.mutable import scala.collection.mutable.ArrayBuffer @@ -61,7 +61,7 @@ object ScriptSourceFile { } class SourceFile(val file: AbstractFile, computeContent: => Array[Char]) extends interfaces.SourceFile { - import SourceFile._ + import SourceFile.* private var myContent: Array[Char] | Null = null @@ -259,7 +259,7 @@ object SourceFile { // and use both slashes as separators, or on other OS and use forward slash // as separator, backslash as file name character. - import scala.jdk.CollectionConverters._ + import scala.jdk.CollectionConverters.* val path = refPath.relativize(sourcePath) path.iterator.asScala.mkString("/") else diff --git a/compiler/src/dotty/tools/dotc/util/SourcePosition.scala b/compiler/src/dotty/tools/dotc/util/SourcePosition.scala index 29f9a34d2292..904704b2349c 100644 --- a/compiler/src/dotty/tools/dotc/util/SourcePosition.scala +++ b/compiler/src/dotty/tools/dotc/util/SourcePosition.scala @@ -5,7 +5,7 @@ package util import scala.language.unsafeNulls import printing.{Showable, Printer} -import printing.Texts._ +import printing.Texts.* import core.Contexts.Context import Spans.{Span, NoSpan} import scala.annotation.internal.sharable diff --git a/compiler/src/dotty/tools/dotc/util/Stats.scala b/compiler/src/dotty/tools/dotc/util/Stats.scala index 5157de832d3c..0b05be8f957b 100644 --- a/compiler/src/dotty/tools/dotc/util/Stats.scala +++ b/compiler/src/dotty/tools/dotc/util/Stats.scala @@ -4,7 +4,7 @@ package util import scala.annotation.internal.sharable -import core.Contexts._ +import core.Contexts.* import collection.mutable @sharable object Stats { diff --git a/compiler/src/dotty/tools/dotc/util/Store.scala b/compiler/src/dotty/tools/dotc/util/Store.scala index d8c9230b9272..8605b9021980 100644 --- a/compiler/src/dotty/tools/dotc/util/Store.scala +++ b/compiler/src/dotty/tools/dotc/util/Store.scala @@ -8,7 +8,7 @@ object Store { } class Store(private val elems: Array[AnyRef | Null]) extends AnyVal { - import Store._ + import Store.* def newLocation[T](): (Location[T], Store) = { val elems1 = new Array[AnyRef | Null](elems.length + 1) diff --git a/compiler/src/dotty/tools/dotc/util/WeakHashSet.scala b/compiler/src/dotty/tools/dotc/util/WeakHashSet.scala index 975826a87a37..d93505f6f3c2 100644 --- a/compiler/src/dotty/tools/dotc/util/WeakHashSet.scala +++ b/compiler/src/dotty/tools/dotc/util/WeakHashSet.scala @@ -6,7 +6,7 @@ import java.lang.ref.{ReferenceQueue, WeakReference} import scala.annotation.{ constructorOnly, tailrec } -import dotty.tools._ +import dotty.tools.* /** * A HashSet where the elements are stored weakly. Elements in this set are eligible for GC if no other @@ -20,7 +20,7 @@ import dotty.tools._ */ abstract class WeakHashSet[A <: AnyRef](initialCapacity: Int = 8, loadFactor: Double = 0.5) extends MutableSet[A] { - import WeakHashSet._ + import WeakHashSet.* type This = WeakHashSet[A] diff --git a/compiler/src/dotty/tools/dotc/util/kwords.sc b/compiler/src/dotty/tools/dotc/util/kwords.sc index 961be3b0aa23..377be9dbcb65 100644 --- a/compiler/src/dotty/tools/dotc/util/kwords.sc +++ b/compiler/src/dotty/tools/dotc/util/kwords.sc @@ -1,8 +1,8 @@ package dotty.tools.dotc.util -import dotty.tools.dotc.parsing._ -import Scanners._ -import Tokens._ +import dotty.tools.dotc.parsing.* +import Scanners.* +import Tokens.* object kwords { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet diff --git a/compiler/src/dotty/tools/io/ClassPath.scala b/compiler/src/dotty/tools/io/ClassPath.scala index b45de57f9850..a6250e5119e1 100644 --- a/compiler/src/dotty/tools/io/ClassPath.scala +++ b/compiler/src/dotty/tools/io/ClassPath.scala @@ -21,7 +21,7 @@ import dotc.classpath.{ PackageEntry, ClassPathEntries, PackageName } * A representation of the compiler's class- or sourcepath. */ trait ClassPath { - import dotty.tools.dotc.classpath._ + import dotty.tools.dotc.classpath.* def asURLs: Seq[URL] final def hasPackage(pkg: String): Boolean = hasPackage(PackageName(pkg)) diff --git a/compiler/src/dotty/tools/io/File.scala b/compiler/src/dotty/tools/io/File.scala index 27f2c077dd6a..efce60d3f86d 100644 --- a/compiler/src/dotty/tools/io/File.scala +++ b/compiler/src/dotty/tools/io/File.scala @@ -12,7 +12,7 @@ import scala.language.unsafeNulls import java.io.{File => JavaIoFile, _} import java.nio.file.{Files, Paths} -import java.nio.file.StandardOpenOption._ +import java.nio.file.StandardOpenOption.* import scala.io.Codec /** diff --git a/compiler/src/dotty/tools/io/Jar.scala b/compiler/src/dotty/tools/io/Jar.scala index 9979a9ca9379..b4c2024bb487 100644 --- a/compiler/src/dotty/tools/io/Jar.scala +++ b/compiler/src/dotty/tools/io/Jar.scala @@ -10,8 +10,8 @@ package io import scala.language.unsafeNulls import java.io.{ InputStream, OutputStream, DataOutputStream } -import java.util.jar._ -import scala.jdk.CollectionConverters._ +import java.util.jar.* +import scala.jdk.CollectionConverters.* import scala.collection.mutable import Attributes.Name import scala.annotation.tailrec @@ -42,7 +42,7 @@ class Jar(file: File) { protected def errorFn(msg: String): Unit = Console println msg - import Jar._ + import Jar.* lazy val jarFile: JarFile = new JarFile(file.jpath.toFile) lazy val manifest: Option[Manifest] = withJarInput(s => Option(s.getManifest)) @@ -142,7 +142,7 @@ object Jar { def underlying: JManifest = manifest def attrs: mutable.Map[Name, String] = manifest.getMainAttributes().asInstanceOf[AttributeMap].asScala withDefaultValue null def initialMainAttrs: Map[Attributes.Name, String] = { - import scala.util.Properties._ + import scala.util.Properties.* Map( Name.MANIFEST_VERSION -> "1.0", ScalaCompilerVersion -> versionNumberString diff --git a/compiler/src/dotty/tools/io/JarArchive.scala b/compiler/src/dotty/tools/io/JarArchive.scala index 8f3b5d8010e4..49b743e83074 100644 --- a/compiler/src/dotty/tools/io/JarArchive.scala +++ b/compiler/src/dotty/tools/io/JarArchive.scala @@ -4,7 +4,7 @@ import scala.language.unsafeNulls import java.nio.file.{FileSystemAlreadyExistsException, FileSystems} -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* /** * This class implements an [[AbstractFile]] backed by a jar diff --git a/compiler/src/dotty/tools/io/Path.scala b/compiler/src/dotty/tools/io/Path.scala index dddb870afc65..c8420c5e381d 100644 --- a/compiler/src/dotty/tools/io/Path.scala +++ b/compiler/src/dotty/tools/io/Path.scala @@ -8,11 +8,11 @@ package dotty.tools.io import scala.language.unsafeNulls import java.io.RandomAccessFile -import java.nio.file._ +import java.nio.file.* import java.net.{URI, URL} import java.nio.file.attribute.{BasicFileAttributes, FileTime} import java.io.IOException -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.util.Random.alphanumeric /** An abstraction for filesystem paths. The differences between @@ -63,7 +63,7 @@ object Path { private[io] def randomPrefix: String = alphanumeric take 6 mkString "" private[io] def fail(msg: String): Nothing = throw FileOperationException(msg) } -import Path._ +import Path.* /** The Path constructor is private so we can enforce some * semantics regarding how a Path might relate to the world. diff --git a/compiler/src/dotty/tools/io/ZipArchive.scala b/compiler/src/dotty/tools/io/ZipArchive.scala index 4383bc187979..77ac3363462b 100644 --- a/compiler/src/dotty/tools/io/ZipArchive.scala +++ b/compiler/src/dotty/tools/io/ZipArchive.scala @@ -13,7 +13,7 @@ import java.nio.file.Files import java.util.zip.{ ZipEntry, ZipFile } import java.util.jar.Manifest import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* /** An abstraction for zip files and streams. Everything is written the way * it is for performance: we come through here a lot on every run. Be careful @@ -52,7 +52,7 @@ object ZipArchive { else path.substring(idx + 1) } } -import ZipArchive._ +import ZipArchive.* /** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */ abstract class ZipArchive(override val jpath: JPath, release: Option[String]) extends AbstractFile with Equals { self => diff --git a/compiler/src/dotty/tools/repl/CollectTopLevelImports.scala b/compiler/src/dotty/tools/repl/CollectTopLevelImports.scala index d539c1986f8d..3de3c2aa5738 100644 --- a/compiler/src/dotty/tools/repl/CollectTopLevelImports.scala +++ b/compiler/src/dotty/tools/repl/CollectTopLevelImports.scala @@ -1,7 +1,7 @@ package dotty.tools.repl import dotty.tools.dotc.ast.tpd -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Phases.Phase /** A phase that collects user defined top level imports. @@ -10,7 +10,7 @@ import dotty.tools.dotc.core.Phases.Phase * after Typer. */ class CollectTopLevelImports extends Phase { - import tpd._ + import tpd.* def phaseName: String = "collectTopLevelImports" diff --git a/compiler/src/dotty/tools/repl/JLineTerminal.scala b/compiler/src/dotty/tools/repl/JLineTerminal.scala index 8e048d786ae1..294f0a331ec2 100644 --- a/compiler/src/dotty/tools/repl/JLineTerminal.scala +++ b/compiler/src/dotty/tools/repl/JLineTerminal.scala @@ -2,15 +2,15 @@ package dotty.tools.repl import scala.language.unsafeNulls -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.parsing.Scanners.Scanner -import dotty.tools.dotc.parsing.Tokens._ +import dotty.tools.dotc.parsing.Tokens.* import dotty.tools.dotc.printing.SyntaxHighlighting import dotty.tools.dotc.reporting.Reporter import dotty.tools.dotc.util.SourceFile import org.jline.reader import org.jline.reader.Parser.ParseContext -import org.jline.reader._ +import org.jline.reader.* import org.jline.reader.impl.LineReaderImpl import org.jline.reader.impl.history.DefaultHistory import org.jline.terminal.TerminalBuilder @@ -50,8 +50,8 @@ class JLineTerminal extends java.io.Closeable { def readLine( completer: Completer // provide auto-completions )(using Context): String = { - import LineReader.Option._ - import LineReader._ + import LineReader.Option.* + import LineReader.* val userHome = System.getProperty("user.home") val lineReader = LineReaderBuilder .builder() diff --git a/compiler/src/dotty/tools/repl/ParseResult.scala b/compiler/src/dotty/tools/repl/ParseResult.scala index a67b247066f7..b9139343bca1 100644 --- a/compiler/src/dotty/tools/repl/ParseResult.scala +++ b/compiler/src/dotty/tools/repl/ParseResult.scala @@ -3,7 +3,7 @@ package repl import dotc.CompilationUnit import dotc.ast.untpd -import dotc.core.Contexts._ +import dotc.core.Contexts.* import dotc.core.StdNames.str import dotc.parsing.Parsers.Parser import dotc.parsing.Tokens diff --git a/compiler/src/dotty/tools/repl/Rendering.scala b/compiler/src/dotty/tools/repl/Rendering.scala index c647ef302bb9..a4ef89acb168 100644 --- a/compiler/src/dotty/tools/repl/Rendering.scala +++ b/compiler/src/dotty/tools/repl/Rendering.scala @@ -22,7 +22,7 @@ import scala.util.control.NonFatal */ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None): - import Rendering._ + import Rendering.* var myClassLoader: AbstractFileClassLoader = _ diff --git a/compiler/src/dotty/tools/repl/ReplCommand.scala b/compiler/src/dotty/tools/repl/ReplCommand.scala index 3e46106acc2c..0b40a7cec0b3 100644 --- a/compiler/src/dotty/tools/repl/ReplCommand.scala +++ b/compiler/src/dotty/tools/repl/ReplCommand.scala @@ -1,6 +1,6 @@ package dotty.tools.repl -import dotty.tools.dotc.config.Properties._ +import dotty.tools.dotc.config.Properties.* import dotty.tools.dotc.config.CompilerCommand object ReplCommand extends CompilerCommand: diff --git a/compiler/src/dotty/tools/repl/ReplCompiler.scala b/compiler/src/dotty/tools/repl/ReplCompiler.scala index d3a5561b6080..af3fb32c3e86 100644 --- a/compiler/src/dotty/tools/repl/ReplCompiler.scala +++ b/compiler/src/dotty/tools/repl/ReplCompiler.scala @@ -1,23 +1,23 @@ package dotty.tools.repl -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.{tpd, untpd} import dotty.tools.dotc.ast.tpd.TreeOps -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ -import dotty.tools.dotc.core.Flags._ -import dotty.tools.dotc.core.Names._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* +import dotty.tools.dotc.core.Flags.* +import dotty.tools.dotc.core.Names.* import dotty.tools.dotc.core.Phases.Phase -import dotty.tools.dotc.core.StdNames._ -import dotty.tools.dotc.core.Symbols._ +import dotty.tools.dotc.core.StdNames.* +import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.reporting.Diagnostic import dotty.tools.dotc.transform.PostTyper import dotty.tools.dotc.typer.ImportInfo.{withRootImports, RootRef} import dotty.tools.dotc.typer.TyperPhase -import dotty.tools.dotc.util.Spans._ +import dotty.tools.dotc.util.Spans.* import dotty.tools.dotc.util.{ParsedComment, Property, SourceFile} import dotty.tools.dotc.{CompilationUnit, Compiler, Run} -import dotty.tools.repl.results._ +import dotty.tools.repl.results.* import scala.collection.mutable import scala.util.chaining.given @@ -156,7 +156,7 @@ class ReplCompiler extends Compiler: def wrapped(expr: String, sourceFile: SourceFile, state: State)(using Context): Result[untpd.PackageDef] = { def wrap(trees: List[untpd.Tree]): untpd.PackageDef = { - import untpd._ + import untpd.* val valdef = ValDef("expr".toTermName, TypeTree(), Block(trees, unitLiteral).withSpan(Span(0, expr.length))) val tmpl = Template(emptyConstructor, Nil, Nil, EmptyValDef, List(valdef)) @@ -186,7 +186,7 @@ class ReplCompiler extends Compiler: sourceFile.atSpan(Span(0, sourceFile.content.length)))).errors def unwrappedTypeTree(tree: tpd.Tree, sourceFile0: SourceFile)(using Context): Result[tpd.ValDef] = { - import tpd._ + import tpd.* tree match { case PackageDef(_, List(TypeDef(_, tmpl: Template))) => tmpl.body @@ -198,7 +198,7 @@ class ReplCompiler extends Compiler: } def unwrappedUntypedTree(tree: untpd.Tree, sourceFile0: SourceFile)(using Context): Result[untpd.ValDef] = - import untpd._ + import untpd.* tree match { case PackageDef(_, List(TypeDef(_, tmpl: Template))) => tmpl.body diff --git a/compiler/src/dotty/tools/repl/ReplDriver.scala b/compiler/src/dotty/tools/repl/ReplDriver.scala index 2471f6bece42..36468a72e9cb 100644 --- a/compiler/src/dotty/tools/repl/ReplDriver.scala +++ b/compiler/src/dotty/tools/repl/ReplDriver.scala @@ -5,21 +5,21 @@ import scala.language.unsafeNulls import java.io.{File => JFile, PrintStream} import java.nio.charset.StandardCharsets -import dotty.tools.dotc.ast.Trees._ +import dotty.tools.dotc.ast.Trees.* import dotty.tools.dotc.ast.{tpd, untpd} import dotty.tools.dotc.config.CommandLineParser.tokenize import dotty.tools.dotc.config.Properties.{javaVersion, javaVmName, simpleVersionString} -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.Phases.{unfusedPhases, typerPhase} import dotty.tools.dotc.core.Denotations.Denotation -import dotty.tools.dotc.core.Flags._ +import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Mode import dotty.tools.dotc.core.NameKinds.SimpleNameKind import dotty.tools.dotc.core.NameKinds.DefaultGetterName -import dotty.tools.dotc.core.NameOps._ +import dotty.tools.dotc.core.NameOps.* import dotty.tools.dotc.core.Names.Name -import dotty.tools.dotc.core.StdNames._ +import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Symbols.{Symbol, defn} import dotty.tools.dotc.interfaces import dotty.tools.dotc.interactive.Completion @@ -30,13 +30,13 @@ import dotty.tools.dotc.util.Spans.Span import dotty.tools.dotc.util.{SourceFile, SourcePosition} import dotty.tools.dotc.{CompilationUnit, Driver} import dotty.tools.dotc.config.CompilerCommand -import dotty.tools.io._ +import dotty.tools.io.* import dotty.tools.runner.ScalaClassLoader.* -import org.jline.reader._ +import org.jline.reader.* import scala.annotation.tailrec import scala.collection.mutable -import scala.jdk.CollectionConverters._ +import scala.jdk.CollectionConverters.* import scala.util.control.NonFatal import scala.util.Using diff --git a/compiler/src/dotty/tools/runner/ObjectRunner.scala b/compiler/src/dotty/tools/runner/ObjectRunner.scala index cb8f9d791dfa..62dbcc32f30d 100644 --- a/compiler/src/dotty/tools/runner/ObjectRunner.scala +++ b/compiler/src/dotty/tools/runner/ObjectRunner.scala @@ -19,7 +19,7 @@ trait CommonRunner { * @throws java.lang.reflect.InvocationTargetException */ def run(urls: Seq[URL], objectName: String, arguments: Seq[String]): Unit = { - import RichClassLoader._ + import RichClassLoader.* ScalaClassLoader.fromURLsParallelCapable(urls).run(objectName, arguments) } diff --git a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala index a20e6ef73c80..76b4f3685e6a 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala @@ -7,19 +7,19 @@ import dotty.tools.dotc import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.ast.untpd import dotty.tools.dotc.core.Annotations -import dotty.tools.dotc.core.Contexts._ -import dotty.tools.dotc.core.Decorators._ +import dotty.tools.dotc.core.Contexts.* +import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.NameKinds -import dotty.tools.dotc.core.NameOps._ -import dotty.tools.dotc.core.StdNames._ +import dotty.tools.dotc.core.NameOps.* +import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Types import dotty.tools.dotc.NoCompilationUnit import dotty.tools.dotc.quoted.MacroExpansion import dotty.tools.dotc.quoted.PickledQuotes -import dotty.tools.dotc.quoted.reflect._ +import dotty.tools.dotc.quoted.reflect.* import scala.quoted.runtime.{QuoteUnpickler, QuoteMatching} -import scala.quoted.runtime.impl.printers._ +import scala.quoted.runtime.impl.printers.* import scala.reflect.TypeTest diff --git a/compiler/src/scala/quoted/runtime/impl/ScopeException.scala b/compiler/src/scala/quoted/runtime/impl/ScopeException.scala index d65328bb5405..705efc5ffab1 100644 --- a/compiler/src/scala/quoted/runtime/impl/ScopeException.scala +++ b/compiler/src/scala/quoted/runtime/impl/ScopeException.scala @@ -1,7 +1,7 @@ package scala.quoted.runtime.impl import dotty.tools.dotc.ast.tpd.Tree -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* class ScopeException(msg: String) extends Exception(msg) diff --git a/compiler/src/scala/quoted/runtime/impl/SpliceScope.scala b/compiler/src/scala/quoted/runtime/impl/SpliceScope.scala index 797b38be2743..397ad49a309b 100644 --- a/compiler/src/scala/quoted/runtime/impl/SpliceScope.scala +++ b/compiler/src/scala/quoted/runtime/impl/SpliceScope.scala @@ -1,7 +1,7 @@ package scala.quoted package runtime.impl -import dotty.tools.dotc.core.Contexts._ +import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.util.Property import dotty.tools.dotc.util.SourcePosition diff --git a/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala b/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala index c229338ad228..eac85244d97b 100644 --- a/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala +++ b/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala @@ -1,7 +1,7 @@ package scala.quoted package runtime.impl.printers -import scala.quoted._ +import scala.quoted.* object Extractors { @@ -18,7 +18,7 @@ object Extractors { new ExtractorsPrinter[quotes.type]().visitSymbol(symbol).result() def showFlags(using Quotes)(flags: quotes.reflect.Flags): String = { - import quotes.reflect._ + import quotes.reflect.* val flagList = List.newBuilder[String] if (flags.is(Flags.Abstract)) flagList += "Flags.Abstract" if (flags.is(Flags.Artifact)) flagList += "Flags.Artifact" @@ -64,7 +64,7 @@ object Extractors { } private class ExtractorsPrinter[Q <: Quotes & Singleton](using val quotes: Q) { self => - import quotes.reflect._ + import quotes.reflect.* private val sb: StringBuilder = new StringBuilder diff --git a/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala b/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala index 9ec4e626b597..9a083ba7bdb8 100644 --- a/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala +++ b/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala @@ -19,7 +19,7 @@ object SourceCode { symbol.fullName def showFlags(using Quotes)(flags: quotes.reflect.Flags)(syntaxHighlight: SyntaxHighlight): String = { - import quotes.reflect._ + import quotes.reflect.* val flagList = List.newBuilder[String] if (flags.is(Flags.Abstract)) flagList += "abstract" if (flags.is(Flags.Artifact)) flagList += "artifact" @@ -64,8 +64,8 @@ object SourceCode { } private class SourceCodePrinter[Q <: Quotes & Singleton](syntaxHighlight: SyntaxHighlight, fullNames: Boolean)(using val quotes: Q) { - import syntaxHighlight._ - import quotes.reflect._ + import syntaxHighlight.* + import quotes.reflect.* private[this] val sb: StringBuilder = new StringBuilder diff --git a/library/src/scala/Tuple.scala b/library/src/scala/Tuple.scala index fa72e320b560..155ad0b9b7f5 100644 --- a/library/src/scala/Tuple.scala +++ b/library/src/scala/Tuple.scala @@ -1,12 +1,12 @@ package scala import annotation.showAsInfix -import compiletime._ -import compiletime.ops.int._ +import compiletime.* +import compiletime.ops.int.* /** Tuple of arbitrary arity */ sealed trait Tuple extends Product { - import Tuple._ + import Tuple.* /** Create a copy of this tuple as an Array */ inline def toArray: Array[Object] = @@ -272,7 +272,7 @@ case object EmptyTuple extends Tuple { /** Tuple of arbitrary non-zero arity */ sealed trait NonEmptyTuple extends Tuple { - import Tuple._ + import Tuple.* /** Get the i-th element of this tuple. * Equivalent to productElement but with a precise return type. diff --git a/library/src/scala/annotation/MacroAnnotation.scala b/library/src/scala/annotation/MacroAnnotation.scala index 5c39ef45f417..999bc3095a69 100644 --- a/library/src/scala/annotation/MacroAnnotation.scala +++ b/library/src/scala/annotation/MacroAnnotation.scala @@ -2,7 +2,7 @@ package scala package annotation -import scala.quoted._ +import scala.quoted.* /** Base trait for macro annotation implementation. * Macro annotations can transform definitions and add new definitions. @@ -46,7 +46,7 @@ definition that is owned by the package or package object. * * class memoize extends MacroAnnotation: * def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = - * import quotes.reflect._ + * import quotes.reflect.* * tree match * case DefDef(name, TermParamClause(param :: Nil) :: Nil, tpt, Some(rhsTree)) => * (param.tpt.tpe.asType, tpt.tpe.asType) match diff --git a/library/src/scala/annotation/constructorOnly.scala b/library/src/scala/annotation/constructorOnly.scala index c78c16534183..8fefc3b012dd 100644 --- a/library/src/scala/annotation/constructorOnly.scala +++ b/library/src/scala/annotation/constructorOnly.scala @@ -8,7 +8,7 @@ package scala.annotation -import scala.annotation.meta._ +import scala.annotation.meta.* /** An annotation that goes on parameters of classes or traits. It asserts * that the parameter is used only for initialization and is not kept in diff --git a/library/src/scala/annotation/newMain.scala b/library/src/scala/annotation/newMain.scala index 6864b5accd6c..552e4225a648 100644 --- a/library/src/scala/annotation/newMain.scala +++ b/library/src/scala/annotation/newMain.scala @@ -65,8 +65,8 @@ import scala.annotation.meta.param */ @experimental final class newMain extends MainAnnotation[FromString, Any]: - import newMain._ - import MainAnnotation._ + import newMain.* + import MainAnnotation.* private val longArgRegex = "--[a-zA-Z][a-zA-Z0-9]+".r private val shortArgRegex = "-[a-zA-Z]".r diff --git a/library/src/scala/annotation/static.scala b/library/src/scala/annotation/static.scala index b00072b18908..7cee5fc160d5 100644 --- a/library/src/scala/annotation/static.scala +++ b/library/src/scala/annotation/static.scala @@ -1,6 +1,6 @@ package scala.annotation -import scala.annotation.meta._ +import scala.annotation.meta.* /** https://github.com/scala/scala.github.com/pull/491 */ diff --git a/library/src/scala/compiletime/ops/any.scala b/library/src/scala/compiletime/ops/any.scala index f0998058e9f7..e3f030c33634 100644 --- a/library/src/scala/compiletime/ops/any.scala +++ b/library/src/scala/compiletime/ops/any.scala @@ -5,7 +5,7 @@ object any: /** Equality comparison of two singleton types. * ```scala * //{ - * import compiletime.ops.any._ + * import compiletime.ops.any.* * //} * val eq1: 1 == 1 = true * val eq2: 1 == "1" = false @@ -18,7 +18,7 @@ object any: /** Inequality comparison of two singleton types. * ```scala * //{ - * import compiletime.ops.any._ + * import compiletime.ops.any.* * //} * val eq1: 1 != 1 = false * val eq2: 1 != "1" = true @@ -31,7 +31,7 @@ object any: /** Tests if a type is a constant. * ```scala * //{ - * import compiletime.ops.any._ + * import compiletime.ops.any.* * //} * val c1: IsConst[1] = true * val c2: IsConst["hi"] = true @@ -42,7 +42,7 @@ object any: * will be evaluated only at its concrete type application. E.g.: * ```scala * //{ - * import compiletime.ops.any._ + * import compiletime.ops.any.* * //} * //def `isConst`` returns the type `IsConst[X]`, since `X` is not yet known. * def isConst[X] : IsConst[X] = ??? @@ -56,7 +56,7 @@ object any: /** String conversion of a constant singleton type. * ```scala * //{ - * import compiletime.ops.any._ + * import compiletime.ops.any.* * //} * val s1: ToString[1] = "1" * val sTrue: ToString[true] = "true" diff --git a/library/src/scala/compiletime/ops/boolean.scala b/library/src/scala/compiletime/ops/boolean.scala index 3645524607dd..f6a8c3d3b37e 100644 --- a/library/src/scala/compiletime/ops/boolean.scala +++ b/library/src/scala/compiletime/ops/boolean.scala @@ -6,7 +6,7 @@ object boolean: /** Negation of a `Boolean` singleton type. * ```scala * //{ - * import compiletime.ops.boolean._ + * import compiletime.ops.boolean.* * //} * val notFalse: ![false] = true * val notTrue: ![true] = false @@ -18,7 +18,7 @@ object boolean: /** Exclusive disjunction of two `Boolean` singleton types. * ```scala * //{ - * import compiletime.ops.boolean._ + * import compiletime.ops.boolean.* * //} * val a: true ^ true = false * val b: false ^ true = true @@ -30,7 +30,7 @@ object boolean: /** Conjunction of two `Boolean` singleton types. * ```scala * //{ - * import compiletime.ops.boolean._ + * import compiletime.ops.boolean.* * //} * val a: true && true = true * val b: false && true = false @@ -42,7 +42,7 @@ object boolean: /** Disjunction of two `Boolean` singleton types. * ```scala * //{ - * import compiletime.ops.boolean._ + * import compiletime.ops.boolean.* * //} * val a: true || false = true * val b: false || false = false diff --git a/library/src/scala/compiletime/ops/double.scala b/library/src/scala/compiletime/ops/double.scala index 65a2e1dde407..0e038904221e 100644 --- a/library/src/scala/compiletime/ops/double.scala +++ b/library/src/scala/compiletime/ops/double.scala @@ -5,7 +5,7 @@ object double: /** Addition of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val sum: 2.0 + 2.0 = 4.0 * ``` @@ -16,7 +16,7 @@ object double: /** Subtraction of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val sub: 4.0 - 2.0 = 2.0 * ``` @@ -27,7 +27,7 @@ object double: /** Multiplication of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val mul: 4.0 * 2.0 = 8.0 * ``` @@ -38,7 +38,7 @@ object double: /** Integer division of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val div: 5.0 / 2.0 = 2.5 * ``` @@ -49,7 +49,7 @@ object double: /** Remainder of the division of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val mod: 5.0 % 2.0 = 1.0 * ``` @@ -60,7 +60,7 @@ object double: /** Less-than comparison of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val lt1: 4.0 < 2.0 = false * val lt2: 2.0 < 4.0 = true @@ -72,7 +72,7 @@ object double: /** Greater-than comparison of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val gt1: 4.0 > 2.0 = true * val gt2: 2.0 > 2.0 = false @@ -84,7 +84,7 @@ object double: /** Greater-or-equal comparison of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val ge1: 4.0 >= 2.0 = true * val ge2: 2.0 >= 3.0 = false @@ -96,7 +96,7 @@ object double: /** Less-or-equal comparison of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val lt1: 4.0 <= 2.0 = false * val lt2: 2.0 <= 2.0 = true @@ -108,7 +108,7 @@ object double: /** Absolute value of an `Double` singleton type. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val abs: Abs[-1.0] = 1.0 * ``` @@ -119,7 +119,7 @@ object double: /** Negation of an `Double` singleton type. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val neg1: Negate[-1.0] = 1.0 * val neg2: Negate[1.0] = -1.0 @@ -131,7 +131,7 @@ object double: /** Minimum of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val min: Min[-1.0, 1.0] = -1.0 * ``` @@ -142,7 +142,7 @@ object double: /** Maximum of two `Double` singleton types. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val max: Max[-1.0, 1.0] = 1.0 * ``` @@ -153,7 +153,7 @@ object double: /** Int conversion of a `Double` singleton type. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val x: ToInt[1.0] = 1 * ``` @@ -164,7 +164,7 @@ object double: /** Long conversion of a `Double` singleton type. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val x: ToLong[1.0] = 1L * ``` @@ -175,7 +175,7 @@ object double: /** Float conversion of a `Double` singleton type. * ```scala * //{ - * import compiletime.ops.double._ + * import compiletime.ops.double.* * //} * val x: ToFloat[1.0] = 1.0f * ``` diff --git a/library/src/scala/compiletime/ops/float.scala b/library/src/scala/compiletime/ops/float.scala index 0f2a8faa43e7..d7be87be3d9c 100644 --- a/library/src/scala/compiletime/ops/float.scala +++ b/library/src/scala/compiletime/ops/float.scala @@ -5,7 +5,7 @@ object float: /** Addition of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val sum: 2.0f + 2.0f = 4.0f * ``` @@ -16,7 +16,7 @@ object float: /** Subtraction of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val sub: 4.0f - 2.0f = 2.0f * ``` @@ -27,7 +27,7 @@ object float: /** Multiplication of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val mul: 4.0f * 2.0f = 8.0f * ``` @@ -38,7 +38,7 @@ object float: /** Integer division of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val div: 5.0f / 2.0f = 2.5f * ``` @@ -49,7 +49,7 @@ object float: /** Remainder of the division of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val mod: 5.0f % 2.0f = 1.0f * ``` @@ -60,7 +60,7 @@ object float: /** Less-than comparison of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val lt1: 4.0f < 2.0f = false * val lt2: 2.0f < 4.0f = true @@ -72,7 +72,7 @@ object float: /** Greater-than comparison of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val gt1: 4.0f > 2.0f = true * val gt2: 2.0f > 2.0f = false @@ -84,7 +84,7 @@ object float: /** Greater-or-equal comparison of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val ge1: 4.0f >= 2.0f = true * val ge2: 2.0f >= 3.0f = false @@ -96,7 +96,7 @@ object float: /** Less-or-equal comparison of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val lt1: 4.0f <= 2.0f = false * val lt2: 2.0f <= 2.0f = true @@ -108,7 +108,7 @@ object float: /** Absolute value of an `Float` singleton type. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val abs: Abs[-1.0f] = 1.0f * ``` @@ -119,7 +119,7 @@ object float: /** Negation of an `Float` singleton type. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val neg1: Negate[-1.0f] = 1.0f * val neg2: Negate[1.0f] = -1.0f @@ -131,7 +131,7 @@ object float: /** Minimum of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val min: Min[-1.0f, 1.0f] = -1.0f * ``` @@ -142,7 +142,7 @@ object float: /** Maximum of two `Float` singleton types. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val max: Max[-1.0f, 1.0f] = 1.0f * ``` @@ -153,7 +153,7 @@ object float: /** Int conversion of a `Float` singleton type. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val x: ToInt[1.0f] = 1 * ``` @@ -164,7 +164,7 @@ object float: /** Long conversion of a `Float` singleton type. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val x: ToLong[1.0f] = 1L * ``` @@ -175,7 +175,7 @@ object float: /** Double conversion of a `Float` singleton type. * ```scala * //{ - * import compiletime.ops.float._ + * import compiletime.ops.float.* * //} * val x: ToDouble[1.0f] = 1.0 * ``` diff --git a/library/src/scala/compiletime/ops/int.scala b/library/src/scala/compiletime/ops/int.scala index 7efdc1851c4e..ed4a3c3c3261 100644 --- a/library/src/scala/compiletime/ops/int.scala +++ b/library/src/scala/compiletime/ops/int.scala @@ -6,7 +6,7 @@ object int: * * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * type S[N <: Int] <: Int = N match { * case 0 => 1 @@ -23,7 +23,7 @@ object int: /** Addition of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val sum: 2 + 2 = 4 * ``` @@ -34,7 +34,7 @@ object int: /** Subtraction of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val sub: 4 - 2 = 2 * ``` @@ -45,7 +45,7 @@ object int: /** Multiplication of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val mul: 4 * 2 = 8 * ``` @@ -56,7 +56,7 @@ object int: /** Integer division of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val div: 5 / 2 = 2 * ``` @@ -67,7 +67,7 @@ object int: /** Remainder of the division of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val mod: 5 % 2 = 1 * ``` @@ -78,7 +78,7 @@ object int: /** Binary left shift of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val lshift: 1 << 2 = 4 * ``` @@ -89,7 +89,7 @@ object int: /** Binary right shift of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val rshift: 10 >> 1 = 5 * ``` @@ -100,7 +100,7 @@ object int: /** Binary right shift of `X` by `Y`, filling the left with zeros. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val rshiftzero: 10 >>> 1 = 5 * ``` @@ -111,7 +111,7 @@ object int: /** Bitwise xor of `X` and `Y`. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val xor: 10 ^ 30 = 20 * ``` @@ -122,7 +122,7 @@ object int: /** Less-than comparison of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val lt1: 4 < 2 = false * val lt2: 2 < 4 = true @@ -134,7 +134,7 @@ object int: /** Greater-than comparison of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val gt1: 4 > 2 = true * val gt2: 2 > 2 = false @@ -146,7 +146,7 @@ object int: /** Greater-or-equal comparison of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val ge1: 4 >= 2 = true * val ge2: 2 >= 3 = false @@ -158,7 +158,7 @@ object int: /** Less-or-equal comparison of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val lt1: 4 <= 2 = false * val lt2: 2 <= 2 = true @@ -170,7 +170,7 @@ object int: /** Bitwise and of `X` and `Y`. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val and1: BitwiseAnd[4, 4] = 4 * val and2: BitwiseAnd[10, 5] = 0 @@ -182,7 +182,7 @@ object int: /** Bitwise or of `X` and `Y`. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val or: BitwiseOr[10, 11] = 11 * ``` @@ -193,7 +193,7 @@ object int: /** Absolute value of an `Int` singleton type. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val abs: Abs[-1] = 1 * ``` @@ -204,7 +204,7 @@ object int: /** Negation of an `Int` singleton type. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val neg1: Negate[-1] = 1 * val neg2: Negate[1] = -1 @@ -216,7 +216,7 @@ object int: /** Minimum of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val min: Min[-1, 1] = -1 * ``` @@ -227,7 +227,7 @@ object int: /** Maximum of two `Int` singleton types. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val max: Max[-1, 1] = 1 * ``` @@ -238,7 +238,7 @@ object int: /** String conversion of an `Int` singleton type. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val abs: ToString[1] = "1" * ``` @@ -250,7 +250,7 @@ object int: /** Long conversion of an `Int` singleton type. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val x: ToLong[1] = 1L * ``` @@ -261,7 +261,7 @@ object int: /** Float conversion of an `Int` singleton type. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val x: ToFloat[1] = 1.0f * ``` @@ -272,7 +272,7 @@ object int: /** Double conversion of an `Int` singleton type. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val x: ToDouble[1] = 1.0 * ``` @@ -286,7 +286,7 @@ object int: * in other words if it is equal to zero. * ```scala * //{ - * import compiletime.ops.int._ + * import compiletime.ops.int.* * //} * val zero_lzc: NumberOfLeadingZeros[0] = 32 * val eight_lzc: NumberOfLeadingZeros[8] = 28 diff --git a/library/src/scala/compiletime/ops/long.scala b/library/src/scala/compiletime/ops/long.scala index b900eafca066..5aca2dc49ef2 100644 --- a/library/src/scala/compiletime/ops/long.scala +++ b/library/src/scala/compiletime/ops/long.scala @@ -20,7 +20,7 @@ object long: /** Addition of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val sum: 2L + 2L = 4L * ``` @@ -31,7 +31,7 @@ object long: /** Subtraction of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val sub: 4L - 2L = 2L * ``` @@ -42,7 +42,7 @@ object long: /** Multiplication of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val mul: 4L * 2L = 8L * ``` @@ -53,7 +53,7 @@ object long: /** Integer division of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val div: 5L / 2L = 2L * ``` @@ -64,7 +64,7 @@ object long: /** Remainder of the division of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val mod: 5L % 2L = 1L * ``` @@ -75,7 +75,7 @@ object long: /** Binary left shift of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val lshift: 1L << 2L = 4L * ``` @@ -86,7 +86,7 @@ object long: /** Binary right shift of `X` by `Y`. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val rshift: 10L >> 1L = 5L * ``` @@ -97,7 +97,7 @@ object long: /** Binary right shift of `X` by `Y`, filling the left with zeros. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val rshiftzero: 10L >>> 1L = 5L * ``` @@ -108,7 +108,7 @@ object long: /** Bitwise xor of `X` and `Y`. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val xor: 10L ^ 30L = 20L * ``` @@ -119,7 +119,7 @@ object long: /** Less-than comparison of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val lt1: 4L < 2L = false * val lt2: 2L < 4L = true @@ -131,7 +131,7 @@ object long: /** Greater-than comparison of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val gt1: 4L > 2L = true * val gt2: 2L > 2L = false @@ -143,7 +143,7 @@ object long: /** Greater-or-equal comparison of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val ge1: 4L >= 2L = true * val ge2: 2L >= 3L = false @@ -155,7 +155,7 @@ object long: /** Less-or-equal comparison of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val lt1: 4L <= 2L = false * val lt2: 2L <= 2L = true @@ -167,7 +167,7 @@ object long: /** Bitwise and of `X` and `Y`. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val and1: BitwiseAnd[4L, 4L] = 4L * val and2: BitwiseAnd[10L, 5L] = 0L @@ -179,7 +179,7 @@ object long: /** Bitwise or of `X` and `Y`. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val or: BitwiseOr[10L, 11L] = 11L * ``` @@ -190,7 +190,7 @@ object long: /** Absolute value of an `Long` singleton type. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val abs: Abs[-1L] = 1L * ``` @@ -201,7 +201,7 @@ object long: /** Negation of an `Long` singleton type. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val neg1: Negate[-1L] = 1L * val neg2: Negate[1L] = -1L @@ -213,7 +213,7 @@ object long: /** Minimum of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val min: Min[-1L, 1L] = -1L * ``` @@ -224,7 +224,7 @@ object long: /** Maximum of two `Long` singleton types. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val max: Max[-1L, 1L] = 1L * ``` @@ -238,7 +238,7 @@ object long: * in other words if it is equal to zero. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val zero_lzc: NumberOfLeadingZeros[0L] = 64 * val eight_lzc: NumberOfLeadingZeros[8L] = 60 @@ -252,7 +252,7 @@ object long: /** Int conversion of a `Long` singleton type. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val x: ToInt[1L] = 1 * ``` @@ -263,7 +263,7 @@ object long: /** Float conversion of a `Long` singleton type. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val x: ToFloat[1L] = 1.0f * ``` @@ -274,7 +274,7 @@ object long: /** Double conversion of a `Long` singleton type. * ```scala * //{ - * import compiletime.ops.long._ + * import compiletime.ops.long.* * //} * val x: ToDouble[1L] = 1.0 * ``` diff --git a/library/src/scala/compiletime/ops/string.scala b/library/src/scala/compiletime/ops/string.scala index 4c220f992707..63caa9ae6371 100644 --- a/library/src/scala/compiletime/ops/string.scala +++ b/library/src/scala/compiletime/ops/string.scala @@ -5,7 +5,7 @@ object string: /** Concatenation of two `String` singleton types. * ```scala * //{ - * import compiletime.ops.string._ + * import compiletime.ops.string.* * //} * val hello: "hello " + "world" = "hello world" * ``` @@ -16,7 +16,7 @@ object string: /** Length of a `String` singleton type. * ```scala * //{ - * import compiletime.ops.string._ + * import compiletime.ops.string.* * //} * val helloSize: Length["hello"] = 5 * ``` @@ -30,7 +30,7 @@ object string: * Thus the length of the substring is IEnd-IBeg. * ```scala * //{ - * import compiletime.ops.string._ + * import compiletime.ops.string.* * //} * val x: Substring["hamburger", 4, 8] = "urge" * val y: Substring["smiles", 1, 5] = "mile" @@ -43,7 +43,7 @@ object string: * regular expression `String` singleton type. * ```scala * //{ - * import compiletime.ops.string._ + * import compiletime.ops.string.* * //} * val x: Matches["unhappy", "un.*"] = true * ``` @@ -56,7 +56,7 @@ object string: * the sequence is at index 0, the next at index 1, and so on. * ```scala * //{ - * import string._ + * import string.* * //} * val c: CharAt["hello", 0] = 'h' * ``` diff --git a/library/src/scala/quoted/Expr.scala b/library/src/scala/quoted/Expr.scala index 8243e7dc4a4b..308d9d0c9e94 100644 --- a/library/src/scala/quoted/Expr.scala +++ b/library/src/scala/quoted/Expr.scala @@ -18,7 +18,7 @@ object Expr { * Some bindings may be elided as an early optimization. */ def betaReduce[T](expr: Expr[T])(using Quotes): Expr[T] = - import quotes.reflect._ + import quotes.reflect.* Term.betaReduce(expr.asTerm) match case Some(expr1) => expr1.asExpr.asInstanceOf[Expr[T]] case _ => expr @@ -28,7 +28,7 @@ object Expr { * will be equivalent to `'{ $s1; $s2; ...; $e }`. */ def block[T](statements: List[Expr[Any]], expr: Expr[T])(using Quotes): Expr[T] = { - import quotes.reflect._ + import quotes.reflect.* Block(statements.map(asTerm), expr.asTerm).asExpr.asInstanceOf[Expr[T]] } @@ -240,7 +240,7 @@ object Expr { * @tparam T type of the implicit parameter */ def summon[T](using Type[T])(using Quotes): Option[Expr[T]] = { - import quotes.reflect._ + import quotes.reflect.* Implicits.search(TypeRepr.of[T]) match { case iss: ImplicitSearchSuccess => Some(iss.tree.asExpr.asInstanceOf[Expr[T]]) case isf: ImplicitSearchFailure => None diff --git a/library/src/scala/quoted/ExprMap.scala b/library/src/scala/quoted/ExprMap.scala index 70af00b16be5..fbe5dee2b342 100644 --- a/library/src/scala/quoted/ExprMap.scala +++ b/library/src/scala/quoted/ExprMap.scala @@ -7,7 +7,7 @@ trait ExprMap: /** Map sub-expressions an expression `e` with a type `T` */ def transformChildren[T](e: Expr[T])(using Type[T])(using Quotes): Expr[T] = { - import quotes.reflect._ + import quotes.reflect.* final class MapChildren() { def transformStatement(tree: Statement)(owner: Symbol): Statement = { diff --git a/library/src/scala/quoted/FromExpr.scala b/library/src/scala/quoted/FromExpr.scala index f81afc627609..2de7b8db81a6 100644 --- a/library/src/scala/quoted/FromExpr.scala +++ b/library/src/scala/quoted/FromExpr.scala @@ -82,7 +82,7 @@ object FromExpr { /** Lift a quoted primitive value `'{ x }` into `x` */ private class PrimitiveFromExpr[T <: Boolean | Byte | Short | Int | Long | Float | Double | Char | String] extends FromExpr[T] { def unapply(expr: Expr[T])(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* def rec(tree: Term): Option[T] = tree match { case Block(stats, e) => if stats.isEmpty then rec(e) else None case Inlined(_, bindings, e) => if bindings.isEmpty then rec(e) else None diff --git a/library/src/scala/quoted/Quotes.scala b/library/src/scala/quoted/Quotes.scala index 029a276a75d5..0f4695e48dfb 100644 --- a/library/src/scala/quoted/Quotes.scala +++ b/library/src/scala/quoted/Quotes.scala @@ -8,9 +8,9 @@ import scala.reflect.TypeTest * * Usage: * ```scala - * import scala.quoted._ + * import scala.quoted.* * def myExpr[T](using Quotes): Expr[T] = { - * import quotes.reflect._ + * import quotes.reflect.* * ??? * } * ``` @@ -24,7 +24,7 @@ transparent inline def quotes(using q: Quotes): q.type = q * This API does not have the static type guarantees that `Expr` and `Type` provide. * `Quotes` are generated from an enclosing `${ ... }` or `scala.staging.run`. For example: * ```scala sc:nocompile - * import scala.quoted._ + * import scala.quoted.* * inline def myMacro: Expr[T] = * ${ /* (quotes: Quotes) ?=> */ myExpr } * def myExpr(using Quotes): Expr[T] = @@ -105,9 +105,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * * Usage: * ```scala - * import scala.quoted._ + * import scala.quoted.* * def f(expr: Expr[Int])(using Quotes) = - * import quotes.reflect._ + * import quotes.reflect.* * val ast: Term = expr.asTerm * ??? * ``` @@ -2331,10 +2331,10 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * `ParamClause` encodes the following enumeration * ```scala * //{ - * import scala.quoted._ + * import scala.quoted.* * def inQuotes(using Quotes) = { * val q: Quotes = summon[Quotes] - * import q.reflect._ + * import q.reflect.* * //} * enum ParamClause: * case TypeParamClause(params: List[TypeDef]) @@ -2583,10 +2583,10 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * Usage: * ```scala * //{ - * import scala.quoted._ + * import scala.quoted.* * def f(using Quotes) = { * val q: Quotes = summon[Quotes] - * import q.reflect._ + * import q.reflect.* * val typeRepr: TypeRepr = ??? * //} * typeRepr.asType match @@ -3711,7 +3711,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * ```scala * //{ * given Quotes = ??? - * import quotes.reflect._ + * import quotes.reflect.* * //} * val moduleName: String = Symbol.freshName("MyModule") * val parents = List(TypeTree.of[Object]) @@ -3733,7 +3733,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * ```scala * //{ * given Quotes = ??? - * import quotes.reflect._ + * import quotes.reflect.* * //} * '{ * object MyModule$macro$1 extends Object: @@ -4079,10 +4079,10 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * Usages: * ```scala * def rhsExpr(using q: Quotes): Expr[Unit] = - * import q.reflect._ + * import q.reflect.* * '{ val y = ???; (y, y) } * def aValDef(using q: Quotes)(owner: q.reflect.Symbol) = - * import q.reflect._ + * import q.reflect.* * val sym = Symbol.newVal(owner, "x", TypeRepr.of[Unit], Flags.EmptyFlags, Symbol.noSymbol) * val rhs = rhsExpr(using sym.asQuotes).asTerm * ValDef(sym, Some(rhs)) @@ -4091,7 +4091,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * ```scala * //{ * def inQuotes(using q: Quotes) = { - * import q.reflect._ + * import q.reflect.* * //} * new TreeMap: * override def transformTerm(tree: Term)(owner: Symbol): Term = @@ -4691,7 +4691,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * ```scala * //{ * def inQuotes(using q: Quotes) = { - * import q.reflect._ + * import q.reflect.* * //} * class MyTreeAccumulator[X] extends TreeAccumulator[X] { * def foldTree(x: X, tree: Tree)(owner: Symbol): X = ??? @@ -4804,7 +4804,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * ```scala * //{ * def inQuotes(using q: Quotes) = { - * import q.reflect._ + * import q.reflect.* * //} * class MyTraverser extends TreeTraverser { * override def traverseTree(tree: Tree)(owner: Symbol): Unit = ??? @@ -4830,7 +4830,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * ```scala * //{ * def inQuotes(using q: Quotes) = { - * import q.reflect._ + * import q.reflect.* * //} * class MyTreeMap extends TreeMap { * override def transformTree(tree: Tree)(owner: Symbol): Tree = ??? diff --git a/library/src/scala/quoted/ToExpr.scala b/library/src/scala/quoted/ToExpr.scala index d7e55a5bc411..f9f3d00bcedf 100644 --- a/library/src/scala/quoted/ToExpr.scala +++ b/library/src/scala/quoted/ToExpr.scala @@ -20,70 +20,70 @@ object ToExpr { /** Default implementation of `ToExpr[Boolean]` */ given BooleanToExpr[T <: Boolean]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(BooleanConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Byte]` */ given ByteToExpr[T <: Byte]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(ByteConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Short]` */ given ShortToExpr[T <: Short]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(ShortConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Int]` */ given IntToExpr[T <: Int]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(IntConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Long]` */ given LongToExpr[T <: Long]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(LongConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Float]` */ given FloatToExpr[T <: Float]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(FloatConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Double]` */ given DoubleToExpr[T <: Double]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(DoubleConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Char]` */ given CharToExpr[T <: Char]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(CharConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[String]` */ given StringToExpr[T <: String]: ToExpr[T] with { def apply(x: T)(using Quotes) = - import quotes.reflect._ + import quotes.reflect.* Literal(StringConstant(x)).asExpr.asInstanceOf[Expr[T]] } /** Default implementation of `ToExpr[Class[T]]` */ given ClassToExpr[T <: Class[?]]: ToExpr[T] with { def apply(x: T)(using Quotes) = { - import quotes.reflect._ + import quotes.reflect.* Ref(defn.Predef_classOf).appliedToType(TypeRepr.typeConstructorOf(x)).asExpr.asInstanceOf[Expr[T]] } } diff --git a/library/src/scala/quoted/Varargs.scala b/library/src/scala/quoted/Varargs.scala index e2e74c3879c6..61937fc8fecb 100644 --- a/library/src/scala/quoted/Varargs.scala +++ b/library/src/scala/quoted/Varargs.scala @@ -28,7 +28,7 @@ object Varargs { * ``` */ def apply[T](xs: Seq[Expr[T]])(using Type[T])(using Quotes): Expr[Seq[T]] = { - import quotes.reflect._ + import quotes.reflect.* Repeated(xs.map(_.asTerm).toList, TypeTree.of[T]).asExpr.asInstanceOf[Expr[Seq[T]]] } @@ -43,7 +43,7 @@ object Varargs { * */ def unapply[T](expr: Expr[Seq[T]])(using Quotes): Option[Seq[Expr[T]]] = { - import quotes.reflect._ + import quotes.reflect.* def rec(tree: Term): Option[Seq[Expr[T]]] = tree match { case Repeated(elems, _) => Some(elems.map(x => x.asExpr.asInstanceOf[Expr[T]])) case Typed(e, _) => rec(e) diff --git a/library/src/scala/util/FromDigits.scala b/library/src/scala/util/FromDigits.scala index 1577f4103e03..cb73782829ff 100644 --- a/library/src/scala/util/FromDigits.scala +++ b/library/src/scala/util/FromDigits.scala @@ -1,6 +1,6 @@ package scala.util import scala.math.{BigInt} -import quoted._ +import quoted.* import annotation.internal.sharable