diff options
author | Martin Odersky <odersky@gmail.com> | 2014-06-12 15:05:24 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-06-12 15:40:42 +0200 |
commit | 4e287d506eeb1d0463c3efd275327b55fce452f2 (patch) | |
tree | 9c2b13d9d1494262ad60e132c4ebeaf2c126f0cb /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 96196c9ffa9939acd7437103d1621dac96e9abc6 (diff) | |
download | dotty-4e287d506eeb1d0463c3efd275327b55fce452f2.tar.gz dotty-4e287d506eeb1d0463c3efd275327b55fce452f2.tar.bz2 dotty-4e287d506eeb1d0463c3efd275327b55fce452f2.zip |
Add isLambda... tests
Testing whether a type is (a subtype of) a Lambda class.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 606966be9..46484e6cc 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -324,6 +324,9 @@ object SymDenotations { final def isRefinementClass(implicit ctx: Context): Boolean = name.decode == tpnme.REFINE_CLASS + final def isLambdaTrait(implicit ctx: Context): Boolean = + isClass && name.startsWith(tpnme.LambdaPrefix) + /** Is this symbol a package object or its module class? */ def isPackageObject(implicit ctx: Context): Boolean = { val poName = if (isType) nme.PACKAGE_CLS else nme.PACKAGE |