@@ -342,10 +342,10 @@ object Denotations {
342342 def mergeDenot (denot1 : Denotation , denot2 : SingleDenotation ): Denotation = denot1 match {
343343 case denot1 @ MultiDenotation (denot11, denot12) =>
344344 val d1 = mergeDenot(denot11, denot2)
345- if (d1.exists) denot1.derivedMultiDenotation (d1, denot12)
345+ if (d1.exists) denot1.derivedUnionDenotation (d1, denot12)
346346 else {
347347 val d2 = mergeDenot(denot12, denot2)
348- if (d2.exists) denot1.derivedMultiDenotation (denot11, d2)
348+ if (d2.exists) denot1.derivedUnionDenotation (denot11, d2)
349349 else NoDenotation
350350 }
351351 case denot1 : SingleDenotation =>
@@ -532,11 +532,11 @@ object Denotations {
532532 else if (! that.exists) that
533533 else this match {
534534 case denot1 @ MultiDenotation (denot11, denot12) =>
535- denot1.derivedMultiDenotation (denot11 | (that, pre), denot12 | (that, pre))
535+ denot1.derivedUnionDenotation (denot11 | (that, pre), denot12 | (that, pre))
536536 case denot1 : SingleDenotation =>
537537 that match {
538538 case denot2 @ MultiDenotation (denot21, denot22) =>
539- denot2.derivedMultiDenotation (this | (denot21, pre), this | (denot22, pre))
539+ denot2.derivedUnionDenotation (this | (denot21, pre), this | (denot22, pre))
540540 case denot2 : SingleDenotation =>
541541 unionDenot(denot1, denot2)
542542 }
@@ -558,9 +558,10 @@ object Denotations {
558558 final def isType = false
559559 final def signature (implicit ctx : Context ) = Signature .OverloadedSignature
560560 def atSignature (sig : Signature , site : Type , relaxed : Boolean )(implicit ctx : Context ): Denotation =
561- derivedMultiDenotation(denot1.atSignature(sig, site, relaxed), denot2.atSignature(sig, site, relaxed))
561+ if (sig eq Signature .OverloadedSignature ) this
562+ else derivedUnionDenotation(denot1.atSignature(sig, site, relaxed), denot2.atSignature(sig, site, relaxed))
562563 def current (implicit ctx : Context ): Denotation =
563- derivedMultiDenotation (denot1.current, denot2.current)
564+ derivedUnionDenotation (denot1.current, denot2.current)
564565 def altsWith (p : Symbol => Boolean ): List [SingleDenotation ] =
565566 denot1.altsWith(p) ++ denot2.altsWith(p)
566567 def suchThat (p : Symbol => Boolean )(implicit ctx : Context ): SingleDenotation = {
@@ -580,12 +581,15 @@ object Denotations {
580581 val d2 = denot2 accessibleFrom (pre, superAccess)
581582 if (! d1.exists) d2
582583 else if (! d2.exists) d1
583- else derivedMultiDenotation (d1, d2)
584+ else derivedUnionDenotation (d1, d2)
584585 }
585586 def mapInfo (f : Type => Type )(implicit ctx : Context ): Denotation =
586- derivedMultiDenotation(denot1.mapInfo(f), denot2.mapInfo(f))
587- def derivedMultiDenotation (d1 : Denotation , d2 : Denotation ) =
588- if ((d1 eq denot1) && (d2 eq denot2)) this else MultiDenotation (d1, d2)
587+ derivedUnionDenotation(denot1.mapInfo(f), denot2.mapInfo(f))
588+ def derivedUnionDenotation (d1 : Denotation , d2 : Denotation ): Denotation =
589+ if ((d1 eq denot1) && (d2 eq denot2)) this
590+ else if (! d1.exists) d2
591+ else if (! d2.exists) d1
592+ else MultiDenotation (d1, d2)
589593 override def toString = alternatives.mkString(" <and> " )
590594
591595 private def multiHasNot (op : String ): Nothing =
0 commit comments