Skip to content

Commit d26401e

Browse files
committed
Give the Method flag to the label-defs produced by TailRec.
This is consistent with those produced by the current pattern matcher.
1 parent 675b2ac commit d26401e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TailRec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class TailRec extends MiniPhase with FullParameterization {
7070

7171
override def runsAfter = Set(ShortcutImplicits.name) // Replaces non-tail calls by tail calls
7272

73-
final val labelFlags = Flags.Synthetic | Flags.Label
73+
final val labelFlags = Flags.Synthetic | Flags.Label | Flags.Method
7474

7575
/** Symbols of methods that have @tailrec annotatios inside */
7676
private val methodsWithInnerAnnots = new collection.mutable.HashSet[Symbol]()

0 commit comments

Comments
 (0)