diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala index 1eba6c0b1bf8..09be5c70e133 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala @@ -16,6 +16,7 @@ import dotty.tools.dotc.CompilationUnit 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.TypeApplications.* import dotty.tools.dotc.core.StdNames.{nme, str} import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.transform.Erasure diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala index 5390626eb2cc..101758ca17e6 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala @@ -17,6 +17,7 @@ import dotty.tools.dotc.core.NameKinds.* import dotty.tools.dotc.core.Names.TermName import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.util.Spans.* import dotty.tools.dotc.report diff --git a/compiler/src/dotty/tools/debug/ExtractExpression.scala b/compiler/src/dotty/tools/debug/ExtractExpression.scala index 151d75270c6e..7670069b170f 100644 --- a/compiler/src/dotty/tools/debug/ExtractExpression.scala +++ b/compiler/src/dotty/tools/debug/ExtractExpression.scala @@ -8,6 +8,7 @@ import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Names.* import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.core.DenotTransformers.DenotTransformer import dotty.tools.dotc.core.Denotations.SingleDenotation import dotty.tools.dotc.core.SymDenotations.SymDenotation diff --git a/compiler/src/dotty/tools/debug/ResolveReflectEval.scala b/compiler/src/dotty/tools/debug/ResolveReflectEval.scala index f79aa462fcb4..05290de889d9 100644 --- a/compiler/src/dotty/tools/debug/ResolveReflectEval.scala +++ b/compiler/src/dotty/tools/debug/ResolveReflectEval.scala @@ -12,6 +12,7 @@ import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.TypeErasure.ErasedValueType import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.report import dotty.tools.dotc.transform.MegaPhase.MiniPhase import dotty.tools.dotc.transform.ValueClasses diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index d372f1ed221f..e6501e07884f 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -4,6 +4,7 @@ package ast import core.* import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, NameOps.*, Flags.* +import TypeApplications.* import Symbols.*, StdNames.*, Trees.*, ContextOps.* import Decorators.* import Annotations.Annotation diff --git a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala index 7268ec720ce2..0ffd6688647f 100644 --- a/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala +++ b/compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala @@ -4,6 +4,7 @@ package ast import core.* import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, Flags.* +import TypeApplications.* import Symbols.*, StdNames.*, Trees.* import Decorators.* import util.{Property, SourceFile} diff --git a/compiler/src/dotty/tools/dotc/ast/MainProxies.scala b/compiler/src/dotty/tools/dotc/ast/MainProxies.scala index 9ed19c93d1ba..971ab9671cb5 100644 --- a/compiler/src/dotty/tools/dotc/ast/MainProxies.scala +++ b/compiler/src/dotty/tools/dotc/ast/MainProxies.scala @@ -3,6 +3,7 @@ package ast import core.* import Symbols.*, Types.*, Contexts.*, Decorators.*, util.Spans.*, Flags.*, Constants.* +import TypeApplications.* import StdNames.{nme, tpnme} import ast.Trees.* import Names.Name diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index f8a5e0dbaf76..152a679a4e4e 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -4,6 +4,7 @@ package ast import core.* import Flags.*, Trees.*, Types.*, Contexts.* +import TypeApplications.* import Names.*, StdNames.*, NameOps.*, Symbols.* import Annotations.Annotation import NameKinds.ContextBoundParamName diff --git a/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala index 6dd85d730da8..f4c3cae58bd0 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala @@ -4,6 +4,7 @@ package ast import core.* import Types.*, Contexts.*, Flags.* +import TypeApplications.* import Symbols.*, Annotations.*, Trees.*, Symbols.*, Constants.Constant import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/ast/Trees.scala b/compiler/src/dotty/tools/dotc/ast/Trees.scala index 8749f7ddc10c..abada279b3b1 100644 --- a/compiler/src/dotty/tools/dotc/ast/Trees.scala +++ b/compiler/src/dotty/tools/dotc/ast/Trees.scala @@ -4,6 +4,7 @@ package ast import core.* import Types.*, Names.*, NameOps.*, Flags.*, util.Spans.*, Contexts.*, Constants.* +import TypeApplications.* import typer.{ ConstFold, ProtoTypes } import SymDenotations.*, Symbols.*, Denotations.*, StdNames.*, Comments.* import collection.mutable.ListBuffer diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index 991309293c0c..ce8c9b068907 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -7,6 +7,7 @@ import typer.ProtoTypes import core.* import Scopes.newScope import util.Spans.*, Types.*, Contexts.*, Constants.*, Names.*, Flags.*, NameOps.* +import TypeApplications.* import Symbols.*, StdNames.*, Annotations.*, Trees.*, Symbols.* import Decorators.*, DenotTransformers.* import collection.{immutable, mutable} diff --git a/compiler/src/dotty/tools/dotc/ast/untpd.scala b/compiler/src/dotty/tools/dotc/ast/untpd.scala index 4198c78e3288..4155534830d2 100644 --- a/compiler/src/dotty/tools/dotc/ast/untpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/untpd.scala @@ -4,6 +4,7 @@ package ast import core.* import Types.*, Contexts.*, Constants.*, Names.*, Flags.* +import TypeApplications.* import dotty.tools.dotc.typer.ProtoTypes import Symbols.*, StdNames.*, Trees.* import util.{Property, SourceFile, NoSource} diff --git a/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala b/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala index 37ee3f68b9ad..87a56330b053 100644 --- a/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala +++ b/compiler/src/dotty/tools/dotc/cc/CaptureSet.scala @@ -4,6 +4,7 @@ package cc import core.* import Types.*, Symbols.*, Flags.*, Contexts.*, Decorators.* +import TypeApplications.* import config.Printers.{capt, captDebug} import Annotations.Annotation import annotation.threadUnsafe diff --git a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala index dccbd0a005d7..9f4f9bd5cb26 100644 --- a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala +++ b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala @@ -6,6 +6,7 @@ import core.* import Phases.*, DenotTransformers.*, SymDenotations.* import Contexts.*, Names.*, Flags.*, Symbols.*, Decorators.* import Types.*, StdNames.*, Denotations.* +import TypeApplications.* import config.Printers.{capt, recheckr, noPrinter} import config.{Config, Feature} import ast.{tpd, untpd, Trees} diff --git a/compiler/src/dotty/tools/dotc/cc/Setup.scala b/compiler/src/dotty/tools/dotc/cc/Setup.scala index 6143a7131e32..961deaae7eda 100644 --- a/compiler/src/dotty/tools/dotc/cc/Setup.scala +++ b/compiler/src/dotty/tools/dotc/cc/Setup.scala @@ -6,6 +6,7 @@ import core.* import Phases.*, DenotTransformers.*, SymDenotations.* import Contexts.*, Names.*, Flags.*, Symbols.*, Decorators.* import Types.*, StdNames.* +import TypeApplications.* import Annotations.Annotation import config.Feature import config.Printers.{capt, captDebug} diff --git a/compiler/src/dotty/tools/dotc/core/Annotations.scala b/compiler/src/dotty/tools/dotc/core/Annotations.scala index 1615679a036e..e6a67c1f942f 100644 --- a/compiler/src/dotty/tools/dotc/core/Annotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Annotations.scala @@ -3,6 +3,7 @@ package dotc package core import Symbols.*, Types.*, Contexts.*, Constants.*, Phases.* +import TypeApplications.* import ast.tpd, tpd.* import util.Spans.Span import printing.{Showable, Printer} diff --git a/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala b/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala index 81b03d765676..935d9b398cfe 100644 --- a/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala +++ b/compiler/src/dotty/tools/dotc/core/CheckRealizable.scala @@ -3,6 +3,7 @@ package dotc package core import Contexts.*, Types.*, Symbols.*, Names.*, Flags.* +import TypeApplications.* import Denotations.SingleDenotation import Decorators.* import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/core/Comments.scala b/compiler/src/dotty/tools/dotc/core/Comments.scala index 00f5b578b4d1..113660176544 100644 --- a/compiler/src/dotty/tools/dotc/core/Comments.scala +++ b/compiler/src/dotty/tools/dotc/core/Comments.scala @@ -4,6 +4,7 @@ package core import ast.{ untpd, tpd } import Symbols.*, Contexts.* +import TypeApplications.* import util.{SourceFile, ReadOnlyMap} import util.Spans.* import util.CommentParsing.* diff --git a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala index 04d55475ec60..153753d4b496 100644 --- a/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala +++ b/compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala @@ -3,6 +3,7 @@ package dotc package core import Types.* +import TypeApplications.* import Contexts.* import Symbols.* import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index 85edadd40c80..e9a3c242ffab 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -8,6 +8,7 @@ import Periods.* import Names.* import Phases.* import Types.* +import TypeApplications.* import Symbols.* import Scopes.* import Uniques.* diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala index 381caa775dbd..b723c0214a01 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -4,6 +4,7 @@ package core import scala.annotation.{threadUnsafe => tu} import Types.*, Contexts.*, Symbols.*, SymDenotations.*, StdNames.*, Names.*, Phases.* +import TypeApplications.* import Flags.*, Scopes.*, Decorators.*, NameOps.*, Periods.*, NullOpsDecorator.* import unpickleScala2.Scala2Unpickler.ensureConstructor import scala.collection.mutable diff --git a/compiler/src/dotty/tools/dotc/core/NamerOps.scala b/compiler/src/dotty/tools/dotc/core/NamerOps.scala index b29c5633fb8f..303257483a72 100644 --- a/compiler/src/dotty/tools/dotc/core/NamerOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NamerOps.scala @@ -3,9 +3,9 @@ package dotc package core import Contexts.*, Symbols.*, Types.*, Flags.*, Scopes.*, Decorators.*, Names.*, NameOps.* +import TypeApplications.* import SymDenotations.{LazyType, SymDenotation}, StdNames.nme import ContextOps.enter -import TypeApplications.EtaExpansion import collection.mutable import config.Printers.typr import rewrites.Rewrites.patch diff --git a/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala b/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala index 9baf0c40a80b..18c46091d01c 100644 --- a/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala +++ b/compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala @@ -5,6 +5,7 @@ package core import Decorators.* import Symbols.* import Types.* +import TypeApplications.* import Flags.* import Contexts.ctx import dotty.tools.dotc.reporting.trace diff --git a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala index c39db64b77cf..5b9ac5bf33bb 100644 --- a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala @@ -4,10 +4,10 @@ package core import Periods.*, Contexts.*, Symbols.*, Denotations.*, Names.*, NameOps.*, Annotations.* import Types.*, Flags.*, Decorators.*, DenotTransformers.*, StdNames.*, Scopes.* +import TypeApplications.* import NameOps.*, NameKinds.* import Phases.{Phase, typerPhase, unfusedPhases} import Constants.Constant -import TypeApplications.TypeParamInfo import Scopes.Scope import dotty.tools.io.AbstractFile import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index c8ede8bfdec2..019dad2c9a80 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -14,6 +14,7 @@ import Denotations.* import printing.Texts.* import printing.Printer import Types.* +import TypeApplications.* import util.Spans.* import DenotTransformers.* import StdNames.* diff --git a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala index 136384413810..7d5c1d8b7cd1 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala @@ -3,6 +3,7 @@ package dotc package core import Types.* +import TypeApplications.* import Contexts.* import Symbols.* import SymDenotations.LazyType @@ -13,16 +14,10 @@ import StdNames.nme import Flags.{Module, Provisional} import dotty.tools.dotc.config.Config -object TypeApplications { +object TypeApplications: type TypeParamInfo = ParamInfo.Of[TypeName] - /** Assert type is not a TypeBounds instance and return it unchanged */ - def noBounds(tp: Type): Type = tp match { - case tp: TypeBounds => throw new AssertionError("no TypeBounds allowed") - case _ => tp - } - /** Extractor for * * [X1: B1, ..., Xn: Bn] -> C[X1, ..., Xn] @@ -31,7 +26,7 @@ object TypeApplications { * * @param tycon C */ - object EtaExpansion: + object EtaExpansion: // note typer.EtaExpansion /** Test that the parameter bounds in a hk type lambda `[X1,...,Xn] => C[X1, ..., Xn]` * contain the bounds of the type parameters of `C`. This is necessary to be able to @@ -153,13 +148,9 @@ object TypeApplications { mapOver(t) } } -} - -import TypeApplications.* - -/** A decorator that provides methods for modeling type application */ -class TypeApplications(val self: Type) extends AnyVal { + // Extensions that model type application. + extension (self: Type) { // braces to avoid indent /** The type parameters of this type are: * For a ClassInfo type, the type parameters of its class. * For a typeref referring to a class, the type parameters of the class. @@ -315,7 +306,7 @@ class TypeApplications(val self: Type) extends AnyVal { /** Convert a type constructor `TC` which has type parameters `X1, ..., Xn` * to `[X1, ..., Xn] -> TC[X1, ..., Xn]`. */ - def etaExpand(using Context): Type = + def etaExpand(using Context): Type = // note typer.EtaExpansion.etaExpand val tparams = self.typeParams val resType = self.appliedTo(tparams.map(_.paramRef)) self.dealias match @@ -554,7 +545,7 @@ class TypeApplications(val self: Type) extends AnyVal { case _ => self.dropDependentRefinement.dealias.argInfos /** Argument types where existential types in arguments are disallowed */ - def argTypes(using Context): List[Type] = argInfos mapConserve noBounds + def argTypes(using Context): List[Type] = argInfos.mapConserve(_.noBounds) /** Argument types where existential types in arguments are approximated by their lower bound */ def argTypesLo(using Context): List[Type] = argInfos.mapConserve(_.loBound) @@ -588,4 +579,9 @@ class TypeApplications(val self: Type) extends AnyVal { .orElse(self.baseType(defn.ArrayClass)) .argInfos.headOption.getOrElse(NoType) } -} + + /** Assert type is not a TypeBounds instance and return it unchanged */ + def noBounds: self.type = + assert(!self.isInstanceOf[TypeBounds], "no TypeBounds allowed") + self + } diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index 5edd5ca6c415..a4fbe5429659 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -3,6 +3,7 @@ package dotc package core import Types.*, Contexts.*, Symbols.*, Flags.*, Names.*, NameOps.*, Denotations.* +import TypeApplications.* import Decorators.* import Phases.{gettersPhase, elimByNamePhase} import StdNames.nme diff --git a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala index 83f087239477..bcfeb55ad55b 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeErasure.scala @@ -3,6 +3,7 @@ package dotc package core import Symbols.*, Types.*, Contexts.*, Flags.*, Names.*, StdNames.*, Phases.* +import TypeApplications.* import Flags.JavaDefined import Uniques.unique import backend.sjs.JSDefinitions diff --git a/compiler/src/dotty/tools/dotc/core/TypeEval.scala b/compiler/src/dotty/tools/dotc/core/TypeEval.scala index b7995b1ffba2..b9fa696236ed 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeEval.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeEval.scala @@ -3,6 +3,7 @@ package dotc package core import Types.*, Contexts.*, Symbols.*, Constants.*, Decorators.* +import TypeApplications.* import config.Printers.typr import reporting.trace import StdNames.tpnme diff --git a/compiler/src/dotty/tools/dotc/core/TypeOps.scala b/compiler/src/dotty/tools/dotc/core/TypeOps.scala index cf03273b4805..b5ea097f9c5a 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeOps.scala @@ -3,6 +3,7 @@ package dotc package core import Contexts.*, Types.*, Symbols.*, Names.*, NameKinds.*, Flags.* +import TypeApplications.* import SymDenotations.* import util.Spans.* import util.Stats diff --git a/compiler/src/dotty/tools/dotc/core/TypeUtils.scala b/compiler/src/dotty/tools/dotc/core/TypeUtils.scala index 82c027744c38..366f268d4020 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeUtils.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeUtils.scala @@ -4,6 +4,7 @@ package core import TypeErasure.ErasedValueType import Types.*, Contexts.*, Symbols.*, Flags.*, Decorators.*, SymDenotations.* +import TypeApplications.* import Names.{Name, TermName} import Constants.Constant diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index e18785e3aace..4a389c81d693 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -19,6 +19,7 @@ import Denotations.* import Periods.* import CheckRealizable.* import Variances.{Variance, setStructuralVariances, Invariant} +import TypeApplications.* import typer.Nullables import util.Stats.* import util.{SimpleIdentityMap, SimpleIdentitySet} @@ -2132,8 +2133,7 @@ object Types extends TypeUtils { /** Is the `hash` of this type the same for all possible sequences of enclosing binders? */ def hashIsStable: Boolean = true } - - // end Type + end Type // ----- Type categories ---------------------------------------------- @@ -7160,8 +7160,6 @@ object Types extends TypeUtils { // ----- Helpers and Decorator implicits -------------------------------------- - implicit def decorateTypeApplications(tpe: Type): TypeApplications = new TypeApplications(tpe) - extension (tps1: List[Type]) { @tailrec def hashIsStable: Boolean = tps1.isEmpty || tps1.head.hashIsStable && tps1.tail.hashIsStable diff --git a/compiler/src/dotty/tools/dotc/core/Variances.scala b/compiler/src/dotty/tools/dotc/core/Variances.scala index e18a31e46769..392f3de4dbfe 100644 --- a/compiler/src/dotty/tools/dotc/core/Variances.scala +++ b/compiler/src/dotty/tools/dotc/core/Variances.scala @@ -2,7 +2,7 @@ package dotty.tools.dotc package core import Types.*, Contexts.*, Flags.*, Symbols.*, Annotations.* -import TypeApplications.TypeParamInfo +import TypeApplications.* import Decorators.* object Variances { diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index a1a4d56abb15..b3b74ec7d3a9 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -8,6 +8,7 @@ import scala.language.unsafeNulls import dotty.tools.tasty.{ TastyReader, TastyHeaderUnpickler } import Contexts.*, Symbols.*, Types.*, Names.*, StdNames.*, NameOps.*, Scopes.*, Decorators.* +import TypeApplications.* import SymDenotations.*, unpickleScala2.Scala2Unpickler.*, Constants.*, Annotations.*, util.Spans.* import Phases.* import ast.{ tpd, untpd } diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index a7b02a287f6d..03b2f99f25d9 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -9,6 +9,7 @@ import Comments.docCtx import Contexts.* import Symbols.* import Types.* +import TypeApplications.* import Scopes.* import SymDenotations.* import Denotations.* diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala index e97e73dc5760..5f75521bff07 100644 --- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala @@ -10,6 +10,7 @@ import java.lang.Float.intBitsToFloat import java.lang.Double.longBitsToDouble import Contexts.*, Symbols.*, Types.*, Scopes.*, SymDenotations.*, Names.*, NameOps.* +import TypeApplications.* import StdNames.*, Denotations.*, NameOps.*, Flags.*, Constants.*, Annotations.*, Phases.* import NameKinds.{Scala2MethodNameKinds, SuperAccessorName, ExpandedName} import util.Spans.* diff --git a/compiler/src/dotty/tools/dotc/inlines/Inliner.scala b/compiler/src/dotty/tools/dotc/inlines/Inliner.scala index d53682e8d9f1..9875539ac5b6 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inliner.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inliner.scala @@ -4,6 +4,7 @@ package inlines import ast.*, core.* import Flags.*, Symbols.*, Types.*, Decorators.*, Constants.*, Contexts.* +import TypeApplications.* import StdNames.nme import typer.* import Names.Name diff --git a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala index 59386dd9bd4d..49a1f03fcd9a 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala @@ -4,6 +4,7 @@ package inlines import ast.*, core.* import Flags.*, Symbols.*, Types.*, Decorators.*, Constants.*, Contexts.* +import TypeApplications.* import StdNames.{tpnme, nme} import NameOps.* import typer.* diff --git a/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala b/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala index 47a47f10f905..a7dc144e335a 100644 --- a/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala +++ b/compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala @@ -9,6 +9,7 @@ import Flags.* import Symbols.* import Flags.* import Types.* +import TypeApplications.* import Decorators.* import StdNames.nme import Contexts.* diff --git a/compiler/src/dotty/tools/dotc/interactive/Completion.scala b/compiler/src/dotty/tools/dotc/interactive/Completion.scala index dc683aabe1e6..236700949d4c 100644 --- a/compiler/src/dotty/tools/dotc/interactive/Completion.scala +++ b/compiler/src/dotty/tools/dotc/interactive/Completion.scala @@ -19,6 +19,7 @@ import dotty.tools.dotc.core.SymDenotations.SymDenotation import dotty.tools.dotc.core.TypeError import dotty.tools.dotc.core.Phases import dotty.tools.dotc.core.Types.{AppliedType, ExprType, MethodOrPoly, NameFilter, NoType, RefinedType, TermRef, Type, TypeProxy} +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.parsing.Tokens import dotty.tools.dotc.typer.Implicits.SearchSuccess import dotty.tools.dotc.typer.Inferencing diff --git a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala index d1164d4742af..3447233470aa 100644 --- a/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala @@ -15,6 +15,7 @@ import Contexts.* import Symbols.defn import Names.* import Types.* +import TypeApplications.* import ast.Trees.* import Decorators.* import StdNames.* diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index f6e60cd990d6..5e5e34b05d00 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -3,6 +3,7 @@ package printing import core.* import Texts.*, Types.*, Flags.*, Names.*, Symbols.*, NameOps.*, Constants.*, Denotations.* +import dotty.tools.dotc.core.TypeApplications.* import StdNames.* import Contexts.* import Scopes.Scope, Denotations.Denotation, Annotations.Annotation diff --git a/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala b/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala index 82701dafd2c9..4a0f21c02911 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala @@ -17,6 +17,7 @@ import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.TypeOps.* import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.reporting.IllegalVariableInPatternAlternative diff --git a/compiler/src/dotty/tools/dotc/reporting/messages.scala b/compiler/src/dotty/tools/dotc/reporting/messages.scala index 9b032e1e7539..85375cb33acd 100644 --- a/compiler/src/dotty/tools/dotc/reporting/messages.scala +++ b/compiler/src/dotty/tools/dotc/reporting/messages.scala @@ -5,6 +5,7 @@ package reporting import core.* import Contexts.* import Decorators.*, Symbols.*, Names.*, NameOps.*, Types.*, Flags.*, Phases.* +import TypeApplications.* import Denotations.SingleDenotation import SymDenotations.SymDenotation import NameKinds.{WildcardParamName, ContextFunctionParamName} diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala index 4d915b57df1b..70cc1652f338 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala @@ -13,6 +13,7 @@ import Flags.* import Phases.* import Trees.* import Types.* +import TypeApplications.* import Symbols.* import Names.* import StdNames.str diff --git a/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala b/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala index 11467e216aba..0fed1a0f6169 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala @@ -5,6 +5,7 @@ package semanticdb import core.Symbols.* import core.Contexts.Context import core.Types.* +import core.TypeApplications.* import core.Annotations.Annotation import core.Flags import core.Names.Name diff --git a/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala b/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala index b958b64f7c54..cf9eee846d56 100644 --- a/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala +++ b/compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala @@ -10,6 +10,7 @@ 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.TypeApplications.* import dotty.tools.dotc.quoted.QuotePatterns import dotty.tools.dotc.staging.QuoteTypeTags.* import dotty.tools.dotc.staging.StagingLevel.* diff --git a/compiler/src/dotty/tools/dotc/staging/HealType.scala b/compiler/src/dotty/tools/dotc/staging/HealType.scala index 509049e131c8..8364447aabef 100644 --- a/compiler/src/dotty/tools/dotc/staging/HealType.scala +++ b/compiler/src/dotty/tools/dotc/staging/HealType.scala @@ -9,6 +9,7 @@ import core.Flags.* import core.StdNames.* import core.Symbols.* import core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import StagingLevel.* import QuoteTypeTags.* diff --git a/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala b/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala index 1f9334164496..4b012d452754 100644 --- a/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala +++ b/compiler/src/dotty/tools/dotc/transform/AccessProxies.scala @@ -10,6 +10,7 @@ import Names.* import NameOps.* import Decorators.* import Types.* +import dotty.tools.dotc.core.TypeApplications.* import util.Spans.Span import config.Printers.transforms import Annotations.ExperimentalAnnotation diff --git a/compiler/src/dotty/tools/dotc/transform/Bridges.scala b/compiler/src/dotty/tools/dotc/transform/Bridges.scala index 482e5056fad0..68266e6b960c 100644 --- a/compiler/src/dotty/tools/dotc/transform/Bridges.scala +++ b/compiler/src/dotty/tools/dotc/transform/Bridges.scala @@ -4,6 +4,7 @@ package transform import core.* import Symbols.*, Types.*, Contexts.*, Decorators.*, Flags.*, Scopes.*, Phases.* +import TypeApplications.* import DenotTransformers.* import ast.untpd import collection.{mutable, immutable} diff --git a/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala b/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala index 7263bce0478c..a42a9be7327f 100644 --- a/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala +++ b/compiler/src/dotty/tools/dotc/transform/CapturedVars.scala @@ -11,6 +11,7 @@ import core.StdNames.nme import core.Names.* import core.NameKinds.TempResultName import core.Constants.* +import core.TypeApplications.* import util.Store import dotty.tools.uncheckedNN import ast.tpd.* diff --git a/compiler/src/dotty/tools/dotc/transform/Constructors.scala b/compiler/src/dotty/tools/dotc/transform/Constructors.scala index b373565489f0..d872c44d83cb 100644 --- a/compiler/src/dotty/tools/dotc/transform/Constructors.scala +++ b/compiler/src/dotty/tools/dotc/transform/Constructors.scala @@ -16,6 +16,7 @@ import Decorators.* import DenotTransformers.* import collection.mutable import Types.* +import TypeApplications.* object Constructors { val name: String = "constructors" diff --git a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala index 0bf2dc107ce9..63e91175ee93 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala @@ -6,6 +6,7 @@ import core.* import Contexts.* import Symbols.* import Types.* +import TypeApplications.* import Flags.* import SymDenotations.* import DenotTransformers.InfoTransformer diff --git a/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala b/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala index ae2fc578728f..084dec866add 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimRepeated.scala @@ -5,6 +5,7 @@ package transform import core.* import StdNames.nme import Types.* +import TypeApplications.* import transform.MegaPhase.* import Flags.* import Contexts.* diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 3503c707aed9..28da1a6c97eb 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -10,6 +10,7 @@ import core.SymDenotations.* import core.Symbols.* import core.Contexts.* import core.Types.* +import core.TypeApplications.* import core.Names.* import core.StdNames.* import core.NameOps.* diff --git a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala index 4288a82e0191..6926ff6283fb 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala @@ -5,6 +5,7 @@ package transform import core.* import Scopes.newScope import Contexts.*, Symbols.*, Types.*, Flags.*, Decorators.*, StdNames.*, Constants.* +import TypeApplications.* import MegaPhase.* import Names.TypeName diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 0db1ddc5750c..16dd8c5f63df 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -8,6 +8,7 @@ import core.Symbols.* import core.Contexts.* import core.Phases.* import core.Types.* +import core.TypeApplications.* import core.Flags.* import core.Decorators.* import core.StdNames.nme diff --git a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala index 81cc73c26ed6..b30b66224595 100644 --- a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala +++ b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala @@ -7,6 +7,7 @@ import dotty.tools.dotc.transform.MegaPhase.* import ast.untpd import Flags.* import Types.* +import TypeApplications.* import Constants.Constant import Contexts.* import Symbols.* diff --git a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala index dbb4c72ab311..7d56ed5f2ca9 100644 --- a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala +++ b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala @@ -3,6 +3,7 @@ package transform import core.* import Types.* +import TypeApplications.* import Contexts.* import Symbols.* import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala b/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala index 4cf176cfda3a..97aefba57b7b 100644 --- a/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala +++ b/compiler/src/dotty/tools/dotc/transform/FunctionXXLForwarders.scala @@ -11,6 +11,7 @@ import StdNames.* import Symbols.* import MegaPhase.* import Types.* +import TypeApplications.* /** This phase adds forwarder for XXL functions `apply` methods that are implemented with a method diff --git a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala index b0c6672733e2..e50cb01daadb 100644 --- a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala +++ b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala @@ -13,6 +13,7 @@ import core.Symbols.* import core.TypeApplications.{EtaExpansion, TypeParamInfo} import core.TypeErasure.{erasedGlb, erasure, fullErasure, isGenericArrayElement, tupleArity} import core.Types.* +import core.TypeApplications.* import core.classfile.ClassfileConstants import config.Printers.transforms diff --git a/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala b/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala index 96cffeb1097d..ca7358b46e0c 100644 --- a/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala +++ b/compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala @@ -7,6 +7,7 @@ import core.Symbols.* import core.Contexts.* import ast.TreeTypeMap import core.Types.* +import core.TypeApplications.* import core.Flags.* import core.Decorators.* import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala b/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala index 491f3d3d2572..f23938eb1f08 100644 --- a/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala +++ b/compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala @@ -13,6 +13,7 @@ import core.Constants.Constant import core.NameOps.isContextFunction import core.StdNames.nme import core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import core.Decorators.* import coverage.* import typer.LiftCoverage diff --git a/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala b/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala index 9f99e7a6fbd3..2654a17f7772 100644 --- a/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala +++ b/compiler/src/dotty/tools/dotc/transform/Instrumentation.scala @@ -6,6 +6,7 @@ import core.* import Contexts.* import Symbols.* import Flags.* +import TypeApplications.* import Decorators.* import MegaPhase.* diff --git a/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala b/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala index c2fdccc2861e..f7a9417b5b20 100644 --- a/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/InterceptedMethods.scala @@ -8,6 +8,7 @@ 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.TypeApplications.* import dotty.tools.dotc.transform.MegaPhase.MiniPhase object InterceptedMethods { diff --git a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala index 76bc09e07540..229e60842307 100644 --- a/compiler/src/dotty/tools/dotc/transform/LazyVals.scala +++ b/compiler/src/dotty/tools/dotc/transform/LazyVals.scala @@ -13,6 +13,7 @@ import core.NameKinds.{ExpandedName, LazyBitMapName, LazyLocalInitName, LazyLoca import core.StdNames.nme import core.Symbols.* import core.Types.* +import core.TypeApplications.* import core.{Names, StdNames} import dotty.tools.dotc.config.Feature import transform.MegaPhase.MiniPhase diff --git a/compiler/src/dotty/tools/dotc/transform/Memoize.scala b/compiler/src/dotty/tools/dotc/transform/Memoize.scala index 0b4d4c7dbf59..5b078066dfac 100644 --- a/compiler/src/dotty/tools/dotc/transform/Memoize.scala +++ b/compiler/src/dotty/tools/dotc/transform/Memoize.scala @@ -8,6 +8,7 @@ import Phases.* import SymDenotations.SymDenotation import Denotations.* import Symbols.* +import TypeApplications.* import Constants.* import MegaPhase.* diff --git a/compiler/src/dotty/tools/dotc/transform/Mixin.scala b/compiler/src/dotty/tools/dotc/transform/Mixin.scala index ce3f26071b77..ec6d421fd851 100644 --- a/compiler/src/dotty/tools/dotc/transform/Mixin.scala +++ b/compiler/src/dotty/tools/dotc/transform/Mixin.scala @@ -10,6 +10,7 @@ import Flags.* import Symbols.* import SymDenotations.* import Types.* +import TypeApplications.* import Decorators.* import DenotTransformers.* import StdNames.* diff --git a/compiler/src/dotty/tools/dotc/transform/MixinOps.scala b/compiler/src/dotty/tools/dotc/transform/MixinOps.scala index 1b2d3e79c9a4..d8d9940d6978 100644 --- a/compiler/src/dotty/tools/dotc/transform/MixinOps.scala +++ b/compiler/src/dotty/tools/dotc/transform/MixinOps.scala @@ -3,6 +3,7 @@ package transform import core.* import Symbols.*, Types.*, Contexts.*, DenotTransformers.*, Flags.* +import TypeApplications.* import util.Spans.* import StdNames.*, NameOps.* diff --git a/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala b/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala index 6ff81ab13cf1..ec00567ad15a 100644 --- a/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala +++ b/compiler/src/dotty/tools/dotc/transform/NonLocalReturns.scala @@ -8,6 +8,7 @@ import NameKinds.NonLocalReturnKeyName import config.SourceVersion.* import Decorators.em import dotty.tools.dotc.config.MigrationVersion +import dotty.tools.dotc.core.TypeApplications.* object NonLocalReturns { import ast.tpd.* diff --git a/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala b/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala index 16c50b9cd474..75b7fb0d9297 100644 --- a/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala +++ b/compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala @@ -4,6 +4,7 @@ package transform import core.* import Flags.*, Symbols.*, Contexts.*, Scopes.*, Decorators.*, Types.Type +import TypeApplications.* import NameKinds.DefaultGetterName import NullOpsDecorator.* import collection.immutable.BitSet diff --git a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala index e2505144abda..de2e274733fb 100644 --- a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -5,6 +5,7 @@ package transform import core.* import MegaPhase.* import Symbols.*, Contexts.*, Types.*, StdNames.*, NameOps.* +import TypeApplications.* import patmat.SpaceEngine import util.Spans.* import typer.Applications.* diff --git a/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala b/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala index d9a1ea9ad9af..ff60467e2975 100644 --- a/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala +++ b/compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala @@ -5,6 +5,7 @@ import core.* import Decorators.* import Flags.* import Types.* +import TypeApplications.* import Contexts.* import Symbols.* import Constants.* diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala index 5e2ff2d43283..81b85f2e029a 100644 --- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala +++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala @@ -10,6 +10,7 @@ import dotty.tools.dotc.inlines.Inlines import dotty.tools.dotc.typer.VarianceChecker import typer.ErrorReporting.errorTree import Types.*, Contexts.*, Names.*, Flags.*, DenotTransformers.*, Phases.* +import TypeApplications.* import SymDenotations.*, StdNames.*, Annotations.*, Trees.*, Scopes.* import Decorators.* import Symbols.*, NameOps.* diff --git a/compiler/src/dotty/tools/dotc/transform/Recheck.scala b/compiler/src/dotty/tools/dotc/transform/Recheck.scala index b04b28aebd01..83d39eb08d8a 100644 --- a/compiler/src/dotty/tools/dotc/transform/Recheck.scala +++ b/compiler/src/dotty/tools/dotc/transform/Recheck.scala @@ -4,6 +4,7 @@ package transform import core.* import Symbols.*, Contexts.*, Types.*, ContextOps.*, Decorators.*, SymDenotations.* +import TypeApplications.* import Flags.*, NameKinds.*, Denotations.{Denotation, SingleDenotation} import ast.* import Names.Name diff --git a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala index f1603db0e5a0..fa6913c3dc0e 100644 --- a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala +++ b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala @@ -5,6 +5,7 @@ import core.* import Decorators.* import Flags.* import Types.* +import TypeApplications.* import Contexts.* import Symbols.* diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala index c85f06e6075f..e4332eed7227 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala @@ -3,6 +3,7 @@ package transform import ast.Trees.*, ast.tpd, core.* import Contexts.*, Types.*, Decorators.*, Symbols.*, DenotTransformers.* +import TypeApplications.* import SymDenotations.*, Scopes.*, StdNames.*, NameOps.*, Names.* import MegaPhase.MiniPhase import config.Feature diff --git a/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala b/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala index 43aef6279cec..bf9dbae69f03 100644 --- a/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala +++ b/compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala @@ -5,6 +5,7 @@ import ast.Trees.*, ast.tpd, core.* import Contexts.*, Types.*, Decorators.*, Symbols.*, DenotTransformers.* import SymDenotations.*, Scopes.*, StdNames.*, NameOps.*, Names.*, NameKinds.* import MegaPhase.MiniPhase +import dotty.tools.dotc.core.TypeApplications.* /** Specializes classes that inherit from `FunctionN` where there exists a diff --git a/compiler/src/dotty/tools/dotc/transform/Splicing.scala b/compiler/src/dotty/tools/dotc/transform/Splicing.scala index 967c1cb6d19b..7dc2bc38fa8e 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicing.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicing.scala @@ -5,6 +5,7 @@ import core.* import Decorators.* import Flags.* import Types.* +import TypeApplications.* import Contexts.* import Symbols.* import Constants.* diff --git a/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala b/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala index fbff51acb514..bbcd4041a984 100644 --- a/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala +++ b/compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala @@ -3,6 +3,7 @@ package transform import core.* import Symbols.*, Types.*, Contexts.*, Names.*, StdNames.*, Constants.* +import TypeApplications.* import Flags.* import DenotTransformers.* import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala index b43acce78d35..16a7070c62d0 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -9,6 +9,7 @@ import core.SymDenotations.* import core.Contexts.* import core.Symbols.* import core.Types.* +import core.TypeApplications.* import core.Flags.* import core.StdNames.* import core.NameKinds.{DocArtifactName, OuterSelectName} @@ -894,4 +895,4 @@ object TreeChecker { case _ => Nil } -} \ No newline at end of file +} diff --git a/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala b/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala index bdb7072a6530..c96988e21403 100644 --- a/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala +++ b/compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala @@ -10,6 +10,7 @@ import StdNames.* import Symbols.* import MegaPhase.* import Types.* +import TypeApplications.* import dotty.tools.dotc.ast.tpd /** Optimize generic operations on tuples */ diff --git a/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala b/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala index a8c8ec8ce1d8..fb0eaaf9da00 100644 --- a/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala +++ b/compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala @@ -6,6 +6,7 @@ import scala.language.unsafeNulls as _ import core.* import Contexts.*, Symbols.*, Types.*, Constants.*, StdNames.*, Decorators.* +import TypeApplications.* import ast.untpd import Erasure.Boxing.* import TypeErasure.* diff --git a/compiler/src/dotty/tools/dotc/transform/UnrollDefinitions.scala b/compiler/src/dotty/tools/dotc/transform/UnrollDefinitions.scala index bf9e20e68930..d08eb73f20eb 100644 --- a/compiler/src/dotty/tools/dotc/transform/UnrollDefinitions.scala +++ b/compiler/src/dotty/tools/dotc/transform/UnrollDefinitions.scala @@ -15,6 +15,7 @@ import Names.* import dotty.tools.dotc.core.NameKinds.DefaultGetterName import dotty.tools.dotc.core.Types.{MethodType, NamedType, PolyType, Type, NoPrefix, NoType} +import TypeApplications.* import dotty.tools.dotc.printing.Formatting.hl diff --git a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala index 55b26d89b5a0..0b789330332c 100644 --- a/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala +++ b/compiler/src/dotty/tools/dotc/transform/VCInlineMethods.scala @@ -5,6 +5,7 @@ package transform import ast.{Trees, tpd} import core.* import Contexts.*, Trees.*, Types.* +import TypeApplications.* import DenotTransformers.*, MegaPhase.* import ExtensionMethods.*, ValueClasses.* import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala index 92262d528487..3eac5936e92d 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala @@ -6,6 +6,7 @@ import core.* import Contexts.* import Symbols.* import Types.* +import TypeApplications.* import Denotations.Denotation import StdNames.* import Names.TermName diff --git a/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala b/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala index 1afcfbac6206..41968a0396aa 100644 --- a/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala +++ b/compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala @@ -10,6 +10,7 @@ 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.TypeApplications.* 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 ab5885e6278c..572de06edc14 100644 --- a/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala +++ b/compiler/src/dotty/tools/dotc/transform/patmat/Space.scala @@ -5,6 +5,7 @@ package patmat import core.* import Constants.*, Contexts.*, Decorators.*, Flags.*, NullOpsDecorator.*, Symbols.*, Types.* +import TypeApplications.* import Names.*, NameOps.*, StdNames.* import ast.*, tpd.* import config.Printers.exhaustivity diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala b/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala index 951024f3d4db..aa5590a760bf 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/AddLocalJSFakeNews.scala @@ -9,6 +9,7 @@ import core.Contexts.* import core.Decorators.* import core.StdNames.nme import core.Symbols.* +import core.TypeApplications.* import dotty.tools.backend.sjs.JSDefinitions.jsdefn diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala b/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala index 5c7119860ae4..27bfcd5c867f 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala @@ -13,6 +13,7 @@ import core.DenotTransformers.* import core.Symbols.* import core.Contexts.* import core.Types.* +import core.TypeApplications.* import core.Flags.* import core.Decorators.* import core.StdNames.nme diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala b/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala index b7a179ac7562..028964104977 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala @@ -13,6 +13,7 @@ import Scopes.* import Symbols.* import StdNames.* import Types.* +import TypeApplications.* import Decorators.em import dotty.tools.dotc.transform.MegaPhase.* diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala index 43b29a224564..a32d7b9e67a5 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala @@ -13,6 +13,7 @@ import StdNames.* import Symbols.* import Types.* +import TypeApplications.* import util.Spans.Span import util.SrcPos diff --git a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala index 13fcbe542448..9c5276f999a2 100644 --- a/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala @@ -20,6 +20,7 @@ import StdNames.* import Symbols.* import Types.* +import TypeApplications.* import JSSymUtils.* diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index da6b20b75c29..77334b33180f 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -11,6 +11,7 @@ import Flags.* import Symbols.* import Denotations.Denotation import Types.* +import TypeApplications.* import Decorators.* import ErrorReporting.* import Trees.* @@ -27,7 +28,6 @@ import config.{Feature, MigrationVersion, SourceVersion} import collection.mutable import config.Printers.{overload, typr, unapp} -import TypeApplications.* import Annotations.Annotation import Constants.{Constant, IntTag} diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 73918dcaeb84..64a8bce0d6ce 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -6,6 +6,7 @@ import core.* import ast.* import Contexts.* import Types.* +import TypeApplications.* import Flags.* import Names.* import StdNames.* diff --git a/compiler/src/dotty/tools/dotc/typer/Deriving.scala b/compiler/src/dotty/tools/dotc/typer/Deriving.scala index ef77adf18626..180202a0f818 100644 --- a/compiler/src/dotty/tools/dotc/typer/Deriving.scala +++ b/compiler/src/dotty/tools/dotc/typer/Deriving.scala @@ -7,6 +7,7 @@ import ast.* import ast.Trees.* import StdNames.* import Contexts.*, Symbols.*, Types.*, SymDenotations.*, Names.*, NameOps.*, Flags.*, Decorators.* +import TypeApplications.* import ProtoTypes.*, ContextOps.* import util.Spans.* import util.SrcPos diff --git a/compiler/src/dotty/tools/dotc/typer/Dynamic.scala b/compiler/src/dotty/tools/dotc/typer/Dynamic.scala index 14cc7bf963a6..568d3c697712 100644 --- a/compiler/src/dotty/tools/dotc/typer/Dynamic.scala +++ b/compiler/src/dotty/tools/dotc/typer/Dynamic.scala @@ -12,6 +12,7 @@ import dotty.tools.dotc.core.Mode import dotty.tools.dotc.core.Names.{Name, TermName} import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.core.Decorators.* import dotty.tools.dotc.core.TypeErasure import util.Spans.* diff --git a/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala b/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala index 26d03db4b7dc..601dbf256739 100644 --- a/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala +++ b/compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala @@ -6,6 +6,7 @@ import core.* import ast.{Trees, untpd, tpd} import Contexts.* import Types.* +import TypeApplications.* import Flags.* import Symbols.* import Names.* diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala index 935930e1b8b3..2b8991bf322c 100644 --- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala +++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala @@ -11,6 +11,7 @@ import printing.{Showable, Printer} import printing.Texts.* import Contexts.* import Types.* +import TypeApplications.* import Flags.* import Mode.ImplicitsEnabled import NameKinds.{LazyImplicitName, ContextBoundParamName} diff --git a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala index 520c8bf62ba4..4bb4b2cb6a23 100644 --- a/compiler/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/compiler/src/dotty/tools/dotc/typer/Inferencing.scala @@ -5,6 +5,7 @@ package typer import core.* import ast.* import Contexts.*, Types.*, Flags.*, Symbols.* +import TypeApplications.* import ProtoTypes.* import NameKinds.UniqueName import util.Spans.* diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala index e4d237072041..2c2e48871517 100644 --- a/compiler/src/dotty/tools/dotc/typer/Namer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala @@ -6,6 +6,7 @@ import core.* import ast.* import Trees.*, StdNames.*, Scopes.*, Denotations.*, NamerOps.*, ContextOps.* import Contexts.*, Symbols.*, Types.*, SymDenotations.*, Names.*, NameOps.*, Flags.* +import TypeApplications.* import Decorators.*, Comments.{_, given} import NameKinds.DefaultGetterName import ast.desugar, ast.desugar.* diff --git a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala index 0b6688c6f5fe..2a5bdf48f760 100644 --- a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -5,6 +5,7 @@ package typer import core.* import ast.* import Contexts.*, Types.*, Denotations.*, Names.*, StdNames.*, NameOps.*, Symbols.* +import TypeApplications.* import NameKinds.DepParamName import Trees.* import Constants.* diff --git a/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala b/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala index 4e7c4336b852..1ab4a8156b1b 100644 --- a/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala +++ b/compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala @@ -14,6 +14,7 @@ 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.TypeApplications.* import dotty.tools.dotc.inlines.PrepareInlineable import dotty.tools.dotc.quoted.QuotePatterns import dotty.tools.dotc.staging.StagingLevel.* diff --git a/compiler/src/dotty/tools/dotc/typer/ReTyper.scala b/compiler/src/dotty/tools/dotc/typer/ReTyper.scala index ed8919661860..c75924bd76fd 100644 --- a/compiler/src/dotty/tools/dotc/typer/ReTyper.scala +++ b/compiler/src/dotty/tools/dotc/typer/ReTyper.scala @@ -4,6 +4,7 @@ package typer import core.* import Contexts.* import Types.* +import TypeApplications.* import Symbols.* import StdNames.* import Decorators.* diff --git a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala index a79408b756ee..8bb916b25756 100644 --- a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala @@ -5,6 +5,7 @@ package typer import transform.* import core.* import Symbols.*, Types.*, Contexts.*, Flags.*, Names.*, NameOps.*, NameKinds.* +import TypeApplications.* import StdNames.*, Denotations.*, Phases.*, SymDenotations.* import NameKinds.DefaultGetterName import util.Spans.* diff --git a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala index 761a24e10474..896a34379c9f 100644 --- a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala @@ -6,6 +6,7 @@ import core.* import util.Spans.Span import Contexts.* import Types.*, Flags.*, Symbols.*, Names.*, StdNames.*, Constants.* +import TypeApplications.* import TypeErasure.{erasure, hasStableErasure} import Decorators.* import ProtoTypes.* diff --git a/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala b/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala index 4d16a342f484..cc0e3457f197 100644 --- a/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -6,6 +6,7 @@ import core.* import ast.* import Contexts.*, ContextOps.*, Constants.*, Types.*, Symbols.*, Names.*, Flags.*, Decorators.* import ErrorReporting.*, Annotations.*, Denotations.*, SymDenotations.*, StdNames.* +import TypeApplications.* import util.SrcPos import NameOps.* import collection.mutable diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index 819a66b52946..be5f0978333d 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -14,6 +14,7 @@ import ProtoTypes.* import Contexts.* import Symbols.* import Types.* +import TypeApplications.* import SymDenotations.* import Annotations.* import Names.* @@ -27,7 +28,7 @@ import ErrorReporting.* import Checking.* import Inferencing.* import Dynamic.isDynamicExpansion -import EtaExpansion.etaExpand +import typer.EtaExpansion.etaExpand import TypeComparer.CompareResult import inlines.{Inlines, PrepareInlineable} import util.Spans.* diff --git a/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala b/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala index 0c2929283ee3..7a914687dfe9 100644 --- a/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala +++ b/compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala @@ -4,6 +4,7 @@ package typer import dotty.tools.dotc.ast.{ Trees, tpd } import core.* import Types.*, Contexts.*, Flags.*, Symbols.*, Trees.* +import TypeApplications.* import Decorators.* import Variances.* import NameKinds.* diff --git a/compiler/src/dotty/tools/dotc/util/Signatures.scala b/compiler/src/dotty/tools/dotc/util/Signatures.scala index 3b45d8f2fa51..0d4405a8191f 100644 --- a/compiler/src/dotty/tools/dotc/util/Signatures.scala +++ b/compiler/src/dotty/tools/dotc/util/Signatures.scala @@ -16,6 +16,7 @@ import core.Flags import core.Names.* import core.NameKinds import core.Types.* +import core.TypeApplications.* import core.Symbols.{NoSymbol, isLocalToBlock} import interactive.Interactive import util.Spans.Span diff --git a/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala b/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala index 3790174526b3..ccf22bed7cf8 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala @@ -8,6 +8,7 @@ import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Names.* import dotty.tools.dotc.core.Mode.GadtConstraintInference import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.core.StdNames.nme import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.util.optional diff --git a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala index 852d7ee8b20f..cff55a9e82dd 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala @@ -14,6 +14,7 @@ import dotty.tools.dotc.core.NameOps.* import dotty.tools.dotc.core.Scopes.* import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Types +import dotty.tools.dotc.core.TypeApplications, TypeApplications.* import dotty.tools.dotc.NoCompilationUnit import dotty.tools.dotc.quoted.MacroExpansion import dotty.tools.dotc.quoted.PickledQuotes @@ -1897,9 +1898,9 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler dotc.core.Symbols.defn.isTupleNType(self) def select(sym: Symbol): TypeRepr = self.select(sym) def appliedTo(targ: TypeRepr): TypeRepr = - dotc.core.Types.decorateTypeApplications(self).appliedTo(targ) + TypeApplications.appliedTo(self)(targ) def appliedTo(targs: List[TypeRepr]): TypeRepr = - dotc.core.Types.decorateTypeApplications(self).appliedTo(targs) + TypeApplications.appliedTo(self)(targs) def substituteTypes(from: List[Symbol], to: List[TypeRepr]): TypeRepr = self.subst(from, to) diff --git a/compiler/test/dotty/tools/AnnotationsTests.scala b/compiler/test/dotty/tools/AnnotationsTests.scala index 3998bf7c93c0..bf5da42c4943 100644 --- a/compiler/test/dotty/tools/AnnotationsTests.scala +++ b/compiler/test/dotty/tools/AnnotationsTests.scala @@ -10,6 +10,7 @@ import dotc.core.Contexts._ import dotc.core.Phases._ import dotc.core.Types._ import dotc.core.Symbols._ +import dotty.tools.dotc.core.TypeApplications.* import java.io.File import java.nio.file._ diff --git a/compiler/test/dotty/tools/SignatureTest.scala b/compiler/test/dotty/tools/SignatureTest.scala index 587d7098a0a7..3ea4b03c2a83 100644 --- a/compiler/test/dotty/tools/SignatureTest.scala +++ b/compiler/test/dotty/tools/SignatureTest.scala @@ -12,6 +12,7 @@ import dotc.core.Flags._ import dotc.core.Phases._ import dotc.core.Names._ import dotc.core.Types._ +import dotty.tools.dotc.core.TypeApplications.* import dotc.core.Symbols._ import dotc.core.StdNames._ import dotc.core.Signature diff --git a/compiler/test/dotty/tools/dotc/transform/patmat/SpaceEngineTest.scala b/compiler/test/dotty/tools/dotc/transform/patmat/SpaceEngineTest.scala index d7b2fd6a5173..4843d5b87a10 100644 --- a/compiler/test/dotty/tools/dotc/transform/patmat/SpaceEngineTest.scala +++ b/compiler/test/dotty/tools/dotc/transform/patmat/SpaceEngineTest.scala @@ -4,6 +4,7 @@ package transform package patmat import core.*, Annotations.*, Contexts.*, Decorators.*, Flags.*, Names.*, StdNames.*, Symbols.*, Types.* +import TypeApplications.* import ast.*, tpd.* import vulpix.TestConfiguration, TestConfiguration.basicClasspath diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionValue.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionValue.scala index 05d97972d76e..3ba9333048e1 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionValue.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/CompletionValue.scala @@ -9,6 +9,7 @@ import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.StdNames.nme import dotty.tools.dotc.core.Symbols.Symbol import dotty.tools.dotc.core.Types.Type +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.pc.printer.ShortenedTypePrinter import dotty.tools.pc.utils.InteractiveEnrichments.decoded diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala index e7902ef8aa44..7260f1e18e28 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala @@ -24,6 +24,7 @@ import dotty.tools.dotc.core.StdNames import dotty.tools.dotc.core.StdNames.* import dotty.tools.dotc.core.Symbols.* import dotty.tools.dotc.core.Types.* +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.interactive.Completion import dotty.tools.dotc.interactive.Completion.Mode import dotty.tools.dotc.util.SourcePosition diff --git a/presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala b/presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala index 2e89b4e5bb99..76cfaf76dc3e 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala @@ -28,6 +28,7 @@ import dotty.tools.dotc.core.Types.OrType import dotty.tools.dotc.core.Types.Type import dotty.tools.dotc.core.Types.TypeRef import dotty.tools.dotc.core.Types.AppliedType +import dotty.tools.dotc.core.TypeApplications.* import dotty.tools.dotc.typer.Applications.UnapplyArgs import dotty.tools.dotc.util.SourcePosition import dotty.tools.pc.AutoImports.AutoImportsGenerator diff --git a/tests/neg-macros/i19842-a.check b/tests/neg-macros/i19842-a.check index 4d92739e00ff..f4c83dd57fd9 100644 --- a/tests/neg-macros/i19842-a.check +++ b/tests/neg-macros/i19842-a.check @@ -8,9 +8,9 @@ |Parents in tree: [trait Serializer] | | at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8) - | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:210) + | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:211) + | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:287) | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:286) - | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:285) | at Macros$.makeSerializer(Macro.scala:25) | |--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-macros/i19842-b.check b/tests/neg-macros/i19842-b.check index 5a2fe6f39d48..1679eb02c8e8 100644 --- a/tests/neg-macros/i19842-b.check +++ b/tests/neg-macros/i19842-b.check @@ -8,9 +8,9 @@ |Parents in tree: [class Object, trait Serializer, trait Foo] | | at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8) - | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:210) + | at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:211) + | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:287) | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:286) - | at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:285) | at Macros$.makeSerializer(Macro.scala:27) | |--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-macros/i23008.check b/tests/neg-macros/i23008.check index b26ef11d201f..2128e24e8298 100644 --- a/tests/neg-macros/i23008.check +++ b/tests/neg-macros/i23008.check @@ -5,8 +5,8 @@ | Exception occurred while executing macro expansion. | java.lang.IllegalArgumentException: requirement failed: value of StringConstant cannot be `null` | at scala.Predef$.require(Predef.scala:337) + | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2535) | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2534) - | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2533) | at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:80) | at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:78) | at scala.quoted.Expr$.apply(Expr.scala:70)