diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-02-19 17:50:23 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-02-27 09:25:22 +0100 |
commit | 9b01e150da8ee1f730a6c60ca7954c2ac57df7a0 (patch) | |
tree | 05675bb4acb6b233ae84f951befc5e9c90752c07 | |
parent | 4e9987740f206c2376957d08d626f7c1ed087688 (diff) | |
download | dotty-9b01e150da8ee1f730a6c60ca7954c2ac57df7a0.tar.gz dotty-9b01e150da8ee1f730a6c60ca7954c2ac57df7a0.tar.bz2 dotty-9b01e150da8ee1f730a6c60ca7954c2ac57df7a0.zip |
Add isAnonymousModuleVal
As we are now synthesizing companion objects for all classes, this seems reasonable to have.
-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 bce4322ff..d0d1863d4 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -354,6 +354,9 @@ object SymDenotations { final def isAnonymousFunction(implicit ctx: Context) = this.symbol.is(Method) && (initial.asSymDenotation.name startsWith nme.ANON_FUN) + final def isAnonymousModuleVal(implicit ctx: Context) = + this.symbol.is(ModuleVal) && (initial.asSymDenotation.name startsWith nme.ANON_CLASS) + /** Is symbol a primitive value class? */ def isPrimitiveValueClass(implicit ctx: Context) = defn.ScalaValueClasses contains symbol |