@@ -175,7 +175,7 @@ object Denotations {
175
175
*
176
176
* @param symbol The referencing symbol, or NoSymbol is none exists
177
177
*/
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 {
179
179
type AsSeenFromResult <: Denotation
180
180
181
181
/** The type info.
@@ -194,9 +194,6 @@ object Denotations {
194
194
*/
195
195
def infoOrCompleter : Type
196
196
197
- /** Is this a reference to a type symbol? */
198
- def isType : Boolean
199
-
200
197
/** Is this a reference to a term symbol? */
201
198
def isTerm : Boolean = ! isType
202
199
@@ -577,7 +574,7 @@ object Denotations {
577
574
end infoMeet
578
575
579
576
/** 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 ) {
581
578
protected def newLikeThis (symbol : Symbol , info : Type , pre : Type , isRefinedMethod : Boolean ): SingleDenotation
582
579
583
580
final def name (using Context ): Name = symbol.name
@@ -1150,9 +1147,9 @@ object Denotations {
1150
1147
acc(false , symbol.info)
1151
1148
}
1152
1149
1153
- abstract class NonSymSingleDenotation (symbol : Symbol , initInfo : Type , override val prefix : Type ) extends SingleDenotation (symbol, initInfo) {
1150
+ abstract class NonSymSingleDenotation (symbol : Symbol , initInfo : Type , override val prefix : Type )
1151
+ extends SingleDenotation (symbol, initInfo, initInfo.isInstanceOf [TypeType ]) {
1154
1152
def infoOrCompleter : Type = initInfo
1155
- def isType : Boolean = infoOrCompleter.isInstanceOf [TypeType ]
1156
1153
}
1157
1154
1158
1155
class UniqueRefDenotation (
@@ -1248,11 +1245,10 @@ object Denotations {
1248
1245
1249
1246
/** An overloaded denotation consisting of the alternatives of both given denotations.
1250
1247
*/
1251
- case class MultiDenotation (denot1 : Denotation , denot2 : Denotation ) extends Denotation (NoSymbol , NoType ) with MultiPreDenotation {
1248
+ case class MultiDenotation (denot1 : Denotation , denot2 : Denotation ) extends Denotation (NoSymbol , NoType , isType = false ) with MultiPreDenotation {
1252
1249
validFor = denot1.validFor & denot2.validFor
1253
-
1250
+
1254
1251
final def infoOrCompleter : Type = multiHasNot(" info" )
1255
- final def isType : Boolean = false
1256
1252
final def hasUniqueSym : Boolean = false
1257
1253
final def name (using Context ): Name = denot1.name
1258
1254
final def signature (using Context ): Signature = Signature .OverloadedSignature
0 commit comments