Skip to content

Commit f836d7a

Browse files
committed
Rename supertypes to baseTypes. Fix tests
1 parent 5409db1 commit f836d7a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
246246
optional(self.rhs.asInstanceOf[tpd.Template].self)
247247
def body: List[Statement] =
248248
self.rhs.asInstanceOf[tpd.Template].body
249-
def supertypes: List[TypeRepr] = self.symbol match
249+
def baseTypes: List[TypeRepr] = self.symbol match
250250
case cls: dotc.core.Symbols.ClassSymbol =>
251251
val ref = cls.classDenot.classInfo.appliedRef
252252
ref.baseClasses.map(ref.baseType(_))

library/src/scala/quoted/Quotes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
491491
*/
492492
def body: List[Statement]
493493

494-
/** Supertypes of the class */
495-
def supertypes: List[TypeRepr]
494+
/** Base types of the class */
495+
def baseTypes: List[TypeRepr]
496496

497497
end extension
498498
end ClassDefMethods

scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ trait ClassLikeSupport:
7979
Seq(link -> superLink) ++ getSupertypesGraph(tree, superLink)
8080
}
8181

82-
val supertypes = classDef.supertypes
82+
val supertypes = classDef.baseTypes.tail
8383
.map(t => t.typeSymbol -> t)
8484
.map {
8585
case (symbol, tpe) =>

0 commit comments

Comments
 (0)