From d0aaa86a9fe20e00f0cfa4fd1154126579933fb7 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 3 Dec 2013 12:32:59 +0100 Subject: SI-8023 Address review comments around typedHigherKindedType - Make `WildCardType` kind polymorphic - Factory methods for expected kinds. They are still just `Type`-s, though. - Check if the type parameter is initialized, rather than its owner. - Take advantage of these to cleanup `typedAppliedTypeTree` TODO: is this comment totally accurate? If so, should we refactor `Kind.FromParams(tparams)` to `Kind.Arity(tparams.length)`? // @M: kind-arity checking is done here and in adapt, // full kind-checking is in checkKindBounds (in Infer) --- src/reflect/scala/reflect/internal/Kinds.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/reflect') diff --git a/src/reflect/scala/reflect/internal/Kinds.scala b/src/reflect/scala/reflect/internal/Kinds.scala index d48a6c6322..8ae201f045 100644 --- a/src/reflect/scala/reflect/internal/Kinds.scala +++ b/src/reflect/scala/reflect/internal/Kinds.scala @@ -326,6 +326,8 @@ trait Kinds { private[internal] object StringState { def empty: StringState = StringState(Seq()) } + def FromParams(tparams: List[Symbol]): Type = GenPolyType(tparams, AnyTpe) + def Wildcard: Type = WildcardType } class ProperTypeKind(val bounds: TypeBounds) extends Kind { import Kind.StringState -- cgit v1.2.3