inline
and tailrec
annotations results in a compile-time error in future Scala versions SC-W1088Any method that is annotated with both inline
and tailrec
annotations throw a compile time error in Scala 3 despite compiling and running fine in Scala 2. In case you wish to upgrade to Scala 3 in near future, it is recommended that you take another look at this method and either rewrite it appropriately or drop one of the two said annotations.
@tailrec
@inline
def m1(): Unit = {
// ...
}
@tailrec
def m1(): Unit = {
// ...
}