Skip to content

Commit f821d53

Browse files
ouertanirochala
andauthored
docs: add compiler for recursive Inline Methods (#15591)
Reference that the deep of recursion optimisation is bounded. --------- Co-authored-by: Jędrzej Rochala <[email protected]>
1 parent 7aab896 commit f821d53

File tree

1 file changed

+2
-1
lines changed
  • docs/_docs/reference/metaprogramming

1 file changed

+2
-1
lines changed

docs/_docs/reference/metaprogramming/inline.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ would typecheck.
105105

106106
Inline methods can be recursive. For instance, when called with a constant
107107
exponent `n`, the following method for `power` will be implemented by
108-
straight inline code without any loop or recursion.
108+
straight inline code without any loop or recursion. It is worth noting that the number of successive
109+
inlines is limited to 32 and can be modified by the compiler setting `-Xmax-inlines`.
109110

110111
```scala
111112
inline def power(x: Double, n: Int): Double =

0 commit comments

Comments
 (0)