diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-17 15:02:32 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-17 15:02:32 +0100 |
commit | 215be8b1c8c790cbab9260b2d4bb1f6873cbf7d0 (patch) | |
tree | 375da9cd33e97cad92a9584735d02b1ed5e678e6 /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | d5cc9141faef410c129b59c4455084e06d2f1ae9 (diff) | |
download | dotty-215be8b1c8c790cbab9260b2d4bb1f6873cbf7d0.tar.gz dotty-215be8b1c8c790cbab9260b2d4bb1f6873cbf7d0.tar.bz2 dotty-215be8b1c8c790cbab9260b2d4bb1f6873cbf7d0.zip |
Label defs are not source methods.
If this commit is made without the previous fixes to returns,
we get errors in dotc_parsing (without the fix to polymorphic
returns) and in dotc_core (without the fix in tree transform).
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 841d94b74..a05296802 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -422,7 +422,7 @@ object SymDenotations { } /** Is this a user defined "def" method? Excluded are accessors. */ - final def isSourceMethod(implicit ctx: Context) = this is (Method, butNot = Accessor) + final def isSourceMethod(implicit ctx: Context) = this is (Method, butNot = AccessorOrLabel) /** Is this a setter? */ final def isGetter(implicit ctx: Context) = @@ -1664,4 +1664,6 @@ object SymDenotations { private final val NumBits = NumWords << WordSizeLog private final val Mask = NumBits - 1 } + + private val AccessorOrLabel = Accessor | Label } |