aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-05-30 10:09:48 +0200
committerMartin Odersky <odersky@gmail.com>2013-05-30 10:09:48 +0200
commit17d0e7008f62882c10193ea0db09c9b90736c320 (patch)
tree44cf4d4f2675effabb2ba651f9399d7d6fce21a1 /src/dotty/tools/dotc/core/SymDenotations.scala
parentc53ac49cbe7c98c05a99fea3c8e1dcad75275a82 (diff)
downloaddotty-17d0e7008f62882c10193ea0db09c9b90736c320.tar.gz
dotty-17d0e7008f62882c10193ea0db09c9b90736c320.tar.bz2
dotty-17d0e7008f62882c10193ea0db09c9b90736c320.zip
wip, because I have to get off this machine.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 51e03aee7..56b168102 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -102,7 +102,7 @@ object SymDenotations {
}
}
- protected[core] final def info_=(tp: Type) = {
+ protected[dotc] final def info_=(tp: Type) = {
if ((this is ModuleClass) && !(this is PackageClass))
tp match {
case ClassInfo(_, _, _, _, ost) =>
@@ -585,21 +585,24 @@ object SymDenotations {
* @throws ClassCastException is this is not a type
*/
def typeConstructor(implicit ctx: Context): TypeRef =
- if ((this is PackageClass) || owner.isTerm) symbolicRef
+ if ((this is PackageClass) || owner.isTerm) symTypeRef
else TypeRef(owner.thisType, name.asTypeName).withDenot(this)
/** The symbolic typeref representing the type constructor for this type.
* @throws ClassCastException is this is not a type
*/
- final def symbolicRef(implicit ctx: Context): TypeRef =
+ final def symTypeRef(implicit ctx: Context): TypeRef =
TypeRef.withSym(owner.thisType, symbol.asType)
- /** The termref pointing to this termsymbol
+ /** The symbolic termref pointing to this termsymbol
* @throws ClassCastException is this is not a term
*/
- def termRef(implicit ctx: Context): TermRef =
+ def symTermRef(implicit ctx: Context): TermRef =
TermRef.withSym(owner.thisType, symbol.asTerm)
+ def symRef(implicit ctx: Context): NamedType =
+ NamedType.withSym(owner.thisType, symbol)
+
/** The variance of this type parameter as an Int, with
* +1 = Covariant, -1 = Contravariant, 0 = Nonvariant, or not a type parameter
*/
@@ -1042,7 +1045,7 @@ object SymDenotations {
// only apply to the module but not to the module class. The right solution
// is to have the module class completer set the annotations of both the
// class and the module.
- denot.info = mclass.symbolicRef
+ denot.info = mclass.symTypeRef
denot.privateWithin = from.privateWithin
}
}