aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-02 12:03:32 +0100
committerMartin Odersky <odersky@gmail.com>2014-03-02 12:03:56 +0100
commit0ebdbde3d51f92647f3b1cd452d60648ed8e7a39 (patch)
treefa8016066b11b10db7f47d9a0a875a8114d28681 /src/dotty/tools/dotc/core/TypeOps.scala
parentcba210d0c362759a710f4d9b5dbf1ecfe0d1f278 (diff)
downloaddotty-0ebdbde3d51f92647f3b1cd452d60648ed8e7a39.tar.gz
dotty-0ebdbde3d51f92647f3b1cd452d60648ed8e7a39.tar.bz2
dotty-0ebdbde3d51f92647f3b1cd452d60648ed8e7a39.zip
Rename baseType -> baseTypeRef
What was `baseType` and is now `baseTypeRef` only computes the prefix of of basetype, not the type arguments. If type arguments need to be included there is `baseTypeWithArgs`. The reason is that type arguments are usually already encoded as member types. But this was a source of errors because in Scala 2, baseType includes the type arguements. (also added test file structural.scala forgotten from last commit)
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index 272e93dd3..ca69ab615 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -12,13 +12,13 @@ trait TypeOps { this: Context =>
def toPrefix(pre: Type, cls: Symbol, thiscls: ClassSymbol): Type = /*>|>*/ ctx.debugTraceIndented(s"toPrefix($pre, $cls, $thiscls)") /*<|<*/ {
if ((pre eq NoType) || (pre eq NoPrefix) || (cls is PackageClass))
tp
- else if (thiscls.derivesFrom(cls) && pre.baseType(thiscls).exists)
+ else if (thiscls.derivesFrom(cls) && pre.baseTypeRef(thiscls).exists)
pre match {
case SuperType(thispre, _) => thispre
case _ => pre
}
else
- toPrefix(pre.baseType(cls).normalizedPrefix, cls.owner, thiscls)
+ toPrefix(pre.baseTypeRef(cls).normalizedPrefix, cls.owner, thiscls)
}
/*>|>*/ ctx.conditionalTraceIndented(TypeOps.track , s"asSeen ${tp.show} from (${pre.show}, ${cls.show})", show = true) /*<|<*/ { // !!! DEBUG