@@ -175,7 +175,7 @@ object Denotations {
175175 *
176176 * @param symbol The referencing symbol, or NoSymbol is none exists
177177 */
178- abstract class Denotation (val symbol : Symbol , protected var myInfo : Type ) extends PreDenotation with printing.Showable {
178+ abstract class Denotation (val symbol : Symbol , protected var myInfo : Type , val isType : Boolean ) extends PreDenotation with printing.Showable {
179179 type AsSeenFromResult <: Denotation
180180
181181 /** The type info.
@@ -194,9 +194,6 @@ object Denotations {
194194 */
195195 def infoOrCompleter : Type
196196
197- /** Is this a reference to a type symbol? */
198- def isType : Boolean
199-
200197 /** Is this a reference to a term symbol? */
201198 def isTerm : Boolean = ! isType
202199
@@ -577,7 +574,7 @@ object Denotations {
577574 end infoMeet
578575
579576 /** A non-overloaded denotation */
580- abstract class SingleDenotation (symbol : Symbol , initInfo : Type ) extends Denotation (symbol, initInfo) {
577+ abstract class SingleDenotation (symbol : Symbol , initInfo : Type , isType : Boolean ) extends Denotation (symbol, initInfo, isType ) {
581578 protected def newLikeThis (symbol : Symbol , info : Type , pre : Type , isRefinedMethod : Boolean ): SingleDenotation
582579
583580 final def name (using Context ): Name = symbol.name
@@ -1147,9 +1144,9 @@ object Denotations {
11471144 acc(false , symbol.info)
11481145 }
11491146
1150- abstract class NonSymSingleDenotation (symbol : Symbol , initInfo : Type , override val prefix : Type ) extends SingleDenotation (symbol, initInfo) {
1147+ abstract class NonSymSingleDenotation (symbol : Symbol , initInfo : Type , override val prefix : Type )
1148+ extends SingleDenotation (symbol, initInfo, initInfo.isInstanceOf [TypeType ]) {
11511149 def infoOrCompleter : Type = initInfo
1152- def isType : Boolean = infoOrCompleter.isInstanceOf [TypeType ]
11531150 }
11541151
11551152 class UniqueRefDenotation (
@@ -1245,11 +1242,10 @@ object Denotations {
12451242
12461243 /** An overloaded denotation consisting of the alternatives of both given denotations.
12471244 */
1248- case class MultiDenotation (denot1 : Denotation , denot2 : Denotation ) extends Denotation (NoSymbol , NoType ) with MultiPreDenotation {
1245+ case class MultiDenotation (denot1 : Denotation , denot2 : Denotation ) extends Denotation (NoSymbol , NoType , isType = false ) with MultiPreDenotation {
12491246 validFor = denot1.validFor & denot2.validFor
1250-
1247+
12511248 final def infoOrCompleter : Type = multiHasNot(" info" )
1252- final def isType : Boolean = false
12531249 final def hasUniqueSym : Boolean = false
12541250 final def name (using Context ): Name = denot1.name
12551251 final def signature (using Context ): Signature = Signature .OverloadedSignature
0 commit comments