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 {
179179 def isInfiniteRecCall (tree : Tree ): Boolean = {
180180 def statOk (stat : Tree ): Boolean = stat match {
181181 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)
183183 case stat : Ident if stat.symbol.name.is(TailLocalName ) => true
184184 case _ => tpd.isPureExpr(stat)
185185 }
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ object Test {
66 { def f (x : Int , y : Int ): Int = f(x, x) } // error
77 { def f (x : Int , y : Int ): Int = f(1 , 1 ) } // error
88 { def f (x : Int , y : Int ): Int = { val a = 3 ; f(a, 1 ) } } // error
9+ { def f (x : Int ): Int = f(1 ) } // error
910
1011}
You can’t perform that action at this time.
0 commit comments