Skip to content

Commit 0315e27

Browse files
committed
Use inline constant
1 parent 60a4758 commit 0315e27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,12 +1094,12 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
10941094
* and falls back to it after `MaxRecursionLimit` recursions.
10951095
* Before that it uses a simpler method that uses stackspace
10961096
* instead of heap.
1097-
* Note `op` is duplicated in the generatee code, so it should be
1098-
* kept small
1097+
* Note `op` is duplicated in the generated code, so it should be
1098+
* kept small.
10991099
*/
11001100
inline def mapInline(inline op: Tree => Tree): List[Tree] =
11011101
def recur(trees: List[Tree], count: Int): List[Tree] =
1102-
if count > 1000 then
1102+
if count > MapRecursionLimit then
11031103
// use a slower implementation that avoids stack overflows
11041104
flatten(trees.mapConserve(op))
11051105
else trees match

0 commit comments

Comments
 (0)