summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Types.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-02 08:05:28 -0700
committerPaul Phillips <paulp@improving.org>2012-10-02 09:50:43 -0700
commitb1307ff156c4b3ba736659ac3b5aee50bb38844f (patch)
tree10dbe8964e80275ed32ad0e842c03b9b62ab8460 /src/reflect/scala/reflect/internal/Types.scala
parent609b3b8b740447b212f0ee04c1e52d8c72b8dfc8 (diff)
downloadscala-b1307ff156c4b3ba736659ac3b5aee50bb38844f.tar.gz
scala-b1307ff156c4b3ba736659ac3b5aee50bb38844f.tar.bz2
scala-b1307ff156c4b3ba736659ac3b5aee50bb38844f.zip
All the actual changes of tpe to tpe_* or tpeHK.
These are the call sites which formerly could be seen to call .tpe on a symbol with unapplied type parameters. Now each such call site makes an explicit choice about what is intended for the result type.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Types.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index e80cf6fde6..aa3c99eb1d 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -735,6 +735,7 @@ trait Types extends api.Types { self: SymbolTable =>
* }}}
*/
def memberInfo(sym: Symbol): Type = {
+ require(sym ne NoSymbol, this)
sym.info.asSeenFrom(this, sym.owner)
}
@@ -1403,7 +1404,7 @@ trait Types extends api.Types { self: SymbolTable =>
object ThisType extends ThisTypeExtractor {
def apply(sym: Symbol): Type =
- if (phase.erasedTypes) sym.tpe
+ if (phase.erasedTypes) sym.tpe_*
else unique(new UniqueThisType(sym))
}
@@ -1633,7 +1634,7 @@ trait Types extends api.Types { self: SymbolTable =>
val paramToVarMap = varToParamMap map (_.swap)
val varToParam = new TypeMap {
def apply(tp: Type) = varToParamMap get tp match {
- case Some(sym) => sym.tpe
+ case Some(sym) => sym.tpe_*
case _ => mapOver(tp)
}
}
@@ -1652,7 +1653,7 @@ trait Types extends api.Types { self: SymbolTable =>
tpe.baseTypeSeqCache = undetBaseTypeSeq
tpe.baseTypeSeqCache =
if (tpe.typeSymbol.isRefinementClass)
- tpe.memo(compoundBaseTypeSeq(tpe))(_.baseTypeSeq updateHead tpe.typeSymbol.tpe)
+ tpe.memo(compoundBaseTypeSeq(tpe))(_.baseTypeSeq updateHead tpe.typeSymbol.tpe_*)
else
compoundBaseTypeSeq(tpe)
} finally {