Skip to content

Commit aaacc43

Browse files
committed
Drop isAbstractType
Always use isAbstractorParamType. quotes.reflect still uses isAbstractType for backwards compatibility, but it now also includes type parameters. This was the case anyway before for type parameters set up by Namer.
1 parent a782148 commit aaacc43

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

-3
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,6 @@ object SymDenotations {
685685
def isWrappedToplevelDef(using Context): Boolean =
686686
!isConstructor && owner.isPackageObject
687687

688-
/** Is this symbol an abstract type? */
689-
final def isAbstractType(using Context): Boolean = this.is(DeferredType)
690-
691688
/** Is this symbol an alias type? */
692689
final def isAliasType(using Context): Boolean =
693690
isAbstractOrAliasType && !isAbstractOrParamType

compiler/src/dotty/tools/dotc/core/Types.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -2700,7 +2700,7 @@ object Types extends TypeUtils {
27002700
symd.maybeOwner.membersNeedAsSeenFrom(prefix) && !symd.is(NonMember)
27012701
|| prefix.match
27022702
case prefix: Types.ThisType =>
2703-
(symd.isAbstractType
2703+
(symd.isAbstractOrParamType
27042704
|| symd.isTerm
27052705
&& !symd.flagsUNSAFE.isOneOf(Module | Final | Param)
27062706
&& !symd.isConstructor

compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -2687,7 +2687,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
26872687
def isAliasType: Boolean = self.denot.isAliasType
26882688
def isAnonymousClass: Boolean = self.denot.isAnonymousClass
26892689
def isAnonymousFunction: Boolean = self.denot.isAnonymousFunction
2690-
def isAbstractType: Boolean = self.denot.isAbstractType
2690+
def isAbstractType: Boolean = self.denot.isAbstractOrParamType
26912691
def isClassConstructor: Boolean = self.denot.isClassConstructor
26922692
def isSuperAccessor = self.name.is(dotc.core.NameKinds.SuperAccessorName)
26932693
def isType: Boolean = self.isType

library/src/scala/quoted/Quotes.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -4025,7 +4025,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
40254025
/** Is this symbol an anonymous function? */
40264026
def isAnonymousFunction: Boolean
40274027

4028-
/** Is this symbol an abstract type? */
4028+
/** Is this symbol an abstract type or a type parameter? */
40294029
def isAbstractType: Boolean
40304030

40314031
/** Is this the constructor of a class? */

0 commit comments

Comments
 (0)