Skip to content

Commit 370cdc1

Browse files
oderskyWojciechMazur
authored andcommitted
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. [Cherry-picked aaacc43]
1 parent 21ebb62 commit 370cdc1

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,6 @@ object SymDenotations {
684684
def isWrappedToplevelDef(using Context): Boolean =
685685
!isConstructor && owner.isPackageObject
686686

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,7 @@ object Types extends TypeUtils {
25712571
symd.maybeOwner.membersNeedAsSeenFrom(prefix) && !symd.is(NonMember)
25722572
|| prefix.match
25732573
case prefix: Types.ThisType =>
2574-
(symd.isAbstractType
2574+
(symd.isAbstractOrParamType
25752575
|| symd.isTerm
25762576
&& !symd.flagsUNSAFE.isOneOf(Module | Final | Param)
25772577
&& !symd.isConstructor

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2649,7 +2649,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
26492649
def isAliasType: Boolean = self.denot.isAliasType
26502650
def isAnonymousClass: Boolean = self.denot.isAnonymousClass
26512651
def isAnonymousFunction: Boolean = self.denot.isAnonymousFunction
2652-
def isAbstractType: Boolean = self.denot.isAbstractType
2652+
def isAbstractType: Boolean = self.denot.isAbstractOrParamType
26532653
def isClassConstructor: Boolean = self.denot.isClassConstructor
26542654
def isType: Boolean = self.isType
26552655
def isTerm: Boolean = self.isTerm

library/src/scala/quoted/Quotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3993,7 +3993,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
39933993
/** Is this symbol an anonymous function? */
39943994
def isAnonymousFunction: Boolean
39953995

3996-
/** Is this symbol an abstract type? */
3996+
/** Is this symbol an abstract type or a type parameter? */
39973997
def isAbstractType: Boolean
39983998

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

0 commit comments

Comments
 (0)