Skip to content

Commit 215be8b

Browse files
committed
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).
1 parent d5cc914 commit 215be8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ object SymDenotations {
422422
}
423423

424424
/** Is this a user defined "def" method? Excluded are accessors. */
425-
final def isSourceMethod(implicit ctx: Context) = this is (Method, butNot = Accessor)
425+
final def isSourceMethod(implicit ctx: Context) = this is (Method, butNot = AccessorOrLabel)
426426

427427
/** Is this a setter? */
428428
final def isGetter(implicit ctx: Context) =
@@ -1664,4 +1664,6 @@ object SymDenotations {
16641664
private final val NumBits = NumWords << WordSizeLog
16651665
private final val Mask = NumBits - 1
16661666
}
1667+
1668+
private val AccessorOrLabel = Accessor | Label
16671669
}

0 commit comments

Comments
 (0)