diff options
author | Martin Odersky <odersky@gmail.com> | 2016-05-02 19:57:57 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-05-18 19:43:22 +0200 |
commit | 9aa800f8a9905de059b6e34554cb166a9776dff3 (patch) | |
tree | 824650b825bd28b747c107d2746df45c8c0090eb /src/dotty/tools/dotc/core/Types.scala | |
parent | fe5f4f3963d2d6b2f6514a362fb312bc2e7d7f94 (diff) | |
download | dotty-9aa800f8a9905de059b6e34554cb166a9776dff3.tar.gz dotty-9aa800f8a9905de059b6e34554cb166a9776dff3.tar.bz2 dotty-9aa800f8a9905de059b6e34554cb166a9776dff3.zip |
Refined handling of atSignature
We cannot throw a merge error if atSignature does not give
a unique single denotation. Counter example is compiling dotty itself,
where we get a false negative during bridge generation.
Instead, atSigature needs to return a normal denotation, and we
need to check separately where required that a denotation is in
fact a SingleDenotation.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 8ef0e9fd1..3ad43a05e 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1437,7 +1437,7 @@ object Types { asMemberOf(prefix) match { case NoDenotation => d.current case newd: SingleDenotation => newd - case newd => newd.atSignature(d.signature).orElse(d.current) + case newd => newd.atSignature(d.signature).checkUnique.orElse(d.current) } private def denotOfSym(sym: Symbol)(implicit ctx: Context): Denotation = { @@ -1729,7 +1729,7 @@ object Types { override def loadDenot(implicit ctx: Context): Denotation = { val d = super.loadDenot if (sig eq Signature.OverloadedSignature) d - else d.atSignature(sig) + else d.atSignature(sig).checkUnique } override def newLikeThis(prefix: Type)(implicit ctx: Context): TermRef = { |