Skip to content

Commit 14f0297

Browse files
committed
Updating naming
1 parent 219bf7c commit 14f0297

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
@@ -1750,7 +1750,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
17501750
def substituteTypes(from: List[Symbol], to: List[TypeRepr]): TypeRepr =
17511751
self.subst(from, to)
17521752

1753-
def typeParams: List[TypeRepr] = self match
1753+
def typeArgs: List[TypeRepr] = self match
17541754
case AppliedType(_, args) => args
17551755
case _ => List.empty
17561756
end extension

library/src/scala/quoted/Quotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2573,7 +2573,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
25732573

25742574
/** The applied type parameters (empty if there is no such parameters) */
25752575
@experimental
2576-
def typeParams: List[TypeRepr]
2576+
def typeArgs: List[TypeRepr]
25772577
end extension
25782578
}
25792579

tests/run-macros/i13947/Macro_1.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ inline def printTypeParams[A]: Unit = ${ printTypeParamsImpl[A] }
55
def printTypeParamsImpl[A: Type](using q: Quotes): Expr[Unit] = {
66
import q.reflect.*
77

8-
val tparams: List[TypeRepr] = TypeRepr.of[A].typeParams
9-
val debug = tparams.map(_.show).mkString("[", ", ", "]")
8+
val targs: List[TypeRepr] = TypeRepr.of[A].typeArgs
9+
val debug = targs.map(_.show).mkString("[", ", ", "]")
1010

1111
'{ println(${Expr(debug)}) }
1212
}

0 commit comments

Comments
 (0)