aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-07-23 16:42:35 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-07-23 16:42:35 +0200
commit5766b9976982071caf6e20a629c04a66ccf5cbb5 (patch)
treef19a31730e80806d0f73bf179fdf54b300a9d2e7 /src/dotty/tools/dotc/core/SymDenotations.scala
parenta1087a475717d960cf354cf388a44ecb9c40c8e3 (diff)
downloaddotty-5766b9976982071caf6e20a629c04a66ccf5cbb5.tar.gz
dotty-5766b9976982071caf6e20a629c04a66ccf5cbb5.tar.bz2
dotty-5766b9976982071caf6e20a629c04a66ccf5cbb5.zip
Add Symdenotation. isValueClassConvertMethod
Checks if the symbols is a synthetic symbol that is created by values class transformation to represent conversions between representations of a value class.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 53973b587..985d1a9c7 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -404,6 +404,14 @@ object SymDenotations {
name.toTermName == nme.COMPANION_CLASS_METHOD ||
name.toTermName == nme.COMPANION_MODULE_METHOD
+ /** Is this a syntetic method that represents conversions between representations of a value class
+ * These methods are generated in ExtensionMethods
+ * and used in ElimErasedValueType.
+ */
+ final def isValueClassConvertMethod(implicit ctx: Context) =
+ name.toTermName == nme.U2EVT ||
+ name.toTermName == nme.EVT2U
+
/** Is symbol a primitive value class? */
def isPrimitiveValueClass(implicit ctx: Context) = defn.ScalaValueClasses contains symbol