Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/crystal/semantic/ast.cr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require "../syntax/ast"

# TODO: 10 is a pretty big number for the number of nested generic instantiations,
# TODO: 300 is a pretty big number for the number of nested generic instantiations,
# (think Array(Array(Array(Array(Array(Array(Array(Array(Array(Array(Array(...))))))))))
# but we might want to implement an algorithm that correctly identifies this
# infinite recursion.
private def generic_type_too_nested?(nest_level)
nest_level > 10
nest_level > 300
end

module Crystal

0 comments on commit 277609e

Please sign in to comment.