aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 21b74e07b..28bd7ffed 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -995,6 +995,14 @@ object Types {
case _ => Nil
}
+ /** The parameter types of a PolyType or MethodType, Empty list for others */
+ final def paramNamess(implicit ctx: Context): List[List[TermName]] = this match {
+ case mt: MethodType => mt.paramNames :: mt.resultType.paramNamess
+ case pt: PolyType => pt.resultType.paramNamess
+ case _ => Nil
+ }
+
+
/** The parameter types in the first parameter section of a PolyType or MethodType, Empty list for others */
final def firstParamTypes(implicit ctx: Context): List[Type] = this match {
case mt: MethodType => mt.paramTypes