aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index a14f28ce4..b4cc9091c 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -577,6 +577,12 @@ object SymDenotations {
final def symbolicRef(implicit ctx: Context): TypeRef =
TypeRef.withSym(owner.thisType, symbol.asType)
+ /** The termref pointing to this termsymbol
+ * @throws ClassCastException is this is not a term
+ */
+ def termRef(implicit ctx: Context): TermRef =
+ TermRef.withSym(owner.thisType, symbol.asTerm)
+
/** The variance of this type parameter as an Int, with
* +1 = Covariant, -1 = Contravariant, 0 = Nonvariant, or not a type parameter
*/