Skip to content

Fix #9045: kinding issue in rawTypeRef #9079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4600,6 +4600,7 @@ object Types {
def apply(lo: Type, hi: Type)(implicit ctx: Context): TypeBounds =
unique(new RealTypeBounds(lo, hi))
def empty(implicit ctx: Context): TypeBounds = apply(defn.NothingType, defn.AnyType)
def emptyPolyKind(implicit ctx: Context): TypeBounds = apply(defn.NothingType, defn.AnyKindType)
def upper(hi: Type)(implicit ctx: Context): TypeBounds = apply(defn.NothingType, hi)
def lower(lo: Type)(implicit ctx: Context): TypeBounds = apply(lo, defn.AnyType)
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/SymUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class SymUtils(val self: Symbol) extends AnyVal {

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

/** Is symbol a quote operation? */
def isQuote(implicit ctx: Context): Boolean =
Expand Down
4 changes: 4 additions & 0 deletions tests/pos/i9045.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sealed trait Test[F[_]]
object Test {
final case class Completed[F[_]]() extends Test[F]
}