diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-10 18:17:49 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-10 18:17:49 +0100 |
commit | 1d8c014a0a7872120df2b46e1a7e305c98f5b4c5 (patch) | |
tree | 2ff19268e81e094a619b345ec327345907d6c46e /src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | 97aced07f273a31be69fd771a4e900a8e0cfa43a (diff) | |
download | dotty-1d8c014a0a7872120df2b46e1a7e305c98f5b4c5.tar.gz dotty-1d8c014a0a7872120df2b46e1a7e305c98f5b4c5.tar.bz2 dotty-1d8c014a0a7872120df2b46e1a7e305c98f5b4c5.zip |
Rename RefinedThis -> SkolemType
Also, make binder type of SkolemType refer to arbitrary type,
not necessarily RefinedType.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index b29022281..e59c60959 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -373,9 +373,9 @@ class TypeApplications(val self: Type) extends AnyVal { case _ => firstBaseArgInfo(defn.SeqClass) } - def containsRefinedThis(target: Type)(implicit ctx: Context): Boolean = { + def containsSkolemType(target: Type)(implicit ctx: Context): Boolean = { def recur(tp: Type): Boolean = tp.stripTypeVar match { - case RefinedThis(tp) => + case SkolemType(tp) => tp eq target case tp: NamedType => tp.info match { @@ -432,7 +432,7 @@ class TypeApplications(val self: Type) extends AnyVal { def replacements(rt: RefinedType): List[Type] = for (sym <- boundSyms) - yield TypeRef(RefinedThis(rt), correspondingParamName(sym)) + yield TypeRef(SkolemType(rt), correspondingParamName(sym)) def rewrite(tp: Type): Type = tp match { case tp @ RefinedType(parent, name: TypeName) => @@ -475,7 +475,7 @@ class TypeApplications(val self: Type) extends AnyVal { val lambda = defn.lambdaTrait(boundSyms.map(_.variance)) val substitutedRHS = (rt: RefinedType) => { val argRefs = boundSyms.indices.toList.map(i => - RefinedThis(rt).select(tpnme.lambdaArgName(i))) + SkolemType(rt).select(tpnme.lambdaArgName(i))) tp.subst(boundSyms, argRefs).bounds.withVariance(1) } val res = RefinedType(lambda.typeRef, tpnme.Apply, substitutedRHS) |