Skip to content

Commit

Permalink
meh -- prefix for ASF should have kind *
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaanm committed Aug 22, 2018
1 parent 535c9cc commit 01c172a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/compiler/scala/tools/nsc/typechecker/PatternTypers.scala
Expand Up @@ -231,11 +231,12 @@ trait PatternTypers {
// Note that undetParams may thus be different from caseClass.typeParams.
// (For a monomorphic case class, GenPolyType will not create/destruct a PolyType.)
val (undetparams, caseConstructorType) =
GenPolyType.unapply {
{
val tpars = caseClass.typeParams
val cloned = cloneSymbolsAndModify(caseClass.typeParams, _.asSeenFrom(caseClassType, caseClass))
// We need to bind any case class type params that may appear in the constructor's info, so that their infos also get relativized by asSeenFrom
val ctorInfo = GenPolyType(caseClass.typeParams, caseClass.primaryConstructor.info)
ctorInfo.asSeenFrom(caseClassType, caseClass)
}.get
(cloned, caseClass.primaryConstructor.info.asSeenFrom(appliedType(caseClassType, cloned.map(_.typeConstructor)), caseClass).substSym(tpars, cloned))
}

val tree1 = TypeTree(caseConstructorType) setOriginal tree

Expand Down

0 comments on commit 01c172a

Please sign in to comment.