diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-12-20 11:44:08 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-12-20 15:38:23 +0100 |
commit | 906a7a7dfa38e53bfdffa2e94ddbf5eb23587592 (patch) | |
tree | b565b35021dce50a4e6a09e6bc2d594b437e6610 /src/dotty/tools/dotc/core/Types.scala | |
parent | c864e118e7bd04dcbd0503ab9af6729fda94ff3f (diff) | |
download | dotty-906a7a7dfa38e53bfdffa2e94ddbf5eb23587592.tar.gz dotty-906a7a7dfa38e53bfdffa2e94ddbf5eb23587592.tar.bz2 dotty-906a7a7dfa38e53bfdffa2e94ddbf5eb23587592.zip |
Linker Specific: allow phases to get to TASTY section.
Makes all classes and fields on the way to TASTY section accessible.
Example of usage can be found here:
https://gist.github.com/DarkDimius/0f9dc769b0dd7a3c7365
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 8 |
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 |