Skip to content

Commit 2c116e3

Browse files
authored
Merge pull request #9079 from dotty-staging/fix-rawTypeRef
Fix #9045: kinding issue in rawTypeRef
2 parents 09bfd11 + 946300d commit 2c116e3

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4600,6 +4600,7 @@ object Types {
46004600
def apply(lo: Type, hi: Type)(implicit ctx: Context): TypeBounds =
46014601
unique(new RealTypeBounds(lo, hi))
46024602
def empty(implicit ctx: Context): TypeBounds = apply(defn.NothingType, defn.AnyType)
4603+
def emptyPolyKind(implicit ctx: Context): TypeBounds = apply(defn.NothingType, defn.AnyKindType)
46034604
def upper(hi: Type)(implicit ctx: Context): TypeBounds = apply(defn.NothingType, hi)
46044605
def lower(lo: Type)(implicit ctx: Context): TypeBounds = apply(lo, defn.AnyType)
46054606
}

compiler/src/dotty/tools/dotc/transform/SymUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class SymUtils(val self: Symbol) extends AnyVal {
211211

212212
/** The typeRef with wildcard arguments for each type parameter */
213213
def rawTypeRef(implicit ctx: Context) =
214-
self.typeRef.appliedTo(self.typeParams.map(_ => TypeBounds.empty))
214+
self.typeRef.appliedTo(self.typeParams.map(_ => TypeBounds.emptyPolyKind))
215215

216216
/** Is symbol a quote operation? */
217217
def isQuote(implicit ctx: Context): Boolean =

tests/pos/i9045.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sealed trait Test[F[_]]
2+
object Test {
3+
final case class Completed[F[_]]() extends Test[F]
4+
}

0 commit comments

Comments
 (0)