aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-04-04 10:18:33 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-04-08 17:02:20 +0200
commit09a4bc5d099de71de824a35a67a26e7091e3bb5a (patch)
tree0787d8e5e92507b6ad0f23ad5a8bafe2d03a8930 /src/dotty/tools/dotc/core/Denotations.scala
parent3486eb0088f78e8ca93c0bc8f883c2af53ee7d3d (diff)
downloaddotty-09a4bc5d099de71de824a35a67a26e7091e3bb5a.tar.gz
dotty-09a4bc5d099de71de824a35a67a26e7091e3bb5a.tar.bz2
dotty-09a4bc5d099de71de824a35a67a26e7091e3bb5a.zip
Reworked TermRef handling
The main problem with TermRef handling was that signatures were not always tracked correctly. New invariant: A TermRef that points to a symbol is always a TermRefWithSig, and the signature is the one of the corresponding member. We achieve this by sometimes generating a new TermRefWithSig if a TermRef gets a denotation. One possible simplification would be to always store a signature in a TermRef. There's still a problem in TermRefWithSig#newLikeThis, which currently works only if the previously stored denotation references a symbol. We will need to generalize JointRefDenotation to contain multiple symbols for a complete fix.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala
index 0622829c5..63b94efbd 100644
--- a/src/dotty/tools/dotc/core/Denotations.scala
+++ b/src/dotty/tools/dotc/core/Denotations.scala
@@ -334,7 +334,7 @@ object Denotations {
final def info(implicit ctx: Context) = infoOrCompleter
final def validFor = denot1.validFor & denot2.validFor
final def isType = false
- def signature(implicit ctx: Context) = multiHasNot("signature")
+ final def signature(implicit ctx: Context) = Signature.OverloadedSignature
def atSignature(sig: Signature)(implicit ctx: Context): SingleDenotation =
denot1.atSignature(sig) orElse denot2.atSignature(sig)
def current(implicit ctx: Context): Denotation =