aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/ParamInfo.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/ParamInfo.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/ParamInfo.scala12
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/ParamInfo.scala b/compiler/src/dotty/tools/dotc/core/ParamInfo.scala
index f824c3e9c..46e378fc2 100644
--- a/compiler/src/dotty/tools/dotc/core/ParamInfo.scala
+++ b/compiler/src/dotty/tools/dotc/core/ParamInfo.scala
@@ -1,21 +1,23 @@
package dotty.tools.dotc.core
-import Names.TypeName
+import Names.Name
import Contexts.Context
-import Types.{Type, TypeBounds}
+import Types.Type
/** A common super trait of Symbol and LambdaParam.
* Used to capture the attributes of type parameters which can be implemented as either.
*/
trait ParamInfo {
+ type ThisName <: Name
+
/** Is this the info of a type parameter? Will return `false` for symbols
* that are not type parameters.
*/
def isTypeParam(implicit ctx: Context): Boolean
/** The name of the type parameter */
- def paramName(implicit ctx: Context): TypeName
+ def paramName(implicit ctx: Context): ThisName
/** The info of the type parameter */
def paramInfo(implicit ctx: Context): Type
@@ -37,4 +39,8 @@ trait ParamInfo {
/** A type that refers to the parameter */
def paramRef(implicit ctx: Context): Type
+}
+
+object ParamInfo {
+ type Of[N] = ParamInfo { type ThisName = N }
} \ No newline at end of file