//> using options -Xmax-inlines 64
import scala.compiletime.{constValue, erasedValue}
inline def summonLabels[T <: Tuple]: List[String] =
inline erasedValue[T] match
case _: EmptyTuple => Nil
case _: (t *: ts) => constValue[t].asInstanceOf[String] :: summonLabels[ts]
// Minimal 3.10 failure: first size over the new inline recursion limit.
val xs49: List[String] = summonLabels[(
"f00", "f01", "f02", "f03", "f04", "f05", "f06", "f07", "f08", "f09",
"f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19",
"f20", "f21", "f22", "f23", "f24", "f25", "f26", "f27", "f28", "f29",
"f30", "f31", "f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",
"f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47", "f48"
)]
// Expected: last size that compiled on 3.9.0-RC6 with -Xmax-inlines 64.
val xs63: List[String] = summonLabels[(
"f00", "f01", "f02", "f03", "f04", "f05", "f06", "f07", "f08", "f09",
"f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19",
"f20", "f21", "f22", "f23", "f24", "f25", "f26", "f27", "f28", "f29",
"f30", "f31", "f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",
"f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47", "f48", "f49",
"f50", "f51", "f52", "f53", "f54", "f55", "f56", "f57", "f58", "f59",
"f60", "f61", "f62"
)]
Based on the OpenCB failure in
armanbilge/gcp4s(using circe/circe codecs derivation)On 3.9.rc under
-Xmax-lines 64the following example was able to go through 63 iterations - that's the expected behaviour. Now, with fuel-based approach it fails during 49 nested invocation. It suggest the current tracking of inlines might be flowed, resulting in pre-mature failure. It might affect all ecosystem, forcing raising the max-lines limits in multiple projectsCompiler version
Last good release: 3.10.0-RC1-bin-20260813-afdb1e2-NIGHTLY
First bad release: 3.10.0-RC1-bin-20260816-3adfcbd-NIGHTLY
Bisect points to a4e1b44 / #25937
Minimized code
Output
Expectation