aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/Splitter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-05-02 19:57:57 +0200
committerMartin Odersky <odersky@gmail.com>2016-05-18 19:43:22 +0200
commit9aa800f8a9905de059b6e34554cb166a9776dff3 (patch)
tree824650b825bd28b747c107d2746df45c8c0090eb /src/dotty/tools/dotc/transform/Splitter.scala
parentfe5f4f3963d2d6b2f6514a362fb312bc2e7d7f94 (diff)
downloaddotty-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/transform/Splitter.scala')
-rw-r--r--src/dotty/tools/dotc/transform/Splitter.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/Splitter.scala b/src/dotty/tools/dotc/transform/Splitter.scala
index 410b412e0..efcf95ede 100644
--- a/src/dotty/tools/dotc/transform/Splitter.scala
+++ b/src/dotty/tools/dotc/transform/Splitter.scala
@@ -46,7 +46,7 @@ class Splitter extends MiniPhaseTransform { thisTransform =>
val mbr = tp.member(name)
if (!mbr.isOverloaded) mbr.asSingleDenotation
else tree.tpe match {
- case tref: TermRefWithSignature => mbr.atSignature(tref.sig)
+ case tref: TermRefWithSignature => mbr.atSignature(tref.sig).checkUnique
case _ =>
def alts = mbr.alternatives.map(alt => i"$alt: ${alt.info}").mkString(", ")
ctx.error(s"cannot disambiguate overloaded members $alts", tree.pos)