summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Definitions.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/Definitions.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/Definitions.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Definitions.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala
index abf11020fa..517df37c6b 100644
--- a/src/reflect/scala/reflect/internal/Definitions.scala
+++ b/src/reflect/scala/reflect/internal/Definitions.scala
@@ -223,7 +223,7 @@ trait Definitions extends api.StandardDefinitions {
def fullyInitializeSymbol(sym: Symbol): Symbol = {
sym.initialize
fullyInitializeType(sym.info)
- fullyInitializeType(sym.tpe)
+ fullyInitializeType(sym.tpe_*)
sym
}
def fullyInitializeType(tp: Type): Type = {
@@ -410,7 +410,8 @@ trait Definitions extends api.StandardDefinitions {
def isScalaRepeatedParamType(tp: Type) = tp.typeSymbol == RepeatedParamClass
def isJavaRepeatedParamType(tp: Type) = tp.typeSymbol == JavaRepeatedParamClass
def isRepeatedParamType(tp: Type) = isScalaRepeatedParamType(tp) || isJavaRepeatedParamType(tp)
- def isRepeated(param: Symbol) = isRepeatedParamType(param.tpe)
+ def isRepeated(param: Symbol) = isRepeatedParamType(param.tpe_*)
+ def isByName(param: Symbol) = isByNameParamType(param.tpe_*)
def isCastSymbol(sym: Symbol) = sym == Any_asInstanceOf || sym == Object_asInstanceOf
def isJavaVarArgsMethod(m: Symbol) = m.isMethod && isJavaVarArgs(m.info.params)
@@ -549,7 +550,7 @@ trait Definitions extends api.StandardDefinitions {
// The given symbol represents either String.+ or StringAdd.+
def isStringAddition(sym: Symbol) = sym == String_+ || sym == StringAdd_+
- def isArrowAssoc(sym: Symbol) = ArrowAssocClass.tpe.decls.toList contains sym
+ def isArrowAssoc(sym: Symbol) = sym.owner == ArrowAssocClass
// The given symbol is a method with the right name and signature to be a runnable java program.
def isJavaMainMethod(sym: Symbol) = (sym.name == nme.main) && (sym.info match {
@@ -733,7 +734,7 @@ trait Definitions extends api.StandardDefinitions {
* C[E1, ..., En] forSome { E1 >: LB1 <: UB1 ... en >: LBn <: UBn }.
*/
def classExistentialType(clazz: Symbol): Type =
- newExistentialType(clazz.typeParams, clazz.tpe)
+ newExistentialType(clazz.typeParams, clazz.tpe_*)
/** Given type U, creates a Type representing Class[_ <: U].
*/