aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-09-05 02:56:06 +0200
committerMartin Odersky <odersky@gmail.com>2014-09-05 02:57:00 +0200
commitdc02760eac04accb9e0d5e34128f4c79cfa8c327 (patch)
tree1b048975e008a02ca7832a93cff2c987981a2cbb /src/dotty/tools/dotc/core/SymDenotations.scala
parent652a7e5d5a1db429a7270049d51ca63f494ee64b (diff)
downloaddotty-dc02760eac04accb9e0d5e34128f4c79cfa8c327.tar.gz
dotty-dc02760eac04accb9e0d5e34128f4c79cfa8c327.tar.bz2
dotty-dc02760eac04accb9e0d5e34128f4c79cfa8c327.zip
Partially reverting of 08c6eaca
Partial revert of 08c6eaca "this type is a term ref to the source module". The problem with doing this is that it introduces spurious outer references. An inner module that contains self referenves always needs the directly enclosing class. The revert avoids this dependency by making ThisTypes always point to TypeRefs. Several other changes were necessary to make the builds pass: TypeRefs had to get prefixes after erasure so that they can be reloaded. Symbols of such typerefs had to be retrieved without forcing a denotation. One test (blockescapes.scala) fails and is moved to pending, awaiting further resolution. Also two other new tests in pending which currently fail (and have failed before).
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 487103213..e028c492c 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1026,16 +1026,16 @@ object SymDenotations {
}
private def computeThisType(implicit ctx: Context): Type =
- if (this is Package)
- ThisType.raw(TypeRef(NoPrefix, symbol.asType))
- else {
+ ThisType.raw(
+ TypeRef(if (this is Package) NoPrefix else owner.thisType, symbol.asType))
+/* else {
val pre = owner.thisType
if (this is Module)
if (isMissing(pre)) TermRef(pre, sourceModule.asTerm)
else TermRef.withSig(pre, name.sourceModuleName, Signature.NotAMethod)
else ThisType.raw(TypeRef(pre, symbol.asType))
}
-
+*/
private[this] var myTypeRef: TypeRef = null
override def typeRef(implicit ctx: Context): TypeRef = {