From 215be8b1c8c790cbab9260b2d4bb1f6873cbf7d0 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 17 Dec 2014 15:02:32 +0100 Subject: 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). --- src/dotty/tools/dotc/core/SymDenotations.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala') 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 } -- cgit v1.2.3