File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
compiler/src/dotty/tools/dotc/transform
tests/neg-custom-args/fatal-warnings Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ class TailRec extends MiniPhase {
179
179
def isInfiniteRecCall (tree : Tree ): Boolean = {
180
180
def statOk (stat : Tree ): Boolean = stat match {
181
181
case stat : ValDef if stat.name.is(TailTempName ) || ! stat.symbol.is(Mutable ) => statOk(stat.rhs)
182
- case Assign (lhs : Ident , rhs : Ident ) if lhs.symbol.name.is(TailLocalName ) => statOk(rhs)
182
+ case Assign (lhs : Ident , rhs) if lhs.symbol.name.is(TailLocalName ) => statOk(rhs)
183
183
case stat : Ident if stat.symbol.name.is(TailLocalName ) => true
184
184
case _ => tpd.isPureExpr(stat)
185
185
}
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ object Test {
6
6
{ def f (x : Int , y : Int ): Int = f(x, x) } // error
7
7
{ def f (x : Int , y : Int ): Int = f(1 , 1 ) } // error
8
8
{ def f (x : Int , y : Int ): Int = { val a = 3 ; f(a, 1 ) } } // error
9
+ { def f (x : Int ): Int = f(1 ) } // error
9
10
10
11
}
You can’t perform that action at this time.
0 commit comments