Skip to content

Commit f3a7b1e

Browse files
committed
1 parent 5e84937 commit f3a7b1e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import scala.annotation.internal.sharable
3636
import config.Printers.typr
3737

3838
object Symbols {
39-
4039
implicit def eqSymbol: CanEqual[Symbol, Symbol] = CanEqual.derived
4140

4241
/** Tree attachment containing the identifiers in a tree as a sorted array */

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,10 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
17491749
dotc.core.Types.decorateTypeApplications(self).appliedTo(targs)
17501750
def substituteTypes(from: List[Symbol], to: List[TypeRepr]): TypeRepr =
17511751
self.subst(from, to)
1752+
1753+
def typeParams: List[TypeRepr] = self match
1754+
case AppliedType(_, args) => args
1755+
case _ => List.empty
17521756
end extension
17531757
end TypeReprMethods
17541758

@@ -2480,6 +2484,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
24802484

24812485
def name: String = self.denot.name.toString
24822486
def fullName: String = self.denot.fullName.toString
2487+
24832488
def pos: Option[Position] =
24842489
if self.exists then Some(self.sourcePos) else None
24852490

library/src/scala/quoted/Quotes.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,6 +2571,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
25712571
@experimental
25722572
def substituteTypes(from: List[Symbol], to: List[TypeRepr]): TypeRepr
25732573

2574+
/** The type parameters */
2575+
@experimental
2576+
def typeParams: List[TypeRepr]
25742577
end extension
25752578
}
25762579

0 commit comments

Comments
 (0)