diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index e1254322e..4ededf796 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -456,8 +456,9 @@ object SymDenotations { } } - /** Is this a user defined "def" method? Excluded are accessors. */ - final def isSourceMethod(implicit ctx: Context) = this is (Method, butNot = AccessorOrLabel) + /** Is this a user defined "def" method? Excluded are accessors and anonymous functions. */ + final def isSourceMethod(implicit ctx: Context) = + this.is(Method, butNot = AccessorOrLabel) && !isAnonymousFunction /** Is this a setter? */ final def isGetter(implicit ctx: Context) = |